OSPF as a distance vector protocol

From CT3

Jump to: navigation, search

By Jeremy Stretch

Examine the OSPF topology below. Assuming all links have an equal cost, which path will R3 take to R5?

Image:OSPF_as_a_DV_topology.png

The obvious answer is the path through R4, as it is only two hops. However, the path that is actually taken is the one through R1 and R2 in area 0:

R3# traceroute 192.168.20.5

Type escape sequence to abort.
Tracing the route to 192.168.20.5

 1 192.168.10.1 20 msec 12 msec 16 msec
 2 10.0.0.2 12 msec 24 msec 20 msec
 3 192.168.20.5 12 msec *  24 msec

Why? Although OSPF operates as a link-state routing protocol within an area, its behavior between areas is predominantly distance vector. Link-state trees (formed from LSA types 1 and 2) are only maintained within an area; summary routes (type 3 LSAs) are used to statelessly transport routing information between areas. To prevent routing loops, areas must be connected in a logical star topology, centering around area 0. All type 3 LSAs must therefore pass into or out of area 0 when multiple areas are in use, whereas type 1 and 2 LSAs are confined to the local area.

Image:OSPF_as_a_DV_lsa_flow.png

We can better observe this limitation by examining R3's OSPF database:

R3# show ip ospf database

            OSPF Router with ID (3.3.3.3) (Process ID 1)

		Router Link States (Area 10)

Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         1006        0x80000002 0x00F244 1
3.3.3.3         3.3.3.3         1001        0x80000002 0x0073B2 1
4.4.4.4         4.4.4.4         965         0x80000002 0x0035E7 1

		Net Link States (Area 10)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.10.1    1.1.1.1         967         0x80000002 0x001F7D

		Summary Net Link States (Area 10)

Link ID         ADV Router      Age         Seq#       Checksum
10.0.0.0        1.1.1.1         987         0x80000003 0x0049D9
192.168.20.0    1.1.1.1         888         0x80000001 0x00A502

Note that the summary LSAs are only being advertised from R1, because that is the only router in area 10 also connected to area 0. R4, although it belongs to both areas, will not propagate LSAs from one area to the other, as it has no access to area 0. If it were to pass summary routes, for example, from area 10 to area 20, those routes would then be passed along by R2 to area 0 and by R1 back into area 10, forming a routing loop. By forcing all area border routers (ABRs) to attach to the common link-state tree in area 0, such loops are avoided.

Personal tools

CT3

Main menu