OSPF Type-4 LSA & The Forward-Address
[LEFT][CODE]http://blog.ipexpert.com/2009/11/04/ospf-type-4-lsa-the-forward-address-part-1/[/CODE]
[B][SIZE=3]
PART-1[/SIZE][/B]
Welcome back everybody! Today we will be taking a look at some more often misunderstood topics in the world of OSPF. Hopefully, by the end of this two part blog we will have a much clearer view of the dreaded Type-4 LSA. What exactly is it? Who actually generates it and why? Check out the diagram below to get a feel for what we will be working with tonight! In part 1 of this blog, we will take a look at the Type-4 LSA. In part 2 we will dig a bit deeper and look more closely at the forward-address and different situations where it may be altered.
[IMG]http://blog-dev.ipexpert.com/wp-content/uploads/2009/11/JOE331.png[/IMG]
We have a very basic setup here: OSPF running between three different areas, and mutual redistribution happening on R6, making it the ASBR. All routers in the topology have a loopback0 address of x.x.x.x where x is the router #. Additionally, R6 has the loopback66 interface 66.66.66.66 but that address is NOT being advertised into OSPF. Because 66.66.66.66 is the highest loopback address it is R6’s RID, but NOT a reachable IP address from any of the other routers.
Let’s talk about the ASBR and the type-4 LSA. This is a topic that seems to confuse many people. Doing a quick Google search will turn up plenty of results claiming that a type-4 LSA is generated by the ASBR. This is simply not true. The type-4 LSA is generated by an ABR. The purpose of it is simply to inform other areas of next-hop information for the ASBR. In other words, it is injected into other areas by the ABR so that routers in other areas know how to get to external routes through the ASBR. Let’s take a look at this on our equipment here. R6 is the ASBR because it is redistributing into OSPF. As you can see below, NO Type-4 LSA is injected into area 56 – there would be no reason for it. Any routers that receive external routes inside of area 56 already know how to get to the ASBR because it is inside of area 56. R5 for instance knows how to get to the ASBR because it already has a Type-1 LSA for R6 within area 56. It knows all about RID 66.66.66.66. On the other hand, a Type-4 LSA is indeed injected into the backbone and into area 12 by their respective ABRs. Why? When routers inside area 0 or area 12 receive an external Type-5 LSA, the advertising router information for that external route is going to point to the RID of the ASBR, R6 (66.66.66.66). A router inside of area 0 or area 1 like R1 has no idea how to get to that RID, so it needs the Type-4 LSA to tell it how.
R5 has an O E2 route to 7.7.7.7 redistributed in to OSPF from RIP…
[CODE]R5#sh ip route ospf | i 7.7.7.7
O E2 7.7.7.7 [110/20] via 56.56.56.6, 00:32:28, FastEthernet0/0[/CODE] Notice that there is no asbr-summary LSA (Type-4) in Area 56…only Area 0. Additionally, notice that the advertising router of the Type-4 LSA being injected into area 0 is R5, the ABR and NOT R6 the ASBR.
[CODE]R5#sh ip ospf database asbr-summary
OSPF Router with ID (5.5.5.5) (Process ID 1)
[COLOR=Red] Summary ASB Link States (Area 0)[/COLOR]
LS age: 1962
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: [COLOR=Red]66.66.66.66 (AS Boundary Router address)[/COLOR]
Advertising Router: [COLOR=Red]5.5.5.5[/COLOR]
LS Seq Number: 80000001
Checksum: 0x717
Length: 28
Network Mask: /0
TOS: 0 Metric: 1[/CODE] Now take a look at things from R1’s perspective…
[CODE]R1#sh ip route ospf | i 7.7.7.7
O E2 7.7.7.7 [110/20] via 12.12.12.2, 00:47:02, FastEthernet0/0
R1#sh ip ospf data external 7.7.7.7
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 1627
Options: (No TOS-capability, DC)
LS Type: AS External Link
[COLOR=Red]Link State ID: 7.7.7.7 (External Network Number )
Advertising Router: 66.66.66.66[/COLOR]
LS Seq Number: 80000002
Checksum: 0xDE9B
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
[COLOR=Red] Forward Address: 0.0.0.0[/COLOR]
External Route Tag: 0[/CODE]So the advertising router is R6, the ASBR. Without the Type-4 LSA we would not know how to get to that router…Type-4 LSA to the rescue…
[CODE]R1#sh ip ospf data asbr-summary
OSPF Router with ID (1.1.1.1) (Process ID 1)
Summary ASB Link States (Area 12)
Routing Bit Set on this LSA
LS age: 875
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
[COLOR=Red] Link State ID: 66.66.66.66 (AS Boundary Router address)
Advertising Router: 12.12.12.2[/COLOR]
LS Seq Number: 80000002
Checksum: 0xF0D9
Length: 28
Network Mask: /0
TOS: 0 Metric: 65
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
[COLOR=Red] Forward Address: 0.0.0.0[/COLOR]
External Route Tag: 0[/CODE]The route we wish to get to from R1 (7.7.7.7) is being advertised from the ASBR with RID 66.66.66.66. The Type-4 LSA tells us how to get to that 66.66.66.66 RID. Notice again that the advertising router of the Type-4 LSA is indeed the Area 12 ABR R2. The forward address is set to 0.0.0.0. This may seem a bit concerning but it is normal. The forward address being 0.0.0.0 just means that the next-hop of that LSA is the router that originated it. In this case, the advertising router for the Type-4 LSA is R2 with address 12.12.12.2. We know how to get to 12.12.12.2 so everything is fine!
The entire idea of the Type-4 LSA brings up another interesting point. Would I have it in a stub area? How about a totally stubby area? What about an NSSA or totally stubby NSSA? Well, let’s think about it. What was the point of the Type-4 LSA? To tell us reachability information for external routes right? Stub areas by definition do not allow Type-5 external LSAs. Therefore, there would be not purpose to have a Type-4 LSA injected into the area. If we can’t receive external routes, why would we need information about how to get to the originator of those external routes? We can see this by modifying the above topology slightly. Let’s make area 12 a stub area and see what happens.
[CODE]R1(config)#router ospf 1
R1(config-router)#area 12 stub
R1(config-router)#
*Sep 29 20:12:35.695: %OSPF-5-ADJCHG: Process 1, Nbr 12.12.12.2 on FastEthernet0/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R1(config-router)#
*Sep 29 20:12:51.143: %OSPF-5-ADJCHG: Process 1, Nbr 12.12.12.2 on FastEthernet0/0 from LOADING to FULL, Loading Done
R2(config)#router ospf 1
R2(config-router)#area 12 stub
R2(config-router)#
*Sep 29 20:17:34.135: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet1/0 from FULL to DOWN, Neighbor Down: Adjacency forced to reset
R2(config-router)#
*Sep 29 20:17:37.015: %OSPF-5-ADJCHG: Process 1, Nbr 1.1.1.1 on FastEthernet1/0 from LOADING to FULL, Loading Done
R1#sh ip route 7.7.7.7
[COLOR=Red]% Network not in table[/COLOR]
R1#sh ip ospf database asbr-summary
OSPF Router with ID (1.1.1.1) (Process ID 1)[/CODE]Nada…zilch, nothing, YOU LOSE SIR! YOU GET NOTHING! As we can see above, changing area 12 to a stub area causes both the external route to 7.7.7.7 and the Type-4 LSA to disappear completely. It only makes sense…a stub area does not allow external routes. Because we do not allow any external routes, we have no need for next-hop reachability information for those routes.
Hopefully this article has helped some people out there better understand the Type-4 LSA. Keep in mind, everything done in this blog post was done without any kind of Not-So-Stubby-Areas configured. When configuring NSSA, things can change due to the Type-7 / Type-5 LSA conversion done on the ABR as well as how exactly the ASBR decides to set its forward-address which depends on certain variables. We will take a look at that in part 2 : ) Until next time…keep studying hard!
–
[B]Joe Astorino CCIE #24347 (R&S)
Sr. Technical Instructor – IPexpert[/B]
[/LEFT]