NetworkSherpa

OSPF – What really triggers type-4 LSA origination?

It is a common myth that OSPF ABR generates a type-4 ASBR summary ‘when it sees a type-5’ from an ASBR. The ABR does generate the type-4, but it isn’t the type-5 that triggers the ABR to originate it. I’ve setup a quick lab in GNS3 to help track down the true trigger.

Baseline Topology

Below is the simplified network diagram;

R2 is the ABR and is a neighbour of R1 and R3 respectively.  R1 will eventually become our ASBR, but for now it has a regular OSPF non-backbone internal router role.

R1#sh running-config | b r ospf
router ospf 1
  router-id 1.1.1.1
  log-adjacency-changes
  network 0.0.0.0 255.255.255.255 area 5

Let’s quickly look at R3’s LSDB. As expected there’s no type-4 or type-5 in its database.

R3#sh ip ospf database external
OSPF Router with ID (3.3.3.3) (Process ID 1)
R3#sh ip ospf database asbr-summary
OSPF Router with ID (3.3.3.3) (Process ID 1)
R3#

In GNS3 I did a wireshark capture of R2’s interface to R1 in area 5. I cleared the OSPF adjacency and captured the type-1 router LSA originated by R1 to describe itself. This is our baseline type-1 for R1, which describes itself as ‘not an ASBR’.

Redistribution of phantom statics

I want to test my theory by removing type-5 and then checking if the ABR still generates the type-4.  But how do you make R1 perform the ASBR without actually generating type-5’s?

On a Cisco router you configure an empty ‘redistribute static subnets’ under OSPF with no static routes configured.

R1#sh run | include ip route
R1#conf t
R1(config)#router ospf 1
R1(config-router)#redistribute static subnets
R1(config-router)#end
R1#

Let us re-examine R3’s LSDB.  It looks like R2 has just generated a type-4, but there are no type-5 in the database.  So we can conclude that the ABR does not generate a type-4 because it saw a type-5.

R3#sh ip ospf database external
OSPF Router with ID (3.3.3.3) (Process ID 1)
R3#sh ip ospf database asbr-summary
OSPF Router with ID (3.3.3.3) (Process ID 1)
Summary ASB Link States (Area 0)
Routing Bit Set on this LSA
LS age: 361
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 1.1.1.1 (AS Boundary Router address)
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x1B14
Length: 28
Network Mask: /0
TOS: 0 Metric: 1

What happened?

When I performed the redistribute command on R1, the role of R1 changed to an ASBR. That triggered a new type-1 LSA with the Bit-E set to signal that it is now an ASBR.

When R2 processed this update, it generated a type-4 for the newly visible ASBR.

Type-5 LSAs can be advertised and withdrawn by the ASBR, but the type-4 will be advertised for as long as the ABR sees that E-bit on R1’s Router LSA.

Sherpa Summary