Change in OSPF Designated Router Creates Extra Network LSAs

When testing the OSPF graceful shutdown feature, I’ve encountered an interesting OSPF feature: if you force a change in LAN DR router (other than rebooting the current DR), you’ll end up with two network LSAs describing the same LAN.

For example, if you force the B2 router in the following network to relinquish its DR status (by setting ip ospf priority 0 on the interface), B1 will take over and generate another network LSA (as expected), but the network LSA generated by B2 will stay in the database for a while and both routers will claim they are connected to both network LSAs.

Here are the corresponding show printouts. First, the network LSAs before the change:

b2#show ip ospf 1 database | begin Net Link
Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.0.0.6 172.16.0.12 283 0x80000001 0x007E52
192.168.0.6 172.16.0.22 280 0x80000001 0x00044F

Next, the network LSA generated by B2:

b2#show ip ospf 1 database network 192.168.0.6

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

Net Link States (Area 0)

Routing Bit Set on this LSA
LS age: 284
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 192.168.0.6 (address of Designated Router)
Advertising Router: 172.16.0.22
LS Seq Number: 80000001
Checksum: 0x44F
Length: 32
Network Mask: 255.255.255.0
Attached Router: 172.16.0.22
Attached Router: 172.16.0.21

After the change, there is an extra network LSA in the database issued by B1:

b2#show ip ospf 1 database | begin Net Link
Net Link States (Area 0)

Link ID ADV Router Age Seq# Checksum
10.0.0.6 172.16.0.12 324 0x80000001 0x007E52
192.168.0.5 172.16.0.21 7 0x80000001 0x00183D
192.168.0.6 172.16.0.22 321 0x80000001 0x00044F

And, interestingly, both B1 and B2 claim they are connected to both network LSAs:

b2#show ip ospf 1 database router 172.16.0.21

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

Router Link States (Area 0)

LS age: 43
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 172.16.0.21
Advertising Router: 172.16.0.21
LS Seq Number: 80000006
Checksum: 0x1602
Length: 84
Number of Links: 5

Link connected to: a Stub Network
(Link ID) Network/subnet number: 172.16.0.21
(Link Data) Network Mask: 255.255.255.255
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: another Router (point-to-point)
(Link ID) Neighboring Router ID: 172.16.0.11
(Link Data) Router Interface address: 172.16.1.2
Number of TOS metrics: 0
TOS 0 Metrics: 50

Link connected to: a Stub Network
(Link ID) Network/subnet number: 172.16.1.0
(Link Data) Network Mask: 255.255.255.252
Number of TOS metrics: 0
TOS 0 Metrics: 50

Link connected to: a Transit Network
(Link ID) Designated Router address: 192.168.0.6
(Link Data) Router Interface address: 192.168.0.5
Number of TOS metrics: 0
TOS 0 Metrics: 1

Link connected to: a Transit Network
(Link ID) Designated Router address: 192.168.0.5
(Link Data) Router Interface address: 192.168.0.5
Number of TOS metrics: 0
TOS 0 Metrics: 1

6 comments:

  1. as you mentioned "the network LSA generated by B2 will stay in the database for a while".. but not forever, as I counted it went up to 60 seconds before that LSA has been deleted
    Replies
    1. Ah, so you've been able to reproduce this behavior. Nice ;)
  2. hugely out of topic, but couldn't help myself
    feel free to delete or share

    http://www.gizoogle.net/index.php?search=http%3A%2F%2Fblog.ioshints.info%2F2012%2F12%2Fchange-in-ospf-designated-router.html%23more&se=Gizoogle+Dis+Shiznit
  3. @Ivan: I think this behaviour is limited to IOS as I could n't see any thing in rfc 2328.
  4. I have confirmed that the LSA is being MaxAged out, but I can't put my finger on why this is taking a solid 60 seconds to happen.

    I did see that OSPF is remembering the old DR on the link as I issue the 'ip ospf priority 0' command. And it's not until the router, through the use of a debug, 'Reset old DR on Fa0/0'. But the question is, what timer is being used to keep that entry for 60 seconds?

    I did some light digging, but I can't seem to find an answer immediately. I'm sure its something simple that I'm overlooking, but I will dig some more when I get some free time.
  5. Thank you,
    The information you shared is very informative.
Add comment
Sidebar