eigrp的配置(1)的基础上再在r3上添加一个3.3.3.0网段,用以进行被动接口的测试,拓扑图与IP地址的分配依然不变:
r2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r2(config)#router eigrp 100
r2(config-router)#passive-interface s1/1 //s1/1配置成被动接口
r2(config-router)#
r3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
r3(config)#int loopback 0
r3(config-if)#ip addr 3.3.3.3 255.255.255.0
r3(config-if)#exit
r3(config)#router eigrp 100
r3(config-router)#network 3.3.3.0 0.0.0.255
r3(config-router)#^Z
r3#
接下来验证:
r1#sh ip route ////没有了网段3.3.3.0的路由信息,原因:r2的接口s1/1是被动接口,它不接收3.3.3.0路由信息
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback0
D 192.1.1.0/24 [90/2681856] via 148.1.1.2, 00:44:49, Serial1/0
148.1.0.0/24 is subnetted, 1 subnets
C 148.1.1.0 is directly connected, Serial1/0
r3#sh ip route //没有了网段1.1.1.0的路由信息,原因:r2的接口s1/1是被动接口,它不转发1.1.1.0路由信息
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
3.0.0.0/24 is subnetted, 1 subnets
C 3.3.3.0 is directly connected, Loopback0
C 192.1.1.0/24 is directly connected, Serial1/0
从上面的信息可以看出,eigrp的被动接口不收也不发(rip的被动接口只收不发)