OSPF Network LSA (Type 2 LSA)
OSPF network LSAs (or type 2 LSA) are generated for NBMA (non broadcast multiaccess) and transit broadcast networks that resides in an area. As a transit broadcast network could serve an Ethernet network where two or more routers are connected via ethernet links and share the same broadcast domain like in the picture below.
In the picture you see an OSPF network, where there is a broadcast domain, which consists of R2 with R1 and ABR connected through a ethernet switch. Unlike router LSAs, which are generated by every router, network LSAs (type 2 LSAs) are generated only by DR (Designated Router) for the multiaccess network. In current topology, ABR router, is at the same time Designated Router (because of highest router id – 4.4.4.4) for ethernet segment between R1-R2-ABR, so, ABR is in charge for generating type 2 LSA to represent this multiaccess network in area 0. Let’s have a look at some output from “show ip ospf database
“:
R1#sh ip ospf database OSPF Router with ID (1.1.1.1) (Process ID 1) Router Link States (Area 0) ... ouptut omitted ... Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 10.0.0.1 4.4.4.4 1420 0x80000001 0x00E11D
R3#sh ip ospf database OSPF Router with ID (3.3.3.3) (Process ID 1) Router Link States (Area 0) ... output omitted ... Net Link States (Area 0) Link ID ADV Router Age Seq# Checksum 10.0.0.1 4.4.4.4 1463 0x80000001 0x00E11D
R5#sh ip ospf database OSPF Router with ID (5.5.5.5) (Process ID 1) Router Link States (Area 1) Link ID ADV Router Age Seq# Checksum Link count 4.4.4.4 4.4.4.4 1527 0x80000001 0x00F365 2 5.5.5.5 5.5.5.5 1521 0x80000002 0x008EC5 2 Summary Net Link States (Area 1) Link ID ADV Router Age Seq# Checksum 10.0.0.0 4.4.4.4 1512 0x80000002 0x00F027 10.0.1.0 4.4.4.4 1522 0x80000001 0x00F3F0 10.0.3.0 4.4.4.4 1512 0x80000002 0x004097 R5#
In the outputs above, highlighted in orange you see network LSAs on R1 and R3. Advertising router is ABR in this case, which has router id 4.4.4.4. The Link-State ID used by network LSA is the IP address of the DR which you can see in the excerpts above.
Type 2 LSAs are flooded within area, but they don’t leave the area in which they are generated which you might have noticed in the output from router R5. For a detailed view of network LSAs use “sh ip ospf database network
” or one of its variations by providing link-state id or advertising router-id.
R3#sh ip ospf database network OSPF Router with ID (3.3.3.3) (Process ID 1) Net Link States (Area 0) Routing Bit Set on this LSA LS age: 207 Options: (No TOS-capability, DC) LS Type: Network Links Link State ID: 10.0.0.1 (address of Designated Router) Advertising Router: 4.4.4.4 LS Seq Number: 80000003 Checksum: 0xDD1F Length: 36 Network Mask: /24 Attached Router: 4.4.4.4 Attached Router: 1.1.1.1 Attached Router: 2.2.2.2 R3#
From this view you can get precious information like attached routers and subnet mask. One more variation of this command that I would pay attention to, is “show ip ospf database network self-originate
“. When you issue this command on a router, you will get network LSA generated by the router itself.
