Use the passive-interface router configuration mode command to prevent the transmission of routing messages through a router interface, but still allow that network to be advertised to other routers, as shown in Figure 1. Specifically, the command stops routing messages from being sent out the specified interface. However, the network that the specified interface belongs to is still advertised in routing messages that are sent out other interfaces.
For instance, there is no need for R1, R2, and R3 to forward OSPF messages out of their LAN interfaces. The configuration identifies the R1 G0/0 interface as passive.
It is important to know that a neighbor adjacency cannot be formed over a passive interface. This is because link-state packets cannot be sent or acknowledged.
The show ip protocols command is then used to verify that the Gigabit Ethernet interface was passive, as shown in Figure 2. Notice that the G0/0 interface is now listed under the Passive Interface(s) section. The network 172.16.1.0 is still listed under Routing for Networks, which means that this network is still included as a route entry in OSPF updates that are sent to R2 and R3.
Note: OSPFv2 and OSPFv3 both support the passive-interface command.
Use the Syntax Checker in Figure 3 to configure the LAN interface as a passive interface on R2.
As an alternative, all interfaces can be made passive using the passive-interface default command. Interfaces that should not be passive can be re-enabled using the no passive-interface command.
Continue using the Syntax Checker in Figure 3 and configure the LAN interface as a passive interface on R3.
Note: While completing the syntax checker, notice the OSPF informational state messages as the interfaces are all rendered passive and then the two serial interfaces are made non-passive.