Dynamic Routing Protocols II Ospf: Relates To Lab 4. This Module Covers Link State
Dynamic Routing Protocols II Ospf: Relates To Lab 4. This Module Covers Link State
Relates to Lab 4. This module covers link state routing and the Open Shortest Path First (OSPF) routing protocol.
Distance vector routing makes poor routing decisions if directions are not completely correct (e.g., because a node is down).
If parts of the directions incorrect, the routing may be incorrect until the routing algorithms has re-converged.
2
D
A A B C D D E F E B C
E
A F D E B C
3. Each router maintains a database of all received LSAs (topological database or link state database), which describes the network has a graph with weighted edges 4. Each router uses its link state database to run a shortest path algorithm (Dijikstras algorithm) to produce the shortest path to each network
Received LSAs
Dijkstras
Algorithm
IP Routing Table
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
10.10.10.1
.1
10.10.10.2
10.10.10.4
.2
10.10.10.6
.4
4
10.1.1.0 / 24
.2
2
10.1.4.0 / 24
.4
1
10.1.7.0 / 24
.6
.1
.2
10.1.3.0 / 24
.4
10.1.6.0 / 24
.6
.3 .3 .3
.5
5
10.1.5.0/24
.5 .5
10.10.10.2
10.10.10.5
216]
10
.1
.8
.0
/2
3
2 .0 /2 4
10 .1 .
The LSA of router 10.10.10.1 is as follows: .1 Link State ID: 10.10.10.1 = Router ID Advertising Router: 10.10.10.1 = Router ID Number of links: 3 = 2 links plus router itself
Description of Link 1: Description of Link 2: Description of Link 3: Link ID = 10.1.1.1, Metric = 4 Link ID = 10.1.2.1, Metric = 3
.1
4
10.1.1.0 / 24
10.10.10.2
.2 .2
10.1.4.0 / 24
.2
10.1.3.0 / 24
3
10 .1 . 2 .0 /2 4
.3
.3 .3
10.1.5.0/24 10.10.10.3
Each router sends its LSA to all routers in the network (using a method called reliable flooding)
11
10.10.10.2
.2 .2 .4
10.10.10.4
.4 .6
10.10.10.6
10.1.1.0 / 24
.1 .2
10.1.3.0 / 24
10.1.4.0 / 24
.4
10.1.6.0 / 24
10.1.7.0 / 24
.6
Each router has a database which contains the LSAs from all other routers
.3 .3 .3 .5
.5
.5
10
.1
.8
.0
/2
10 .1 . 2 .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 header
OSPF Message
OSPF packets are not carried as UDP payload! OSPF has its own IP protocol number: 89
LSA
LSA
... ...
LSA
version
type
message length
authentication authentication
32 bits
64 cleartext password 0x0000 (16 bits) KeyID (8 bits) Length of MD5 checksum (8 bits) Nondecreasing sequence number (32 bits)
Link Age
LSA Header
LSA Header LSA Data
Link ID
Link 1
Link Type
Link Data
#TOS metrics
Metric
Link ID
Link 2
Link Type
Link Data
#TOS metrics
Metric
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
10.1.10.1 10.1.10.2
Discovery of adjacency
Sends database description. (description only contains LSA headers) Acknowledges receipt of description
Database Description: Sequence = X, 5 LSA headers = Router-LSA, 10.1.10.1, 0x80000006 Router-LSA, 10.1.10.2, 0x80000007 Router-LSA, 10.1.10.3, 0x80000003 Router-LSA, 10.1.10.4, 0x8000003a Router-LSA, 10.1.10.5, 0x80000038 Router-LSA, 10.1.10.6, 0x80000005 Database Description: Sequence = X+1, 1 LSA header= Router-LSA, 10.1.10.2, 0x80000005 Database Description: Sequence = X+1
18
Link State Request packets, LSAs = Router-LSA, 10.1.10.1, Router-LSA, 10.1.10.2, Router-LSA, 10.1.10.3, Router-LSA, 10.1.10.4, Router-LSA, 10.1.10.5, Router-LSA, 10.1.10.6,
Link State Update Packet, LSAs = Router-LSA, 10.1.10.1,0x80000006 Router-LSA, 10.1.10.2, 0x80000007 Router-LSA, 10.1.10.3, 0x80000003 Router-LSA, 10.1.10.4, 0x8000003a Router-LSA, 10.1.10.5, 0x80000038 Router-LSA, 10.1.10.6, 0x80000005
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)
19
LSA ACK
Update database
LSA
Update database
LSA ACK
Update database
Update database
10.10.10.2
LSA
Update database
10.10.10.5
20
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
Autonomous System 1
Router
Ethernet
Router
Router Ethernet
Autonomous System 2
Router Ethernet
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
Router Router
AS 2
Router
Router
AS 3
Router
Router
Router
AS 4
26