Professional Documents
Culture Documents
7 Routing
7 Routing
7 Routing
Gihan Dias
060529
Routing
5
Routing protocol
3
Goal: determine “good” path B C 5
2
(sequence of routers) thru A 2 1 F
network from source to dest. 3
1 2
D E
1
Graph abstraction for
routing algorithms: “good” path:
graph nodes are typicallymeans
routers minimum cost path
graph edges are other def’s possible
physical links
linkcost: delay, $
cost, or congestion
level
What is the “shortest” path
from A to F?
3
B C 5
2
A 2 1
3 F
1
2
D 1 E
Routing Algorithm classification
Global or Local routing? Static or dynamic?
Global: Static:
router has complete routes change slowly over
topology, link cost info time
e.g.: Airline Dynamic:
Local: routes change more
router knows physically- quickly
connected neighbors, link periodicupdate
costs to neighbors
in response to link
iterative process of
cost changes
computation, exchange of
info with neighbors
Static Routing
Network Next Hop
192.168.1.10
192.168.1.0/24 Direct (1)
192.168.1.0/24 192.168.2.0/24 Direct (2)
192.168.1.254
A
192.168.2.254
192.168.2.0/24
192.168.2.22
Static Routing (2)
Network Next Hop
192.168.1.10
192.168.1.0/24 Direct (1)
192.168.2.0/24 Direct (2)
192.168.1.0/24
192.168.8.0/24 192.168.2.253
192.168.1.254 192.168.9.0/24 192.168.2.253
A 192.168.10.0/24 192.168.2.253
192.168.2.254
192.168.8.0/24 192.168.2.253
192.168.10.0/24
B
192.168.9.0/24
Static Routing (3)
Network Next Hop
192.168.1.10
192.168.1.0/24 Direct (1)
192.168.2.0/24 Direct (2)
192.168.1.0/24
192.168.8.0/22 192.168.2.253
192.168.1.254
A
192.168.2.254
192.168.8.0/24 192.168.2.253
192.168.10.0/24
B
Network Aggregation
192.168.9.0/24
Static Routing (4)
192.168.1.10
192.168.0.4/30
192.168.1.0/24
192.168.0.6
192.168.1.254 192.168.0.5
A C
192.168.2.254
192.168.8.0/24 192.168.16.0/24
192.168.2.253
192.168.10.0/24
B
Network Next Hop
192.168.9.0/24 192.168.1.0/24 Direct (1)
192.168.2.0/24 Direct (2)
192.168.8.0/22 192.168.2.253
192.268.16.0/24 192.168.0.6
Autonomous Routers
1 A 1 14 5
B C
7
A 8 2
B 7 8 5
destination
1
E D
2
C 6 9 4
D 4 11 2
Distance table gives routing
table
cost to destination via
E Outgoing link
D () A B D to use, cost
A 1 14 5 A A,1
B 7 8 5 B D,5
destination
destination
C 6 9 4 C D,4
D 4 11 2 D D,4
5
3
B C 5
2
A 2 1 F
3
1 2
D E
1
Routing Protocols
RIP ( Routing Information Protocol)
Distance vector algorithm
Included in BSD-UNIX Distribution in 1982
Distance metric: # of hops (max = 15 hops)
Can you guess why?
w x y
A D B
z
C
Destination Network Next Router Num. of hops to dest.
w A 2
y B 2
z B 7
x -- 1
…. …. ....
Routing table in D
RIP: Example
A finds that z is
Dest Next hops
w - - Advertisement reachable via C
x - - from A to D
z C 4
…. … ...
w x y
A D B
4 hops to net z z
Routing principles
linkstate
distance vector