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.
Below is the simplified network diagram;
All three routers are configured as neighbors and R2 is the ABR. 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 184.108.40.206 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 (220.127.116.11) (Process ID 1) R3#sh ip ospf database asbr-summary OSPF Router with ID (18.104.22.168) (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 descibes itself as ‘not as 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#
Now let’s have a look at R3’s LSDB again. 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 (22.214.171.124) (Process ID 1) R3#sh ip ospf database asbr-summary OSPF Router with ID (126.96.36.199) (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: 188.8.131.52 (AS Boundary Router address) Advertising Router: 184.108.40.206 LS Seq Number: 80000001 Checksum: 0x1B14 Length: 28 Network Mask: /0 TOS: 0 Metric: 1
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 as ASBR. When R2 process this update, it generates 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.
- The arrival of a type-5 at an ABR does not trigger the generation of type-4.
- A redistribute statement is enough to change add ASBR to the role of the redistributing OSPF router.
- The ASBR status is reflected in an updated router-LSA with the flag E-bit set.
- When the updated router LSA is processed by the ABR for that ASBR, that triggers the generation of a type-4 into the backbone for the newly recognised ASBR.
- Note: The E-bit is appears in multiple fields within OSPF. It is also used in the router LSA Options field (as opposed to Flags) to signal the router is capable of receiving externals (non-stub). It is also used in an External LSA, where the LSA sub- type is E2 if the E-bit is set.
- Tests were performed using 12.4(22)T5 on a 7200 in GNS3. Your mileage may vary.