menu

OSPF NSSA P-bit

Which path does the router use to reach a redistributed?

In the topology we see an ASBR doing mutual redistribution between BGP and OSPF. It is connected to two areas, one normal area and one no-so-stubby-area. The question in the task is which path does the bottommost router use to reach a route redistributed into OSPF from BGP. That this is some kind of trap is obvoius. What happens to a redistributed route when traversing those areas in this topology?

At first glance we would probably think that the route originating from BGP would propagate both ways to the router, and that the question is wether the path through NSSA or normal area is preferred. The answer is actually much simpler than that, as long as we have all the background info. The answer, believe it or not, is found in the RFC for NSSA https://www.ietf.org/rfc/rfc3101.txt

“When an NSSA border router originates both a Type-5 LSA and a Type-7 LSA for the same network, then the P-bit must be clear in the Type-7 LSA so that it isn’t translated into a Type-5 LSA by another NSSA border router. If the border router only originates a Type-7 LSA, it may set the P-bit so that the network may be aggregated/propagated during Type-7 translation….”

This means that in this topology the route is never advertised all the way to Router via the NSSA path. 

It actually makes sense, since the ASBR creates both a LSA5 for the Area200 and a LSA7 for the Not-so-stubby Area100 for the same prefix, it wouldnt be clever to translate the same prefix making it look like its originating in ABR1 aswell. That would have caused the OSPF database for area0 look like ASBR and ABR1 were border routers for the external route from the backbone area.

Here’s another picture showing what actually happens

When the ASBR creates LSA for both areas 100 and 200, it would create both LSA7 for the NSSA area of course and also a type5 LSA, in this particular case the p-bit would be cleared for the LSA7. Making the ABR1 unable to translate this LSA from 5–>7.

Here’s how the output would have looked like at the ASBR if we would have typed the command “show ip ospf database nssa-external self-originate”:

P-BIT = propagate bit, means translate/do not translate.

One Reply to “OSPF NSSA P-bit”

  1. Freddy Keith says:

    Hello, I read your blog post related to helpful topic for me. I understand easily with your simple way. Thanks for sharing this article.

Leave a Reply

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