OSPF NSSA P-bit Explained

This topic is to discuss the following lesson:

Hi Rene,

I know that Type 5 external routes are not normally allowed in a NSSA area, but is there a method by which they can be converted into Type 3/Type 7 so that they can be allowed in the area? Route summarization? I’m stumped.

Thanks.

Hi M,

Hmm not that I know of, if you use any of the stub area types then it’s bye bye LSA type 5. There are no options that I know of that let you convert LSA types (with the exception of LSA type 5 > 7 done by ASBRs within the NSSA area).

Rene

great explanation -
another trick you could do on R2 & R3 is to suppress the FA - say you filtered the 192.168.45.0 0.0.0.255 network into area 0 via an area filter command on R2 & R3 you could then subsequently on R2 & R3 do the following. (in doing area filtering of the 45.x network into area 0 - R1 will not be able to recurse to the 5.5.5.5 network and thus not install 5.5.5.5 in the RIB) to fix this you could then do this on the ABR’s
R2 & R3

ip prefix-list AREA_1_ROUTES deny 192.168.45.5/32
ip prefix-list AREA_1_ROUTES permit 0.0.0.0/0 le 32

router ospf 1

area 1 filter-list prefix AREA_1_ROUTES out     
area 1 nssa translate type7 suppress-fa     

adding the always keyword to that command on either router would force a router to always do the translation and thus it would be in both the control & data plane for the 5.5.5.5. traffic from R1. The FA is then suppressed from the advertisement and R1 could correctly recurse to the 5.5.5.5 network via R2 or R3 directly.

great post.
thanks
Ray.

Hi Rene,

In regards to:
<h3>OSPF NSSA ASBR and ABR</h3>
You say: “When an OSPF NSSA router is both ASBR and ABR then it can flood LSA type 7 or LSA type 5 directly in another area. For this reason, the P-bit will be disabled on type 7 LSAs.”

I feel i am missing something here.

When you make R2 both ABR and ASBR by redistributing R2’s loopback , you say the conversion from 7 to 5 does not happen.

But Still R1 gets the type 5 for the loopback from R2?

I mean, if the P bit is not set, then how can this redistributed loopback on R2 make it to R1 as a type5?

What i have seen after labing this up is that on R2, after the redistribution of its loopback, there is a Type 5 and a Type 7 LSA in R2’s database for its loopback.

Does this then mean that R2 just sends out the type5 it has to R1 and the type 7 to R4 (because its NSSA)for instance?

Lots of questions sorry for this! :slight_smile:

Great posts as always!

Hi Edwin,

In case anyone else reads this, we are talking about this post right:

You are correct. In this example, R2 will create a LSA type 5 directly which R1 can learn and a LSA type 7 that R4 will learn. There’s no need to create a LSA type 7 and then translate it into a type 5, that’s why the P-bit is disabled.

Rene

Hi Rene,

thanks for clearing that out :wink:

Hi Rene,

great article on the N/P bit explanation.

one question on the forwarding address significance. why is this required. FA is part of both type 5 and type 7 LSAs right.

for reaching the ASBR we already have the type 4 LSA. why do we need to FA. and how will the routers in other areas know how to reach the FA

Thanks,

Praveen

 

Hi Praveen,

The OSPF forward address is only used in special situations. I’ll have to create another lesson to explain this well, i’ll do this soon.

Rene

 

Hi Rene,

Can you please explain “nssa translate supress-sa” command as well, why we use it ?

Pradeep,
I assume you mean the following command
translate type7 suppress-fa

To answer this question, you first need to understand how a Type-5 External advertisement changes when it is translated by an NSSA ABR. When an LSA Type-7 to Type-5 translation occurs (only an NSSA ABR can do this), two properties change: 1) The advertising router and 2) The Forwarding Address.

Regular Type 5 LSA
In a regular (not translated) Type-5 LSA, the Advertising router is the ASBR itself, and the Forwarding Address is 0.0.0.0

Regular Type 5 LSA

LS Type: AS External Link
  Link State ID: 172.16.16.0 (External Network Number )
  Advertising Router: 2.2.2.2
  LS Seq Number: 80000001
  Checksum: 0x9985
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 0.0.0.0

Type 7 to Type 5 Converted LSA
When an NSSA ABR converts from Type 7 to Type 5, it changes the Advertising Router to be the NSSA ABR that made the conversion, and it changes the Forwarding Address to be the ASBR (where the external route originated).

Here is the exact same scenario, but all that changes was the Area where the external route came from was converted to NSSA. Notice the change in the Advertising Router and the Forward Address

LS Type: AS External Link
  Link State ID: 172.16.16.0 (External Network Number )
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000001
  Checksum: 0x1CD0
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 10.1.25.2

Ok, let’s talk about why this change might matter. In order for OSPF to install a Type-5 route, the Forwarding Address must also be learned via OSPF. This is a key point. It isn’t good enough that an OSPF router knows how to get to the Forwarding Address–it must know how to get to it via OSPF.

Suppose, in the example above that a router is also running EIGRP, and it has a route to “10.1.25.2” via EIGRP. What would happen to the route for 172.16.16.0/24 assuming this is known only via OSPF? It wouldn’t be installed in the RIB! Why? Because the Forwarding Address would be installed in the RIB via EIGRP–since EIGRP has a better Administrative Distance.

This is an example of where “suppress-fa” might be useful. This command stops the NSSA ABR from making the change to the Forwarding Address. By changing the FA from 10.1.25.2 back to 0.0.0.0, OSPF is now allowed to install the 172.16.16.0/24 route into the RIB.

Below is the output for the same scenario, except this time I issued this command on the NSSA ABR
area 25 nssa translate type7 suppress-fa

LS Type: AS External Link
  Link State ID: 172.16.16.0 (External Network Number )
  Advertising Router: 5.5.5.5
  LS Seq Number: 80000002
  Checksum: 0x3DD4
  Length: 36
  Network Mask: /24
        Metric Type: 2 (Larger than any link state path)
        MTID: 0 
        Metric: 20 
        Forward Address: 0.0.0.0

Notice that the Advertising Router remains at 5.5.5.5, but the FA has changed back to 0.0.0.0

Thanks Rene.

Can you please explain about OSPF V,B & E bit as well ?

Hi Aniket,
Those bits are found in a Type 1 LSA, and their purpose is as follows:

V: Indicates that LSA is from an endpoint of a Virtual Link (a special kind of ABR).
B: Indicates the LSA is from an Area Border Router (ABR)
E: Indicates the LSA is from an Autonomous System Boundary Router (ASBR)

Hi Rene

Under section “OSPF Forward Address Filtering” , you used “distribute list in” on R2 and R3 and you mentioned “And R1 will never be able to learn it:”.

My understanding was “distribute-list in” will only prevent the routes from populating in the routing table , it will not prevent OSPF routers from advertising LSAs.
Is it also going to stop R2 and R3 from advertising LSA (192.168.45.0/24) to R1?

Hi Aniruddh,

Because of this filter, R2 and R3 will not install 192.168.45.0/24 in their routing tables. The LSDB has to remain the same within the area so no changes are made to the LSDB.

Since R2/R3 don’t know how to reach the forwarding address, they don’t advertise 5.5.5.5 to R1.

R1 does know how to reach 192.168.45.0/24, this is not filtered.

Rene

Hi Rene, The “P” bit now has a spot where the “NP” was in Wireshark, on the top of the section it’s actually called Propagate. Just an FYI

Great Practice Site, I passed my CCIE Route Switch two months ago…

Mike

1 Like

Hi Rene,

Will the forwarding address be changed when ABR summarize the external route to other areas?

I thought Forwarding Address will be always ASBR address and Advertising router field will be changed.

But below point confused me.

To reach 5.5.5.5/32 we have to use forward address 192.168.45.5. R1 will use both R2 and R3 to reach this network:

R1#show ip route 5.5.5.5
Routing entry for 5.5.5.5/32
  Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 3
  Last update from 192.168.13.3 on FastEthernet0/1, 00:00:22 ago
  Routing Descriptor Blocks:
    192.168.13.3, from 222.222.222.222, 00:00:22 ago, via FastEthernet0/1
      Route metric is 20, traffic share count is 1
  * 192.168.12.2, from 222.222.222.222, 00:00:22 ago, via FastEthernet0/0
      Route metric is 20, traffic share count is 1

Regards,
Siji

Hello Siji

If you look at the output of the following command on both R2 and R3:

show ip ospf database nssa-external 5.5.5.5

you will see that the forward address is indeed the ASBR address for both routers.

From the point of view of R1, which is in another area, the routing entry for 5.5.5.5/32 is learned from both ABRs, the last update according to the above output, coming from R3. Both R2 and R3 are possible paths to the ultimate destination. If you were to issue the show ip ospf database command on R1, you should also see the forwarding address of 192.168.45.5 for that particular destination, however, the advertising router is the ABR.

Some additional helpful information about how the forwarding address is selected can be found here:

I hope this has been helpful!

Laz

hi,

Although advertising router is 192.168.234.3, how can R1 learn 4.4.4.4 from both of the R2 and R3? Why does not it learn only from R3?

R1#show ip route ospf | begin 4.4.4.4
O E2     4.4.4.4 [110/20] via 192.168.13.3, 00:38:49, FastEthernet0/1
                 [110/20] via 192.168.12.2, 00:38:49, FastEthernet0/0

R1#show ip ospf database external

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

                Type-5 AS External Link States

  Routing Bit Set on this LSA in topology Base with MTID 0
  LS age: 1346
  Options: (No TOS-capability, DC)
  LS Type: AS External Link
  Link State ID: 4.4.4.4 (External Network Number )
  Advertising Router: 192.168.234.3
  LS Seq Number: 80000001
  Checksum: 0xFAE5
  Length: 36
  Network Mask: /32
        Metric Type: 2 (Larger than any link state path)
        MTID: 0
        Metric: 20
        Forward Address: 192.168.234.4
        External Route Tag: 0

regards,

Hello Murat

R1 will receive a Type5 LSA from both R2 and R3. This is why you see that both routes are in the routing table, since OSFP employs equal cost load balancing by default. Now the advertising router ID you see in the database is that of the last and most updated LSA type 5 that has been received. Even though the route was updated at the same time (to the second accuracy) according to the output of the routing table, one of the two routers will have sent their update a split second earlier. Thus, the advertising router in the database indicates the router from which the last advertisement was sent.

I hope this has been helpful!

Laz