Vous êtes sur la page 1sur 9

D

B R2
R1
R4
C E
R3 F
How to find the best path from A to F?
How does R1 chooses the best route to R4?
What is routing?
“A part of the network software responsible for deciding which output line an
incoming packet should be transmitted on.” – Tanenbaum
In Internetworking multiple paths exist between two networks. Routing helps
to identifying the path.

1 2

1. Next-hop routing 2. Network-specific routing

To reduce the contents of a routing table


To reduce the routing table and simplify the searching process
Routing table holds only the information that leads to the next hop instead of
holding information about the complete route

3 4
3. Host-specific routing 4. Default routing

Inverse of network-specific routing


Destination host address is given in the routing table Another technique to simplify routing
Not efficient, but administrator has greater control over routing

5 6

Route method Vs Next-


Next-hop method Routing & forwarding
Not the same thing!
Routing- filling in the routing tables
Forwarding – handling the packets based on the routing tables

Addresses have network and host portions


At sender:
If destination network is the same as the host network, then deliver
locally (without router, using ARP which maps IP address->link level
address).
Otherwise send to the router (for hosts, that is typically a default
router: a “gateway”)

At router:
If destination network is directly attached then deliver locally (using
ARP)
Otherwise look up destination network in routing table to find next
hop and send to next router.

8
Routing - properties
1. correctness Routing Algorithm Analogy
2. simplicity A person traveling from Madurai to Sivakasi.
3. Robustness If they were using a non-adaptive algorithm, they would make the decision to pass
should cope with changes in the topology and traffic that happen through Thirumangalam and Virudhunagar before they left Madurai.
over days… If they were using an adaptive algorithm, they would possibly travel to
updating possibility to meet the above requirement Thirumangalam first and depending on how busy the routes are, they may travel
to Srivilliputtur instead of Virudhunagar and then onto Sivakasi.
4. Stability
In non-adaptive, the hops or jumps taken is decided before hand.
must converge to equilibrium
In adaptive, the next hop is decided at each stage.
5. fairness
6. optimality
min mean packet delay
max total network throughput
Note: 5 & 6 often contradictory
9 10

Routing algorithms
Critaria used for selection of route Grouped into
Minimum hop Non-adaptive algorithm or Static routing
Least cost Non-adaptive routing algorithms make routing decisions based
on the network topology.
The routes are chosen in advance, off line and downloaded to
the routers when the network is booted.
Adaptive algorithm
Adaptive algorithms change their routing decisions in line with
changes in network traffic or network topology.
This is sometimes known as dynamic routing.

11 12

!
Adaptive Routing
Adaptive algorithms require up to date information about network traffic and network topology at well
defined times so that they can optimize throughput of packets.
Static Routing These algorithms may differ in:
A graph of the layout of all routers in the subnet is composed. Where the routers get their information.
Each node on the graph represents a router and each line represents This could be locally from all adjacent routers or from all routers in the subnet.
a communication line or link (cable or radio link etc.). Routing decisions usually based on knowledge of network (not always)
Distributed routing
A distance is associated with each communication link connecting o Nodes use local knowledge
two routers. o May collect info from adjacent nodes
o May collect info from all nodes on a potential route
To choose a route between a pair of routers, the routing algorithm Central routing
just selects the shortest path between them on the graph. o Collect info from all nodes
Update timing
All shortest paths are calculated in advance. o When is network info held by nodes updated
o Fixed - never updated
o Adaptive - regular updates
When the routers change the routes.
This may be after a well known number of seconds or if the network traffic increases or if new
LANs are added to the network (change in network topology).
What measure is used for optimizing throughput of packets.
Will it depend on shortest distance between routers, the fastest transmission time or the
13 14 number of routers it has to pass through.

Routing Strategies Properties of Fixed Routing


Fixed Single permanent route for each source to destination pair
Flooding Determine routes using a least cost algorithm
Random Route fixed, at least until a change in network topology
Adaptive

15 16

"
Fixed Routing Example Fixed
Routing
Tables

17 18

Properties of Flooding Flooding


No network info required Example
Packet sent by node to every neighbor
Incoming packets retransmitted on every link except incoming link
Eventually a number of copies will arrive at destination
Each packet is uniquely numbered so duplicates can be discarded
Nodes can remember packets already forwarded to keep network load in bounds
Can include a hop count in packets
All possible routes are tried
Very robust
At least one packet will have taken minimum hop count route
Can be used to set up virtual circuit
All nodes are visited
Useful to distribute information (e.g. routing)

19 20
Properties of Random Routing Properties of Adaptive Routing
Node selects one outgoing path for retransmission of incoming Used by almost all packet switching networks
packet Routing decisions change as conditions on the network change
Selection can be random or round robin Failure
Can select outgoing path based on probability calculation Congestion
No network info needed Requires info about network
Route is typically not least cost nor minimum hop Decisions more complex
Tradeoff between quality of network info and overhead
Reacting too quickly can cause oscillation
Too slowly to be relevant

21 22

Dynamic Routing Example – Distance Vector Routing Dynamic Routing Example – Distance Vector Routing
Router A computes the delay to its neighbors B and C as follows:
Modern computer networks tend to use dynamic routing
B: 2msec, C: 3msec.
algorithms.
Each of Routers A neighbors, in this case B and C, send delay vectors
Distance vector routing algorithms work by having each router
that show the millisecond delay from each of their machines to all
maintain a table giving the best known distance to each destination
routers, as follows.
and which line to use when they get there.
Router B> A: 3, B:0, C: 7, D: 6, E: 4, F: 10
These tables are updated regularly. Router C> A: 3, B:6, C: 0, D: 3, E: 12, F: 7.

B Nodes
E

A
Communication Link
D

C F

23 24
Dynamic Routing Example – Distance Vector Routing Key issues in this technique :
Routing Table for Router A is then calculated
Knowledge about the whole network
Destination Link Delay
Routing only to neighbors
Router A -- 0
Information sharing at regular intervals
Router B AB 2

Router C AC 3

Router D AC 6

Router E AB 6

Router F AC 10

Router A sends updates to all its neighbours.


The measure could be anything. In this case it is delay time in milliseconds.
Updates ripple through the network as each router does this calculation.
25 26

Example Distance Vector Routing Sharing of information in distance vector routing


At start up a router’s knowledge of the internetwork is sparse.
Prepare a routing table with following fields:
Network id
Cost
Next hop

27 28

#
Routing table distribution in distance vector routing
Updating routing table of router A

30

Final routing tables


Router applies the following rules for updating
process
1. If the advertised station is not in the routing table, the
router should add the advertised information to the
table.
2. If the advertised destination is in the routing table.
a) If the next hop field is the same, the router should replace
the entry in the table with the advertised one. Note that even
if the advertised hop count is larger the advertised entry
should replace the entry in the table because the new
information invalidates the old.
b) If the next hop field is not the same.
i. If the advertised hop count is smaller than the one in the
table, the router should replace the entry in the table
with the new one.
ii. If the advertised hop count is not smaller(same or
larger), the router should do nothing.
32

$
Updating process Adaptive Routing - Advantages
Improved performance
Aid congestion control

(Rule 2.a)
(Rule 1)
(Rule 2.b.i)
(Rule 2.b.ii)
(Rule 2.b.ii)

33 34

Two-node instability Three-node instability

35 36

Vous aimerez peut-être aussi