OSPF Type-4 LSA & The Forward-Address Part 1

By Joe Astorino on Wednesday, November 4, 2009 11:19

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.

JOE33

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…

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

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.

R5#sh ip ospf database asbr-summary

OSPF Router with ID (5.5.5.5) (Process ID 1)

Summary ASB Link States (Area 0)

LS age: 1962

Options: (No TOS-capability, DC, Upward)

LS Type: Summary Links(AS Boundary Router)

Link State ID: 66.66.66.66 (AS Boundary Router address)

Advertising Router: 5.5.5.5

LS Seq Number: 80000001

Checksum: 0×717

Length: 28

Network Mask: /0

TOS: 0 Metric: 1

Now take a look at things from R1’s perspective…

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

Link State ID: 7.7.7.7 (External Network Number )

Advertising Router: 66.66.66.66

LS Seq Number: 80000002

Checksum: 0xDE9B

Length: 36

Network Mask: /32

Metric Type: 2 (Larger than any link state path)

TOS: 0

Metric: 20

Forward Address: 0.0.0.0

External Route Tag: 0

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…

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)

Link State ID: 66.66.66.66 (AS Boundary Router address)

Advertising Router: 12.12.12.2

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

Forward Address: 0.0.0.0

External Route Tag: 0

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.

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

% Network not in table

R1#sh ip ospf database asbr-summary

OSPF Router with ID (1.1.1.1) (Process ID 1)

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!

Joe Astorino CCIE #24347 (R&S)
Sr. Technical Instructor – IPexpert
Mailto: jastorino@ipexpert.com
Telephone: +1.810.326.1444
Live Assistance, Please visit: www.ipexpert.com/chat
eFax: +1.810.454.0130

Share and Enjoy:
  • Facebook
  • Digg
  • del.icio.us
  • MySpace
  • Furl
  • NewsVine
  • Reddit
  • Slashdot
  • Technorati
  • LinkedIn
  • TwitThis
  • StumbleUpon
  • Netvibes
  • Pownce
  • Blogosphere News
  • Blogsvine
  • email
  • Google Bookmarks
  • Live
  • Tumblr
  • Wikio IT
  • Yahoo! Buzz
You can leave a response, or trackback from your own site.

6 Responses to “OSPF Type-4 LSA & The Forward-Address Part 1”

  1. Metoo says:

    November 4th, 2009 at 1:25 pm

    Joe,

    Does changing area 56 from a standard area to an NSSA or totally NSSA change this behavior or will all 3 area types still generate the type 5 and type 4 LSAs?

  2. Joe Astorino says:

    November 4th, 2009 at 10:39 pm

    Hey Metoo,

    The ABR is ALWAYS responsible for injecting in the type-4 LSA. As far as the type-5 LSAs go, in the case of area 56 being a regular old area, R6 is generating the type-5 LSA which is why we need the type-4 LSA to begin with…so other areas outside of area 56 know how to get to R6.

    In the case of area 56 being a NSSA when R6 redistributes the routes, it will send type-7 LSAs inside area 56. The ABR between area 56 and area 0 would then convert the type-7 to a type-5 and inject it into the backbone. At that point the ABR is also becoming an ASBR since it is injecting external type-5 LSAs. The type-4 LSA will still be necessary in some places, but not in others. Since R5 is injecting the routes at that point, the advertising router filed in the LSA will be set to R5. Everybody in area 0 already knows how to get to R5 so they don’t need a Type-4 LSA. However, R2 (the ABR between area 0 and area 1) will indeed inject a type-4 LSA into area 1 so that R1 will know how to get to R5.

    Some other things change as well with NSSA. Keep following the blog, we will get into some gory details of WHAT changes in part 2 : )

  3. CCIEStudyWiki.com Links of the Week: OSPF LSAs, SSM, ODR, WLANs says:

    November 6th, 2009 at 12:22 pm

    [...] must-read article describing the OSPF Type 4 LSA from Joe of IP [...]

  4. Salman says:

    November 10th, 2009 at 4:02 am

    What are the further changes in NSSA and also elaborate with example of Totally NSSA

    Regards,
    Salman

  5. rakesh says:

    November 11th, 2009 at 5:00 am

    good article .. this question was hanging in my head for a while now ?

    thank you

    will follow your next article

  6. Joe Astorino says:

    November 14th, 2009 at 12:20 am

    Salman,

    Your questions are answered in part II of the blog posted above : )

Leave a Reply