OSPF Prefix Suppression

This topic is to discuss the following lesson:

Hi Rene

Could you clarify the differences between this and OSPFv3 Prefix Suppression?

I believe the main difference is that type 8’s and 9’s are suppressed rather than type 1 or 2’s.

Are stub’s advertised as /128’s?

Also how does OSPF detect that a prefix is part of a transit network?

Hi @chrisnewnham17,

In OSPFv3, there is no prefix information in LSA type 1 and 2 anymore, you can find those in LSA type 8 and 9 so yes, OSPFv3 prefix suppression removes it from LSA type 8 and 9.

About the prefix / transit network. Here’s a quick example with three routers connected like this:

R1-R2-R3

All routers are in area 0 and R3 is the DR:

R3#show ipv6 ospf database prefix self-originate  

            OSPFv3 Router with ID (3.3.3.3) (Process ID 1)

                Intra Area Prefix Link States (Area 0)

  LS age: 8
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 0
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0x7834
  Length: 52
  Referenced LSA Type: 2001
  Referenced Link State ID: 0
  Referenced Advertising Router: 3.3.3.3
  Number of Prefixes: 1
  Prefix Address: 2001:DB8:3333:3333::3
  Prefix Length: 128, Options: LA, Metric: 0

  LS age: 1729
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 3072
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0x16FD
  Length: 44
  Referenced LSA Type: 2002
  Referenced Link State ID: 3
  Referenced Advertising Router: 3.3.3.3
  Number of Prefixes: 1
  Prefix Address: 2001:23:23:23::
  Prefix Length: 64, Options: None, Metric: 0

Above you can see the referenced LSA type:

* 2001: Associated with the router
* 2002: Associated with the Network LSA

The 2001:23:23:23:: prefix is configured on an Ethernet network, thus it shows up with LSA type 2002. You can also see the link state ID (3) of the advertising router (R3 our DR).

R3#show ipv6 ospf database network self-originate 

            OSPFv3 Router with ID (3.3.3.3) (Process ID 1)

                Net Link States (Area 0)

  LS age: 426
  Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
  LS Type: Network Links
  Link State ID: 3 (Interface ID of Designated Router)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0x41A3
  Length: 32
        Attached Router: 3.3.3.3
        Attached Router: 2.2.2.2

About the stub, you mean a stub network? Loopbacks are advertised with a /128, similar to how OSPFv2 advertises them as a /32 by default.

Hi Rene ,
Can explain a bit about how the how ospf detect transit links when performing ospf prefix suppression . Also, you are mentioning that /32 link is considered an invalid link in the lsdb.In such case why aren’ t the Loopback networks considered invalid when prefix suppression is enabled? These are also /32 links.

Regards,
Ruwan

Hello Ruwan

There are two types of LSAs that we have to deal with in this lesson: The Router LSA, that is a type 1 LSA that contains prefix information about the 192.168.30.0/24 network, and the Network LSA< that is a type 2 LSA that contains prefix information about the 192.168.123.0/24 subnet.

If you notice, in each of the LSAs described, the only networks that have a prefix other than /32 are the transit networks, so if you suppress prefixes, the transit networks will be removed.

A subnet mask of /32 on a multi-access network is not possible because then it would not be a multi-access network. So if an OSPF router sees this, it knows that prefix suppression has been applied. It is not invalid in the sense that it cannot exist in the database.

I hope this has been helpful!

Laz

Hi Rene,
Wouldn’t a normal network which isn’t the loopback interface also be suppressed as it is count as another stub network?

Hello Nitay

This is an excellent question. Yes, even though network 3.3.3.3 is considered a stub network in the LSDB it is not removed by the prefix suppression feature. However, the 192.168.34.0 network which is also indicated as a stub network in the LSDB is removed.

The difference between the two is that 192.168.34.0 is also indicated as a point to point network with a neighboring router ID of 4.4.4.4 and a next hop ID of 192.168.34.3. So the router knows that although the network itself is configured as a stub network when viewed as a destination, it is also part of a point to point network. The loopback network 3.3.3.3 which is a stub network does not have a corresponding point to point component, thus, it is not removed.

It is only stub networks that appear in the LSDB that are part of a point to point network that are removed since they are never used as a destination by user traffic.

I hope this has been helpful!

Laz

Thanks you very much,

That was realy helpful but I have another question:

how would R3 advertise his Network LSA to R4?
From the lesson’s statement it says

“The prefix isn’t advertised directly in LSA type 2 but with the IP address of the DR and the subnet mask, the router can calculate what prefix we are using (192.168.123.0/24).”

but there is also a statement which says that the Network LSA will do be advertised so maybe I didn’t understand that right, could you explain me what the quote meant to say?

Hello Nitay

In this statement, Rene is saying that the Network LSA is indeed being advertised, however, the information it is advertising (the 192.168.123.0/24 prefix) is contained within the actual IP address of the DR and its subnet mask. From the IP address and subnet mask, the router calculates the prefix being used. So the Network LSA is being advertised.

I hope this has been helpful!

Laz

Hi, is there any show command to see all the suppressed routes in the OSPF area “in the OSPF database”? for example I have area 225 that contains 30 routers, and I do (OSPF suppression in all the transit links) but when I want to connect a new link, I want to make sure to configure a new IP address. How to check that a new IP address is not used in this area?
[without OSPF suppression, I can ping the IP address, if I don’t get reply then, I know that this IP address is not used in this area].

Thanks in advance

Hello Mohanad

I am not familiar with a way to do this, where you can simply display the suppressed routes in an area. You will have to know a little more about the topology being used in order to determine which routes are suppressed and which are not. One way to do this may be to remove suppression, check the OSPF database of one router (to get the map of the whole area) and then turn on suppression again, and check the OSPF database once again, and compare the differences.

In any case, if you are choosing IP addresses for additional infrastructure to your network, you still need to create a well documented record of address space usage which is vital for determining your addresses. Even if this is a network that you have inherited from someone else, developing such documentation is vital.

I hope this has been helpful!

Laz

Hi Laz,

for LSA Type 1 I understand how the switch detects if it is a transit network. But how does the switch detect if a broadcast network with LSA Type 2 is a pure transit network or if there are other devices connected in the subnet?

Thanks a lot.

Regards,

Lukas

Hello Lukas

This is something that you as a network engineer must determine. If you don’t have any hosts connected to that broadcast domain, and you have only OSPF routers, then you would enable prefix suppression and the operation would function correctly for both Type 1 and Type 2 LSAs. By definition, such a scenario would make that broadcast domain a transit network.

If you have hosts on that network however, then that network is no longer considered a transit network, and it must be advertised normally throughout all of the OSPF domain.

I hope this has been helpful!

Laz

1 Like

Hi Laz,

thanks for your reply. If you enable prefix suppression globally, is it automatically enabled for all SVIs or are only physical interfaces affected?

Regards,
Lukas

Hello Lukas

Prefix suppression is enabled on a per OSPF process basis. Any networks participating in that OSPF process, and thus any interfaces associated with those networks, will have the prefix suppression applied, including both physical interfaces as well as SVIs.

I hope this has been helpful!

Laz

1 Like

Hi Laz,
thanks, now I understand how it works. :slight_smile:
Lukas

1 Like

Hi,
Can you please explain the concept of a Stub Network in LSA-Type-1. I really dont understand this.
Thanks

Hello Abdul

For a deeper understanding of the OSPF stub network, take a look at this lesson:

Now the idea in this particular topology is that R3 and R4 don’t need to advertise the 192.168.34.0/24 network using OSPF. This is because, as a stub network, there is only one path that all packets can take to reach the networks on either end. For this reason, using prefix suppression, this network is not shared with other OSPF routers.

I hope this has been helpful!

Laz

Hello Laz ,

can you please explain me how the Prefix 192.168.123.0 have been removed from The routing table of Router R4 after Prefix Suppression ?
as I Think , R3 is DR and it will only advertise this Prefix as Network LSA inside The multi-access Segment (to R1,R2 ) . If we look at The Content of R3 LSBD for Router LSA there is no Change for The Router LSA for Network 192.168.123.0 After enabling of Prefix Suppression ,

Link connected to: a Transit Network
     (Link ID) Designated Router address: 192.168.123.3
     (Link Data) Router Interface address: 192.168.123.3
      Number of MTID metrics: 0
       TOS 0 Metrics: 1.

Thank you in Advanced.

Hello Mohammad

Yes, R3 is the DR, however, and it will use a Type 2 LSA to advertise prefixes within the multi-access segment, however, it will still use a Type 1 LSA to advertise any learned networks with R4. Remember, R3 is DR only for the multi-access segment. ON the point to point segment between R3 and R4, there is no DR/BDR.

So before prefix suppression is applied, R3 will send a Type 1 LSA containing the 192.168.123.0/24 network.

Now how is this suppressed? Well, as a Type 2 (Network) LSA of R3, the network mask has been changed from /24 to /32. As Rene states in the lesson:

The network mask has changed from /24 to /32. A subnet mask of /32 on a multi-access network is impossible, so when an OSPF router that supports prefix suppression sees this, it knows that this LSA doesn’t have any prefix information.

Therefore, the prefix is suppressed and not shared with R4.

I hope this has been helpful!

Laz