4.2.2被动接口
应用了被动接口能让某些接口侦听RIP广播更新,从而更新路由表。路由器并不在被动接口上响应收到的请求消息
 
TOPnet文件、配置信息、抓包信息都放在附件里面了
 
实验
可以看下抓包和debug信息
 
 
注意:这里的没有rip消息是没有rip的广播消息
 
Andy#
Andy#
Andy#
Andy#debug ip rip
RIP protocol debugging is on
Andy#
*Apr 12 11:10:12.059: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (172.17.1.1)
*Apr 12 11:10:12.059: RIP: build update entries
*Apr 12 11:10:12.063:   network 10.0.0.0 metric 2
*Apr 12 11:10:12.063:   subnet 172.17.2.0 metric 1
*Apr 12 11:10:12.063:   subnet 172.17.4.0 metric 2
*Apr 12 11:10:12.063:   network 192.168.12.0 metric 1
*Apr 12 11:10:12.063:   network 192.168.83.0 metric 1
*Apr 12 11:10:12.063:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:10:15.567: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (172.17.2.1)
*Apr 12 11:10:15.567: RIP: build update entries
*Apr 12 11:10:15.571:   network 10.0.0.0 metric 2
*Apr 12 11:10:15.571:   subnet 172.17.1.0 metric 1
*Apr 12 11:10:15.571:   subnet 172.17.3.0 metric 2
*Apr 12 11:10:15.575:   network 192.168.12.0 metric 1
*Apr 12 11:10:15.575:   network 192.168.83.0 metric 1
*Apr 12 11:10:15.579:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:10:24.803: RIP: received v1 update from 192.168.83.244 on FastEthernet0/0
*Apr 12 11:10:24.807:      10.0.0.0 in 1 hops
Andy#
*Apr 12 11:10:26.699: RIP: received v1 update from 192.168.12.66 on FastEthernet0/1
*Apr 12 11:10:26.703:      192.168.100.0 in 1 hops
Andy#
*Apr 12 11:10:30.115: RIP: received v1 update from 172.17.1.2 on Serial1/0
*Apr 12 11:10:30.119:      172.17.3.0 in 1 hops
Andy#
*Apr 12 11:10:31.307: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (192.168.83.1)
*Apr 12 11:10:31.307: RIP: build update entries
*Apr 12 11:10:31.311:   network 172.17.0.0 metric 1
*Apr 12 11:10:31.311:   network 192.168.12.0 metric 1
*Apr 12 11:10:31.315:   network 192.168.100.0 metric 2
*Apr 12 11:10:31.911: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.12.65)
*Apr 12 11:10:31.911: RIP: build update entries
*Apr 12 11:10:31.915:   network 10.0.0.0 metric 2
*Apr 12 11:10:31.915:   network 172.17.0.0 metric 1
*Apr 12 11:10:31.915:   subnet 192.168.12.192 metric 1
*Apr 12 11:10:31.919:   network 192.168.83.0 metric 1
Andy#
*Apr 12 11:10:32.603: RIP: received v1 update from 172.17.2.2 on Serial1/1
*Apr 12 11:10:32.607:      172.17.4.0 in 1 hops
Andy#
*Apr 12 11:10:38.451: RIP: sending v1 update to 255.255.255.255 via Loopback0 (192.168.12.195)
*Apr 12 11:10:38.451: RIP: build update entries
*Apr 12 11:10:38.455:   network 10.0.0.0 metric 2
*Apr 12 11:10:38.455:   network 172.17.0.0 metric 1
*Apr 12 11:10:38.455:   subnet 192.168.12.64 metric 1
*Apr 12 11:10:38.459:   network 192.168.83.0 metric 1
*Apr 12 11:10:38.459:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:10:41.335: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (172.17.1.1)
*Apr 12 11:10:41.335: RIP: build update entries
*Apr 12 11:10:41.339:   network 10.0.0.0 metric 2
*Apr 12 11:10:41.339:   subnet 172.17.2.0 metric 1
*Apr 12 11:10:41.339:   subnet 172.17.4.0 metric 2
*Apr 12 11:10:41.343:   network 192.168.12.0 metric 1
*Apr 12 11:10:41.343:   network 192.168.83.0 metric 1
*Apr 12 11:10:41.343:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:10:43.547: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (172.17.2.1)
*Apr 12 11:10:43.547: RIP: build update entries
*Apr 12 11:10:43.551:   network 10.0.0.0 metric 2
*Apr 12 11:10:43.551:   subnet 172.17.1.0 metric 1
*Apr 12 11:10:43.551:   subnet 172.17.3.0 metric 2
*Apr 12 11:10:43.555:   network 192.168.12.0 metric 1
*Apr 12 11:10:43.555:   network 192.168.83.0 metric 1
*Apr 12 11:10:43.559:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:10:51.959: RIP: received v1 update from 192.168.83.244 on FastEthernet0/0
*Apr 12 11:10:51.963:      10.0.0.0 in 1 hops
Andy#
Andy#un all
All possible debugging has been turned off
Andy#
 
Andy的抓包
 
 
Floyd的抓包
 
配置被动接口
Andy上配置
Andy(config)#router rip
Andy(config-router)#passive-interface fastEthernet 0/1
 
再次debug
ndy#
Andy#
Andy#debug ip rip
RIP protocol debugging is on
Andy#
*Apr 12 11:28:54.579: RIP: received v1 update from 192.168.12.66 on FastEthernet0/1
*Apr 12 11:28:54.579:      192.168.100.0 in 1 hops
Andy#
*Apr 12 11:28:57.827: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (172.17.2.1)
*Apr 12 11:28:57.827: RIP: build update entries
*Apr 12 11:28:57.831:   network 10.0.0.0 metric 2
*Apr 12 11:28:57.831:   subnet 172.17.1.0 metric 1
*Apr 12 11:28:57.831:   subnet 172.17.3.0 metric 2
*Apr 12 11:28:57.835:   network 192.168.12.0 metric 1
*Apr 12 11:28:57.835:   network 192.168.83.0 metric 1
*Apr 12 11:28:57.835:   network 192.168.100.0 metric 2
*Apr 12 11:28:57.947: RIP: received v1 update from 172.17.2.2 on Serial1/1
*Apr 12 11:28:57.947:      172.17.4.0 in 1 hops
Andy#
*Apr 12 11:29:00.799: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/0 (192.168.83.1)
*Apr 12 11:29:00.799: RIP: build update entries
*Apr 12 11:29:00.803:   network 172.17.0.0 metric 1
*Apr 12 11:29:00.803:   network 192.168.12.0 metric 1
*Apr 12 11:29:00.807:   network 192.168.100.0 metric 2
*Apr 12 11:29:01.679: RIP: received v1 update from 192.168.83.244 on FastEthernet0/0
*Apr 12 11:29:01.683:      10.0.0.0 in 1 hops
Andy#
*Apr 12 11:29:02.119: RIP: sending v1 update to 255.255.255.255 via Loopback0 (192.168.12.195)
*Apr 12 11:29:02.119: RIP: build update entries
*Apr 12 11:29:02.123:   network 10.0.0.0 metric 2
*Apr 12 11:29:02.123:   network 172.17.0.0 metric 1
*Apr 12 11:29:02.123:   subnet 192.168.12.64 metric 1
*Apr 12 11:29:02.127:   network 192.168.83.0 metric 1
*Apr 12 11:29:02.127:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:29:03.679: RIP: received v1 update from 172.17.1.2 on Serial1/0
*Apr 12 11:29:03.683:      172.17.3.0 in 1 hops
Andy#
*Apr 12 11:29:06.799: RIP: sending v1 update to 255.255.255.255 via Serial1/0 (172.17.1.1)
*Apr 12 11:29:06.799: RIP: build update entries
*Apr 12 11:29:06.803:   network 10.0.0.0 metric 2
*Apr 12 11:29:06.803:   subnet 172.17.2.0 metric 1
*Apr 12 11:29:06.803:   subnet 172.17.4.0 metric 2
*Apr 12 11:29:06.807:   network 192.168.12.0 metric 1
*Apr 12 11:29:06.807:   network 192.168.83.0 metric 1
*Apr 12 11:29:06.811:   network 192.168.100.0 metric 2
Andy#
*Apr 12 11:29:21.827: RIP: received v1 update from 192.168.12.66 on FastEthernet0/1
*Apr 12 11:29:21.831:      192.168.100.0 in 1 hops
Andy#
*Apr 12 11:29:24.551: RIP: sending v1 update to 255.255.255.255 via Serial1/1 (172.17.2.1)
*Apr 12 11:29:24.551: RIP: build update entries
*Apr 12 11:29:24.555:   network 10.0.0.0 metric 2
*Apr 12 11:29:24.555:   subnet 172.17.1.0 metric 1
*Apr 12 11:29:24.555:   subnet 172.17.3.0 metric 2
*Apr 12 11:29:24.559:   network 192.168.12.0 metric 1
*Apr 12 11:29:24.559:   network 192.168.83.0 metric 1
*Apr 12 11:29:24.563:   network 192.168.100.0 metric 2
Andy#un all
All possible debugging has been turned off
 
再也没有这个消息了
*Apr 12 11:10:31.911: RIP: sending v1 update to 255.255.255.255 via FastEthernet0/1 (192.168.12.65)没有发送的消息在F0/1上,他只是在接受消息,不再发送消息。
查看配置了被动接口的抓包信息
R2 f0/1
 
 
R5 f0/1
 
看到没有你已经看不到192.168.1.65所发出的信息了
 
这个时候你会发现除了Andy其他路由器都ping不通192.168.100.1
因为Andy F0/1不发送更新于是大家就都不知道192.168.100.1这个应该怎么走了。。。
 
命令passive-interface不是RIP协议专有的命令,它可以在所有的IP路由选择协议中配置使用。