Professional Documents
Culture Documents
Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol.
A A
B B
C C
Distance vector routing makes poor routing decisions if directions are not completely correct (e.g., because a node is down).
D D
E E
F F
If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged.
2
A A
B B
C C
D D
A B C D E F
E E
A B C F D E
F F
F
Received LSAs
Dijkstras Algorithm
IP Routing Table
Output: Dn
M = {s}; for each n M Dn = dsn; while (M all nodes) do Find w M for which Dw = min{Dj ; j M}; Add w to M; for each n M Dn = minw [ Dn, Dw + dwn ]; Update route; enddo
OSPF
OSPF = Open Shortest Path First The OSPF routing protocol is the most important link state routing protocol on the Internet The complexity of OSPF is significant History:
1989: RFC 1131 OSPF Version 1 1991: RFC1247 OSPF Version 2 1994: RFC 1583 OSPF Version 2 (revised) 1997: RFC 2178 OSPF Version 2 (revised) 1998: RFC 2328 OSPF Version 2 (current version)
Features of OSPF
Provides authentication of routing messages Enables load balancing by allowing traffic to be split evenly across routes with equal cost Type-of-Service routing allows to setup different routes dependent on the TOS field Supports subnetting Supports multicasting Allows hierarchical routing
Example Network
1 0 .1 0 .1 0 .1
.1
1 0 .1 0 .1 0 .2
.2 .2
1 0 .1 0 .1 0 .4
.4 .4
1 0 .1 0 .1 0 .6
.6
1 0 .1 .1 .0 / 2 4
.1 .2
1 0 .1 .4 .0 / 2 4
.4
1 0 .1 .7 .0 / 2 4
.6
.3 .3 .3
.5
.5 .5
1 0 .1 .5 .0 / 2 4 1 0 .1 0 .1 0 .2
1 0 .1 0 .1 0 .5
10.1 .8.
2
10.1.3.0 / 24
3
10.1.6.0 / 24
1
0/2 4
2 10.1. .0 / 2 4
1 0 .1 0 .1 0 .2
.2 .2
1 0 .1 .1 .0 / 2 4
.2
1 0 .1 .4 .0 /
3
2 10.1. .0 / 2 4
.3
2
10.1.3.0 / 24
.3 .3
1 0 .1 .5 .0 / 2 1 0 .1 0 .1 0 .3
Each router sends its LSA to all routers in the network (using a method called reliable flooding)
11
1 0 .1 0 .1 0 .2
.2 .2 .4
1 0 .1 0 .1 0 .4
.4 .6
1 0 .1 0 .1 0 .6 1 0 .1 .7 .0 / 2 4
1 0 .1 .1 .0 / 2 4
.1 .2
1 0 .1 .4 .0 / 2 4
.4
.6
Each router has a database which contains the LSAs from all other routers
10.1.6.0 / 24
10.1.3.0 / 24
.3 .3 .3 .5
.5
1 0 .1 .5 .0 / 2 4 1 0 .1 0 .1 0 .2
.5
1 0 .1 0 .1 0 .5
10.1 .8
.0 / 2
2 10.1. .0 / 2 4
If neighboring routers discover each other for the first time, they will exchange their link-state databases The link-state databases are synchronized using reliable flooding
13
IP h e a d e r
O SPF M essage
OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89
LSA
LSA
... ...
LSA
v e r s io n
ty p e
m e s s a g e le n g th
64 cleartext password 0x0000 (16 bits) KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits)
L in k A g e
L in k T y p e L in k S t a t e ID
LSA Header
LSA Header LSA D a ta
L in k ID
Link 1
L i n k T y p e# T O
L in k D a ta
S m e tr ic s
M e t r ic
L in k ID
Link 2
L i n k T y p e# T O
L in k D a ta
S m e tr ic s
M e t r ic
16
Discovery of Neighbors
Routers multicasts OSPF Hello packets on all OSPF-enabled interfaces. If two routers share a link, they can become neighbors, and establish an adjacency
1 0 .1 .1 0 .1 1 0 .1 .1 0 .2
Discovery of adjacency
O S P F H e llo O S P F H e llo : I h e a rd 1 0 .1 .1 0 .2
Sends database description. (description only contains LSA headers) Acknowledges receipt of description
D a ta R o R o R o R o R o R o
b u u u u u u
a s e D e s c r ip t io n : S e q u e n c e = X , 5 L S A h e a d e r s = te r-L S A , 1 0 .1 .1 0 .1 , 0 x 8 0 0 0 0 0 0 6 t e r -L S A , 1 0 .1 .1 0 .2 , 0 x 8 0 0 0 0 0 0 7 t e r -L S A , 1 0 .1 .1 0 .3 , 0 x 8 0 0 0 0 0 0 3 t e r -L S A , 1 0 .1 .1 0 .4 , 0 x 8 0 0 0 0 0 3 a t e r -L S A , 1 0 .1 .1 0 .5 , 0 x 8 0 0 0 0 0 3 8 t e r -L S A , 1 0 .1 .1 0 .6 , 0 x 8 0 0 0 0 0 0 5
D a t a b a s e D e s c r ip t io n : S e q u e n c e = X + 1 , 1 L S A h e a d e r = R o u t e r -L S A , 1 0 .1 .1 0 .2 , 0 x 8 0 0 0 0 0 0 5 D a t a b a s e D e s c r ip t io n : S e q u e n c e = X + 1
18
L in R R R R R R
k o o o o o o k o o o o o o
S ta te u te r -L u te r -L u te r -L u te r -L u te r -L u te r -L S ta te u te r -L u te r -L u te r -L u te r -L u te r -L u te r -L
R S S S S S S U S S S S S S
e A A A A A A p A A A A A A
q u e s t p a c k e ts , L S A s = , 1 0 .1 .1 0 .1 , , 1 0 .1 .1 0 .2 , , 1 0 .1 .1 0 .3 , , 1 0 .1 .1 0 .4 , , 1 0 .1 .1 0 .5 , , 1 0 .1 .1 0 .6 , d , , , , , , a te P a c k e t, L S A s = 1 0 . 1 . 1 0 0. 1x , 8 0 0 0 0 0 0 6 1 0 .1 .1 0 .2 , 0 x 8 0 0 0 0 0 0 7 1 0 .1 .1 0 .3 , 0 x 8 0 0 0 0 0 0 3 1 0 .1 .1 0 .4 , 0 x 8 0 0 0 0 0 3 a 1 0 .1 .1 0 .5 , 0 x 8 0 0 0 0 0 3 8 1 0 .1 .1 0 .6 , 0 x 8 0 0 0 0 0 0 5
L in R R R R R R
10.1.10.2 has more recent value for 10.0.1.6 and sends it to 10.1.10.1 (with higher sequence number)
L in k S ta te U p d a te P a c k e t , L S A = R o u t e r -L S A , 1 0 .1 .1 .6 , 0 x 8 0 0 0 0 0 0 6
19
LSA ACK
1 0 .1 0 .1 0 .2
Update database
ACK LSA
1 0 .1 0 .1 0 .4
Update database
LSA ACK
1 0 .1 0 .1 0 .6
Update database
A LS K AC
LSA
LSA
Update database
1 0 .1 0 .1 0 .2
ACK LSA
Update database
1 0 .1 0 .1 0 .5
20
LAC SAK
ACK
ACK
Dissemination of LSA-Update
A router sends and refloods LSA-Updates, whenever the topology or link cost changes. (If a received LSA does not contain new information, the router will not flood the packet) Exception: Infrequently (every 30 minutes), a router will flood LSAs even if there are not new changes. Acknowledgements of LSA-updates: explicit ACK, or implicit via reception of an LSA-Update Question: If a new node comes up, it could build the database from regular LSA-Updates (rather than exchange of database description). What role do the database description packets play? 21
Autonomous Systems
An autonomous system is a region of the Internet that is administered by a single entity. Examples of autonomous regions are: UVAs campus network MCIs backbone network Regional Internet Service Provider Routing is done differently within an autonomous system (intradomain routing) and between autonomous system (interdomain routing).
22
A u to n o m o u s S y s te m 1
R o u te r
E th e rn e t
R o u te r
R o u te r E th e rn e t
R o u te r E th e rn e t R o u te r
A u to n o m o u s S y s te m 2
R o E tt eh re r n e t u
23
BGP
BGP = Border Gateway Protocol Currently in version 4 Note: In the context of BGP, a gateway is nothing else but an IP router that connects autonomous systems. Interdomain routing protocol for routing between autonomous systems Uses TCP to send routing messages BGP is neither a link state, nor a distance vector protocol. Routing messages in BGP contain complete routes. Network administrators can specify routing policies
24
BGP
BGPs goal is to find any path (not an optimal one). Since the internals of the AS are never revealed, finding an optimal path is not feasible. For each autonomous system (AS), BGP distinguishes: local traffic = traffic with source or destination in AS transit traffic = traffic that passes through the AS Stub AS = has connection to only one AS, only carry local traffic Multihomed AS = has connection to >1 AS, but does not carry transit traffic Transit AS = has connection to >1 AS and carries transit traffic
25
BGP
AS 1
R o u te r R o u te r
AS 2
R o u te r
R o u te r
AS 3
R o u te r
R o u te r
R o u te r
AS 4
26