Open In App

Configuring OSPF Passive Interface in Cisco

Last Updated : 04 Nov, 2022
Improve
Improve
Like Article
Like
Save
Share
Report

Pre-requisite: What is Passive-Interface Command Behavior in RIP, EIGRP & OSPF?

Configuring an interface as a passive interface in and OSPF domain causes OSPF to stop sending Hellos on that specified interface. OSPF will continue to advertise the subnet’s passive interface as a stub network.  The interface should only be configured as a passive interface that does not have an OSPF router/MLS connected to them so that they (connected to a non-OSPF router/MLS or end hosts) won’t receive any OSPF information. OSPF passive interface thus reduces the OSPF protocol’s routing load on the CPU by minimizing the number of interfaces with which it must interact. The passive interface still listens for the OSPF hello packets but doesn’t originate/propagate them.

OSPF Passive Interface Configuration:

Router OSPF subcommand

Description

Examples

passive-interface <interface interface-id> Configure the passive-interface on a single or a couple of interfaces individually Router(config)#router ospf <process-id>
Router(config-router)#passive-interface <interface interface-id>
passive-interface default configure all interfaces to be passive interfaces, leaving a single or a couple 
of interfaces as a non-passive interface
Router(config)#router ospf <process-id>
Router(config-router)#passive-interface default
Router(config-router)#no passive-interface <interface interface-id>

Configuring OSPF Passive Interface:

Step 1: Create 2 router topologies in GNS3 as shown in the image below :

OSPF Passive Interface

 

Step 2: Configure the IPv4 address on the physical interface on the routers :

R1(config)#interface FastEthernet0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#interface FastEthernet1/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R2(config)#interface FastEthernet0/0
R2(config-if)#ip address 10.0.0.2 255.255.255.0
R2(config-if)#no shutdown

Step 3: Configure a loopback interface on R2 with an IPv4 address :

R2(config)#interface Loopback0
R2(config-if)#ip address 2.2.2.2 255.255.255.255

Step 4: Configure the IPv4 address and default gateway on the VPCS :

PC1> ip 192.168.1.2 /24 192.168.1.1
OSPF Passive Interface Configuration

 

Step 5: Configuring the OSPF process on both routers with the command router OSPF <process-id> :

R1(config)#router ospf 1
R1(config-router)#exit
R2(config)#router ospf 1
R2(config-router)#exit

Step 6: Enabling OSPF on the interfaces with the interface level subcommand ip ospf <process-id> area <area-id> :

R1(config)#interface FastEthernet0/0
R1(config-if)#ip ospf 1 area 0
R1(config-if)#interface FastEthernet1/0
R1(config-if)#ip ospf 1 area 0
R2(config)#interface FastEthernet0/0
R2(config-if)#ip ospf 1 area 0
R2(config-if)#interface Loopback0
R2(config-if)#ip ospf 1 area 0

Step 7: Checking the IPv4 routing table on the routers and see the OSPF route entry :

R1#show ip route

 

R2#show ip route

 

Step 8: Configure R1’s LAN interface (FastEthernet1/0) as a passive interface as it is not connected to an OSPF router/MLS and hence doesn’t need to propagate OSPF information to VPCS :

R1(config)#router ospf 1
R1(config-router)#passive-interface fastethernet1/0 
R1(config-router)#exit

Step 9: Verifying passive-interface configuration with the show command, show IP OSPF interface :

 

Step 10: Verify connectivity throughout the topology : 

PC1> ping 2.2.2.2 
PC1> ping 10.0.0.1
PC1> ping 10.0.0.2

 

R1#ping 2.2.2.2

 

R2#ping 192.168.1.1
R2#ping 192.168.1.2

 

Step 11: Debugging OSPF hello messages in R1 as R1 will now only send hello packets through its FastEthernet0/0 (WAN) interface :

R1#debug ip ospf hello

 

To Turn Off Debugging:

R1#no debug ip ospf hello  

Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads