Hello people, hope you are all doing great! We will do a deep-dive into LSAs and SPF runs of OSPF in the next few posts. I have decided to divide the topics into multiple posts so that we can understand and easily retain information from each one.

This is a summary of what we will discuss today, please feel free to add on if I have missed anything important

  • Basic Router LSA generation
  • Network LSA not present with priority 0
  • Network LSA created when DR Election is complete
  • Network LSA Advertising Router changes with DR change
  • No Network LSA in Point-to-Point Networks

Consider the below topology, with PE1 connected to PE2 on a Broadcast OSPF Network. I have configured two links on each device, a Stub link or a Loopback interface and an IP address on a physical interface directly connected to each other. We will go step by step and check how the LSA information changes with each step.

  1. Loopback Interface UP, Physical Interface UP, part of OSPF Interfaces, but Neighborship not UP. So, we haven’t yet configured OSPF on the physical interface of PE2. We can see both Links as “Stub Network” links in the 2 router LSAs generated.

 

PE1#show ip ospf database router
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
LS age: 7
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 1.1.1.1
Advertising Router: 1.1.1.1
LS Seq Number: 8000000C
Checksum: 0x30CD
Length: 48
Number of Links: 2
Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Stub Network
(Link ID) Network/subnet number: 10.1.1.0
(Link Data) Network Mask: 255.255.255.0
Number of MTID metrics: 0
TOS 0 Metrics:

 

2. Now, I will configure OSPF on the link on PE2, and check for the Router LSA Link Type. Yes, it has now moved to a “Transit Network” as expected. Meanwhile, OSPF is in FULL state.

 

Link connected to: a Stub Network
(Link ID) Network/subnet number: 1.1.1.1
(Link Data) Network Mask: 255.255.255.255
Number of MTID metrics: 0
TOS 0 Metrics: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 10.1.1.1
(Link Data) Router Interface address: 10.1.1.1
Number of MTID metrics: 0
TOS 0 Metrics: 1

 

3. Now, I will move to network LSAs, the OSPF LSA Type-2, let us check what the Network LSA is with the exact above configuration. The Advertising Router is 1.1.1.1 as it is the DR in this case, which essentially means the DR generates the Network LSA. 1.1.1.1 and 2.2.2.2 are the “Attached” routers to this network which the DR represents with this particular Network LSA.

PE1#show ip ospf database network
OSPF Router with ID (1.1.1.1) (Process ID 1)
Net Link States (Area 0)
LS age: 788
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.1.1.1 (address of Designated Router)
Advertising Router: 1.1.1.1
LS Seq Number: 80000005
Checksum: 0x5CBC
Length: 32
Network Mask: /24
Attached Router: 1.1.1.1
Attached Router: 2.2.2.2

 

4. So, if we do not have a DR, do we have Network LSAs? Let us check that with changing the priority on both devices to 0. The command used on Cisco IOS is “ip ospf priority 0” on the connected Interface. There won’t be any DR/BDR election. So, the OSPF stays stuck in 2-Way as we had seen in this post of mine. The Network LSA doesn’t Max-Age and vanish, but we had to clear the OSPF process to make it vanish.

router and network lsa_for_post

 

PE1#show ip ospf neighbor
Neighbor ID     Pri   State           Dead Time   Address         Interface
2.2.2.2           0   2WAY/DROTHER    00:00:31    10.1.1.2        GigabitEthernet0/0/4
PE1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         14          0x80000012 0x0024D3 2

 

5. Now, I’ll remove the command from just PE2. The Network LSA returns but the Advertising Router is the new DR which is PE2 this time [2.2.2.2], considering it has a valid priority to participate in DR-election on its own.

PE1#show ip ospf database network
OSPF Router with ID (1.1.1.1) (Process ID 1)
Net Link States (Area 0)
LS age: 66
Options: (No TOS-capability, DC)
LS Type: Network Links
Link State ID: 10.1.1.2 (address of Designated Router)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x2CEB
Length: 32
Network Mask: /24
Attached Router: 2.2.2.2
Attached Router: 1.1.1.1

 

6. Now, I’ll add back priority [5 to make it DR] to router PE1, it will still stay as BDR as it won’t pre-empt the DR till the DR actually goes down. So, I’ll go ahead and clear OSPF process on PE2, so that PE1 becomes the DR again. Notice, how it Max-Ages the previous Network LSA before flushing it out and adding the new Network LSA (and Router LSA) generated by PE1 [new DR, 1.1.1.1]

 

PE1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         4           0x80000014 0x004D9B 2
2.2.2.2         2.2.2.2         3604        0x80000012 0x005785 2
Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
10.1.1.1        1.1.1.1         4           0x80000001 0x0064B8
10.1.1.2        2.2.2.2         3604        0x80000001 0x002CEB
PE1#show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         5           0x80000014 0x004D9B 2
2.2.2.2         2.2.2.2         6           0x80000013 0x003F9D 2
Net Link States (Area 0)
Link ID         ADV Router      Age         Seq#       Checksum
10.1.1.1        1.1.1.1         5           0x80000001 0x0064B8

 

Now, if we move the OSPF network type to point-to-point, we will drop the Network LSA yet again. Which makes it very clear that if we do not have a DR, we do not have a Network LSA.

I hope I have managed to educate you with a few basics of Router and Network LSA, please let me know if I have missed anything important. I’ll move to LSA Type 3 to 7 in my next post. Please do leave a comment if you have any doubts/queries or you wish to correct me in whatever I have explained.

Hope to hear back from you, Cheers!

~Adios