Understanding OSPF Type-4 LSA
The OSPF Type-4 LSA is perhaps most misunderstood subject with honors to OSPF for folks that are just or halfway learning the protocol. I was going through one of the blog which explain the same OSPF Type-4 LSA & in comments one of the individual asked that “How ABR will come to know that when to generate Type-4 LSA ?”
Interesting question & then I decided to illuminate more on this & also we will take a look at OSPF Type-4 LSA.
Below is our topology that we will be using for demonstration:-
We will check the following concept in OSPF:-
- Who will generate Type-4 LSA ABR or ASBR?
- When & Why ABR Generate Type-4 LSA or How ABR will come to know about ASBR presence?
Let’s see what is Type-4 LSA?
“Type-4 LSA - This is the ASBR Summary LSA this basically identifies the ASBR of a specific area (note that inside the area where the ASBR is this LSA will not exist, instead the type-1 LSA will be used in order to announce the ASBR of the area). Who is the ASBR of the area? The type-4 LSA is there in order to answer this question, so this is injected by the ABR in order to announce the presence of the ASBR in a particular area.”
The above statement is very clear & gives all answer that we’re looking for, one of the perfect statement for OSPF type-4 LSA.
Below statement from RFC 2328:-
12.1.5. Advertising Router
This field specifies the OSPF Router ID of the LSA's
originator. For router-LSAs, this field is identical to the
Link State ID field. Network-LSAs are originated by the
network's Designated Router. Summary-LSAs originated by
area border routers. AS-external-LSAs are originated by AS
RFC 2328 clearly state that the Summary LSA is generated by ABR (Area Border Router), so now question comes here that when ABR will generate Type-4 LSA or How ABR will know the presence of ASBR?
Let’s LAB it and find out the answers:-
R2 output: -
Here we can see that R2 is configured with Area 10 & R2 see R1 as ABR.
Here we can see that R3 is configured with Area 0 & R3 see R1 as ABR, Also we had configured EIGRP between R3 & R4 but redistribution has not configured.
What we can see here:
- Src : 192.168.1.1 & Dest : 126.96.36.199
- Source OSPF Router ID : 188.8.131.52
- Area ID : 10
- LS Type : Summary LSA
- Link state advertisement type : Summary LSA ASBR (4)
- Link State ID : 184.108.40.206 (This is ASBR router ID which was advertised by ABR in Type 4 LSA)
- Advertising Router : 220.127.116.11 ( R1 is advertising R3 Router ID as ASBR)
So here you can see that Type-4 LSA is generated by ABR, Now next question is How ABR come to know that R3 is ASBR? Is there any LSA get exchanged between ABR & ASBR? Let’s find out …
Packet capture between R1 & R3: -
What we can see here:
- Src : 192.168.2.3 & Dst : 18.104.22.168 ( Type-1 LSA was generated by R3 towards R1)
- Flags : E – AS boundary Router ( Here you get your answer : R3 generate Type-1 LSA with E-bit towards R1 stating that “I am AS boundary router” )
So let's what we got :
When we redistribute any routing protocol in OSPF domain then that router will generate Type-1 LSA and inform all routers within an area that “I am AS boundary Router” with Flag - E bit on . So the ABR will come to know that we have ASBR & then ABR will generate Type-4 LSA towards other areas which are connected to ABR.