成长值: 64940
|
简介
使用passive-interface命令为了控制路由信息的通告。该命令可以通过某些接口启用路由更新抑制,同时还允许通过其他接口正常交换更新。
与大多数路由协议结合使用时,passive-interface 命令只会限制传出的广播。但是,当使用与增强的内部网关路由选择协议(EIGRP),效果是有些不同的。本文档演示如何在 EIGRP 中使用 passive-interface 命令抑制两个路由器之间的 Hello 数据包交换,从而破坏它们的相邻关系。这不仅会停止正在广播的路由更新,还会抑制传入的路由更新。本文档还讨论了允许抑制传出路由更新且同时还允许从邻居获知传入路由更新所需的配置。
passive interface 命令
EIGRP 在网络上运行时,由于 passive-interface 命令致使路由器在接口上停止发送和接收 hello 信息包,进而影响到路由器停止流出和流入路由的更新。
这是debug eigrp packet Hello输出示例:与passive-interface命令不已配置的Serial0的:
R1#debug eigrp packet hello
EIGRP Packets debugging is on
(HELLO)
R1#
Nov 20 08:07:33.131: EIGRP: Sending HELLO on Serial0
Nov 20 08:07:33.135: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
Nov 20 08:07:35.327: EIGRP: Received HELLO on Serial0 nbr 192.168.1.1
Nov 20 08:07:35.331: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
您可以看到 hello 数据包正在双向交换。这是show ip eigrp neighbors的输出。
R1#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
0 192.168.1.1 Se0 13 00:24:47 1 3000 0 1
注意: 接口发送并且接收hello,并且两路由器是邻居。
在passive-interface命令为Serial0后,配置这是debug输出示例。
R1(config)#router eigrp 1
R1(config-router)#passive-interface serial 0
R1# debug eigrp packet hello
EIGRP Packets debugging is on
(HELLO)
注意: 因为没有显示输出,EIGRP 不仅会抑制出站 hello 数据包,而且还会忽略入站 hello 数据包。两个路由器不再是邻居。这是show ip eigrp neighbors的输出,在您输入passive-interface命令后。
R1#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
EIGRP 中使用 passive-interface 命令时,路由器不能在接口上形成邻接关系,或发送/接收路由更新。但是,如果希望单独流出的路由更新被抑制,但是入站更新继续接收(和路由器仍然继续是邻居),然后使用distribute-list命令:
R1(config)#access-list 20 deny any
R1(config)#router eigrp 1
R1(config-router)#no passive-interface serial 0
R1(config-router)#distribute-list 20 out serial 0
这是输出show ip eigrp neighbors命令,在您使用distribute-list命令后:
R1#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
0 192.168.1.1 Se0 14 00:01:31 1 3000 0 3R1#
可以看到,路由器现在是邻居了。此示例允许 serial 0 上的 R1 及其邻居之间形成相邻关系。R1 继续从其邻居接收路由更新,但是 distribute-list 阻止在 serial 0 外部广播路由。
|
|