RIPv2 – How to Exclude One Subnet

ciscocisco-commandscisco-iosriprouting

As I understand, when no auto-summary command is used, the network command could include all the interface with IP addresses included in the classful network border defined by the network command. For example:

interface FastEthernet0/0
 ip address 10.1.1.1 255.255.255.0

interface FastEthernet0/1
 ip address 10.2.2.1 255.255.255.0

interface FastEthernet1/0
 ip address 172.16.1.1 255.255.255.0

router rip
 version 2
 no auto-summary
 network 10.0.0.0

This RIPv2 will include both FE0/0 and FE0/1. If I just want FE0/0 to be included but not FE0/1, is it possible? Thanks in advance.

Best Answer

That depends on what you mean by included. You can use the passive-interface command to prevent that interface from sending RIP advertisements, or you can use a distribute list to filter advertised prefixes.


Chapter: IP Routing Protocol-Independent Commands: accept-lifetime Through passive-interface:

passive-interface

To disable sending routing updates on an interface, use the passive-interface command in router configuration mode. To reenable the sending of routing updates, use the no form of this command.

passive-interface [default] {interface-type interface-number}

no passive-interface interface-type interface-number


Chapter: RIP Commands:

distribute-list out (RIP, IGRP, EIGRP)

To suppress networks from being advertised in updates, use the distribute-list out command in address family or router configuration mode. To disable this function, use the no form of this command.

distribute-list {access-list-number | prefix prefix-list-name [gateway prefix-list-name]} out [interface-name | routing-process | as-number]

no distribute-list {access-list-number | prefix prefix-list-name [gateway prefix-list-name]} out [interface-name | routing-process | as-number]