Configuring prefix suppression
By default, an OSPF interface advertises all of its prefixes in LSAs. To speed up OSPF convergence, you can suppress interfaces from advertising all of their prefixes. This feature helps improve network security by preventing IP routing to the suppressed networks.
When prefix suppression is enabled:
On P2P and P2MP networks, OSPF does not advertise Type-3 links in Type-1 LSAs. Other routing information can still be advertised to ensure traffic forwarding.
On broadcast and NBMA networks, the DR generates Type-2 LSAs with a mask length of 32 to suppress network routes. Other routing information can still be advertised to ensure traffic forwarding. If no neighbors exist, the DR does not advertise the primary IP addresses of interfaces in Type-1 LSAs.
![]() | IMPORTANT: As a best practice, configure prefix suppression on all OSPF routers if you want to use prefix suppression. | |
Configuring prefix suppression for an OSPF process
Enabling prefix suppression for an OSPF process does not suppress the prefixes of secondary IP addresses, loopback interfaces, and passive interfaces. To suppress the prefixes of loopback interfaces and passive interfaces, enable prefix suppression on the interfaces.
To configure prefix suppression for an OSPF process:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter OSPF view. | ospf [ process-id | router-id router-id | vpn-instance vpn-instance-name ] * | N/A |
3. Enable prefix suppression for the OSPF process. | prefix-suppression | By default, prefix suppression is disabled for an OSPF process. |
Configuring prefix suppression for an interface
Interface prefix suppression does not suppress prefixes of secondary IP addresses.
To configure interface prefix suppression:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Enter interface view. | interface interface-type interface-number | N/A |
3. Enable prefix suppression for the interface. | ospf prefix-suppression [ disable ] | By default, prefix suppression is disabled on an interface. |