OSPF – What really triggers type-4 LSA origination?

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

  • 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.[1]
  • 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.

8 thoughts on “OSPF – What really triggers type-4 LSA origination?

  1. When you have NSSA area, an LSA4 generated before you have had any redistribution. Only for regular zone LSA4 are generates in moment when you press Enter after “redistribute connected subnets” string.
    Сlarification of this point is missing, both here and in your quiz.

  2. Still i am confused that actually who generates type 4 LSA and last point is still not clarified according the above discussion there are two different cases
    one is with NSSA and another is with redistribution
    In interview they asked me simply who generates type 4 LSA, I answered ABR generates.
    so please help me for this
    mail id vineet19870@gmail.com

    1. Hi Vineet,
      We should discuss here rather than over email, to allow more opinions and inputs.
      The ABR always generates the Type-4 LSA. Boris’ comment above clarified that there are two different triggers depending upon your area -type.
      1) Non-stub ASBR – Configure redistribute cmd on area-internal R1, R1 becomes ASBR, notifies ABR of new role, ABR generates type-4.
      2) ABR configured non-backbone area to NSSA-type.(not covered in this article). Because this ABR can now perform Type-7 to Type-5 translation, it regards itself as an ASBR, and set’s it’s E-bit. This router DOES NOT send a type-4 LSA. However the other Area 0 ABR-routers see this E-Bit, and they generate a Type-4 LSA to send into their connected non-backbone areas. Stretch has a great description of this scenario – http://packetlife.net/blog/2008/apr/21/where-are-type-4-lsas-generated/)

  3. Hello,
    I would like to add that LSA4 are re-originated by ABRs (the advertising router changes) :
    [eigrp] — [area 2] — [area 0] — [area 1]
    ABRs on area0 will re-originate LSA4 to area 1 (area 1 will see advertising router as area0 ABRs
    Regards

  4. Thanks John.
    You were absolutely at the point. Very well explained. It helped to resolve my query. I labed up the same scenario and results are as expected.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.