neighbor (RIP)
neighbor
filter-num
{
permit
|
deny
}
{
any
|
ip-address
}
no neighbor
filter-num
{ permit
|
deny
}
{
any
|
ip-address
}
Initially, by default, the device learns all RIP routes from all neighbors and advertises all routes to all neighbors. Once you have defined a filter that permits learning from a RIP neighbor, the default changes so that the device denies all other RIP neighbors except those specified.
RIP router configuration mode
The
no form of the command deactivates the filter.
You may require more than one filter to obtain the results you want. For example, if you create a filter to allow or deny a specific IP address, you must create additional filters to allow route learning and advertisement for any other IP addresses.
To avoid conflicting actions, give the filter with the highest priority the highest filter number. Typically, you would add the priority filter last. For example, If you want to deny only one IP address, you must create a second filter with a higher number (priority) to allow any others.
The following example configures the RIP router so that no RIP routes are learned or advertised for any neighbor.
device# configure terminal device(config)# router rip device(config-rip-router)# neighbor 1 deny any
The following example configures the RIP router to learn and advertise routes for all neighbors except neighboring IP address 10.70.12.104. Note the second filter is required and must have a higher filter number.
device# configure terminal device(config)# router rip device(config-rip-router)# neighbor 2 deny 10.70.12.104 device(config-rip-router)# neighbor 64 permit any