Showing results for 
Search instead for 
Did you mean: 
Masoud Pourshabanian

Hello everyone,

In this document, I am going to present how prefix suppression in a WAN topology with many transit links can reduce the size of the routing table. In a WAN topology with many routers and almost full-mesh, there will be many transit links. From a router perspective, having routes for all the transit links is unnecessary. A router just needs to know the next hop to be able to forward the packets as opposed to having entries for all the transit links. In MPLS VPN environment, this feature is more applicable since only loopbacks of PE routers are used as the nexthops.

First , I will demonstrate the result of applying this feature and then I will explain how OSPF achieves that. I am using the following topology for my presentation.

In R1 routing table,, and are seen; however, R1 only needs to know the loopbak address of R2 and R3 and also stub networks behind them if any.

I should mention, I have configured OSPF on all 3 routers and all interfaces are in area 0. Lets see R1 routing table.

As shown, R1 has entries for all transit links. In a WAN environment, transit links are never used so R1 does not need to receive those entries.

OSPF prefix suppression can be apply globally or under each interface. If it is applied under each interface, only prefix under that interface will be suppressed.

here you see how OSPF suppression is applied globally or under each interface.

Router OSPF 1

prefix suppression

interface x/x

ip ospf  prefix suppression.

In the following picture, you see how prefix suppression can be applied globally or under the interfaces. I applied the commands on the R2 and R3 since I wanted to suppress transit links between R2 and R3.

In the following picture, you see the routing table on R1 after applying prefix suppression globally on R2 and R3. Now, only R1 just have entries for loopback interfaces as well as its local links( and loopback)

Lets see what changes OSPF make to suppress the transit links. There are two cases. First, the network type of transit links is broadcast. In this case, R1 receives two LSA types. LSA type 1 from R2 and R3. By LSA type 1, each router advertises its own links. LSA type 2 is advertised by DR.

I am showing the result only for subnet. It is the same for all other transit subnets too. In my case, R2 is a DR. R2 advertises and its subnet mask as well as which routers are connected to this links.

If you pay attention, you see the subnet mask for this link is 24. Lets apply prefix suppression and check the topology table on R1 again.

Now you see the change after applying the command on R2 and R3. DR(R2) now advertises with the subnet mask of 32. R1 now knows that it should not install that subnet in the routing table because suppression has been applied.

Case 2 is for OSPF point to point network type. In point to point network type, there is no LSA type 2 generated so OSPF is relying on LSA type 1. Lets see the OSPF database for on R1 before applying the prefix suppression feature. I applied IP ospf network type point to point on R2 and R3 under transit interfaces.

The following picture shows the output of "show ip ospf database" on R1.

R1 receives LSA type 1 from R2. There are two entries for point-to-point links. First, the ip address on the link and its neighbor and second the subnet and subnet mask of the link. ( just output for is shown)

Now you can guess how OSPF can suppress point to point links.

The following picture shows the output of show IP ospf database on R1

Now, if you check the difference, you notice that the second entries for the point to point links do not exist anymore. It means that R2 and R3 do not advertise the second entries. Since R1 do not have subnet mask for transit links, it does not install the subnets in the routing table.

You may ask why R2 and R3 are not suppressing those link completely. The answer is simple. OSPF needs to receive LSAs for all the link to be able to create shortest path tree and calculate metric.

Just to mention, the behavior in OSPF v3 is different because more LSAs were introduced in V3.

Please rate if it was helpful for you. Wish you the best.



Hi @Masoud Pourshabanian , thanks for this post. What if you try to enable prefix-suppression globally under ospf process, but there are interfaces VLAN declared as passive... It seems that you still need to go directly to those specific interfaces and enable prefix-suppression again, any thoughts?


Thanks in advance, and have a great day.


Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Quick Links