Default Passive Interface

Problem

You want to disable RIP on all of a router’s interfaces, except for a few that you specify.

Solution

You can disable the sending of RIP updates on all interfaces with the passive-interface default command:

Router1#configure terminal
Enter configuration commands, one per line.  End with CNTL/Z.
Router1(config)#router rip
Router1(config-router)#passive-interface default
Router1(config-router)#no passive-interface FastEthernet0/0.1
Router1(config-router)#network 172.22.0.0
Router1(config-router)#network 172.25.0.0
Router1(config-router)#network 192.168.1.0
Router1(config-router)#exit
Router1(config)#end
Router1#

Discussion

The RIP network command has two functions. The first function tells RIP which routing prefixes to distribute. The second turns on RIP updates on all interfaces whose addresses are included in the range specified by the network command. Sometimes you want to send routing information for a subnet, but you don’t want to actually run RIP on the corresponding interface, as we described in Recipe 6.6. If there are interfaces that you don’t want to send RIP updates, you can individually disable them by using the passive-interface command, as we did in Recipe 6.6. But sometimes you don’t want interfaces to take part in RIP unless you explicitly enable them, even if they happen to have addresses that are covered by a network command.

This is mostly used as a convenience on routers that have a lot of interfaces, particularly when only a few of those ...

Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.