OSPF LSA Types

In this simple lab setup I will demonstrate OSPF LSA types. Area 40 and area 50 are connecting to the backbone area 0.

  • Area 40 is a regular area injecting routes redistributed from EIGRP process 1.
  • Area 50 is a Not So Stubby Area and is redistributing routes from another OSPF process 2.
OSPF%20lab.png
  • LSA Type 1: Router LSA.
  • LSA Type 2: Network LSA.
  • LSA Type 3: Summary LSA.
  • LSA Type 4: Summary ASBR LSA.
  • LSA Type 5: Autonomous system external LSA.
  • LSA Type 6: Multicast OSPF LSA.
  • LSA Type 7: Not-so-stubby area LSA.
  • LSA Type 8: External attribute LSA for BGP.

On R1, R2 and R3 are in a Broadcast network and R2 has a priority of 100 which makes it the DR. R3 has become the BDR because of the higher router-id.

Output 1.1

R2#show ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
1.1.1.1           1   FULL/DROTHER    00:00:37    10.0.123.1      Ethernet0/2
3.3.3.3           1   FULL/BDR        00:00:31    10.0.123.3      Ethernet0/2

R3#show ip ospf interface ethernet 0/3
Ethernet0/3 is up, line protocol is up 
  Internet Address 10.0.123.3/24, Area 0, Attached via Network Statement
  Process ID 1, Router ID 3.3.3.3, Network Type BROADCAST, Cost: 10
  Topology-MTID    Cost    Disabled    Shutdown      Topology Name
        0           10        no          no            Base
  Transmit Delay is 1 sec, State BDR, Priority 1
  Designated Router (ID) 2.2.2.2, Interface address 10.0.123.2
  Backup Designated router (ID) 3.3.3.3, Interface address 10.0.123.3
  Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
    oob-resync timeout 40
    Hello due in 00:00:03
  Supports Link-local Signaling (LLS)
  Cisco NSF helper support enabled
  IETF NSF helper support enabled
  Index 1/1, flood queue length 0
  Next 0x0(0)/0x0(0)
  Last flood scan length is 1, maximum is 1
  Last flood scan time is 0 msec, maximum is 0 msec
  Neighbor Count is 2, Adjacent neighbor count is 2 
    Adjacent with neighbor 1.1.1.1
    Adjacent with neighbor 2.2.2.2  (Designated Router)
  Suppress hello for 0 neighbor(s)

When we look at the routing table of R2, we see a number of routes learned through OSPF. Let's deep dive into understanding what each route means.

Output 1.2

R2#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 3 masks
O IA     10.0.14.0/24 [110/20] via 10.0.123.1, 00:53:14, Ethernet0/2
O IA     10.0.35.0/30 [110/20] via 10.0.123.3, 00:57:34, Ethernet0/2
      44.0.0.0/32 is subnetted, 1 subnets
O E2     44.44.44.44 [110/20] via 10.0.123.1, 00:45:20, Ethernet0/2
      55.0.0.0/32 is subnetted, 1 subnets
O E1     55.55.55.55 [110/21] via 10.0.123.3, 00:42:16, Ethernet0/2
  • 10.0.14.0/24 is learned from Area 40 which is a regular area and this is a type 3 LSA because of IA.
  • 10.0.35.0/30 is learned from Area 50
  • 44.44.44.44/32 is a loopback configured on R4 (ASBR) which is EIGRP and the route is redistributed into OSPF with the default metric-type 2.
  • 55.55.55.55/32 is a route learned through Area 50 which is a Not-so-stubby-area (NSSA), the route has been redistributed from an OSPF process 2 into process 1 with a metric-type 1 configured.

When we look at this route on R3 which is an ABR receiving this route from R5, this is what we see.

Output 1.3
R3#show ip route ospf
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
       a - application route
       + - replicated route, % - next hop override

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 5 subnets, 3 masks
O IA     10.0.14.0/24 [110/20] via 10.0.123.1, 00:51:15, Ethernet0/3
      44.0.0.0/32 is subnetted, 1 subnets
O E2     44.44.44.44 [110/20] via 10.0.123.1, 00:51:15, Ethernet0/3
      55.0.0.0/32 is subnetted, 1 subnets
O N1     55.55.55.55 [110/11] via 10.0.35.2, 00:49:03, Ethernet0/0

This route 55.55.55.55/32 is a Type-7 LSA route because Area 50 is configured as NSSA. On R3 we see this route as N2 but when the route is propagated within Area 0 it appears as a Type 5. As you may see from Output 1.2 above, the route is an E1 since it was redistributed with the metric-type 1.

Output 1.4
R3#
router ospf 1
 router-id 5.5.5.5
 area 50 nssa
 redistribute ospf 2 metric-type 1 subnets     ! Here you can see that OSPF 2 is redistributed into OSPF 1 with metric-type 1 and that area 50 is NSSA.
 network 10.0.35.0 0.0.0.3 area 50

Let's validate our findings with show ip ospf database topology.

R3#show ip ospf database topology 
 
            OSPF Router with ID (3.3.3.3) (Process ID 1)
 
                Base Topology (MTID 0)
 
                Router Link States (Area 0)       ! Type-1 Router LSA
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
1.1.1.1         1.1.1.1         447         0x80000007 0x00AC60 1
2.2.2.2         2.2.2.2         878         0x80000005 0x006F97 1
3.3.3.3         3.3.3.3         1935        0x80000007 0x0036C2 1
 
                Net Link States (Area 0)            ! Type-2 Network LSA
 
Link ID         ADV Router      Age         Seq#       Checksum
10.0.123.2      2.2.2.2         622         0x80000004 0x00BDCD
 
                Summary Net Link States (Area 0)    ! Type-3 Summary LSA
 
Link ID         ADV Router      Age         Seq#       Checksum
10.0.14.0       1.1.1.1         447         0x80000003 0x00AE66
10.0.35.0       3.3.3.3         947         0x80000003 0x007882
 
                Summary ASB Link States (Area 0)  ! Type-4 The external route originated from R4 when passed through R1 and received on R3. 
 
Link ID         ADV Router      Age         Seq#       Checksum
4.4.4.4         1.1.1.1         184         0x80000003 0x000517
 
                Router Link States (Area 50)          ! Type-1 from within Area 50
 
Link ID         ADV Router      Age         Seq#       Checksum Link count
3.3.3.3         3.3.3.3         1935        0x80000006 0x001E60 2
5.5.5.5         5.5.5.5         1905        0x80000006 0x004C2A 2
 
                Summary Net Link States (Area 50)   ! Type-3 from Area 50
 
Link ID         ADV Router      Age         Seq#       Checksum
10.0.14.0       3.3.3.3         1935        0x80000003 0x007C80
10.0.123.0      3.3.3.3         1935        0x80000003 0x006435
 
                Type-7 AS External Link States (Area 50)  ! Type-7 for the route redistributed from R5 OSPF process 2.
 
Link ID         ADV Router      Age         Seq#       Checksum Tag
55.55.55.55     5.5.5.5         1905        0x80000003 0x00DD2A 0
 
                Type-5 AS External Link States              ! Type-5 For the routes learned through ABRs.
 
Link ID         ADV Router      Age         Seq#       Checksum Tag
44.44.44.44     4.4.4.4         189         0x80000003 0x007B62 0
55.55.55.55     3.3.3.3         1935        0x80000003 0x00AE6B 0

Definitions from Cisco.com

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License