实验拓扑图
实验过程
1. R1的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R1 R1(config)#int lo0 R1(config-if)#ip add 172.16.1.1 255.255.255.0 R1(config-if)#exit R1(config)#int lo1 R1(config-if)#ip add 172.16.2.1 255.255.255.0 R1(config-if)#exit R1(config)#int s0/0 R1(config-if)#no shut R1(config-if)#ip add 172.16.255.1 255.255.255.252 R1(config-if)#exit |
2.R2的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R2 R2(config)#int s0/0 R2(config-if)#no shut R2(config-if)#ip add 172.16.255.2 255.255.255.252 R2(config-if)#exit R2(config)#int s0/1 R2(config-if)#no shut R2(config-if)#ip add 192.168.255.2 255.255.255.0 R2(config-if)#exit |
3.R3的预配置
Router>en Router#config t Enter configuration commands, one per line. End with CNTL/Z. Router(config)#no ip domain-lookup Router(config)#line console 0 Router(config-line)#no exec-timeout Router(config-line)#loggin syn Router(config-line)#exit Router(config)#host R3 R3(config)#int s0/1 R3(config-if)#no shut R3(config-if)#ip add 192.168.255.1 255.255.255.0 R3(config-if)#exit R3(config)#int lo0 R3(config-if)#ip add 192.168.1.1 255.255.255.0 R3(config-if)#exit R3(config)#int lo1 R3(config-if)#ip add 192.168.2.1 255.255.255.0 R3(config-if)#exit |
4.R1的IS-IS的配置
R1(config)#router isis R1(config-router)#net 49.0001.ca00.0bbc.0000.00 R1(config-router)#exit R1(config)#int lo0 R1(config-if)#ip router isis R1(config-if)#exit R1(config)#int lo1 R1(config-if)#ip router isis R1(config-if)#exit R1(config)#int s1/0 R1(config-if)#ip router isis |
5.R2的IS-IS和eigrp的配置
R2(config)#router isis R2(config-router)#net R2(config-router)#net 49.0001.ca01.0bbc.0000.00 R2(config-router)#exit R2(config)#int s1/0 R2(config-if)#ip router isis R2(config-if)#end R2(config)#router eigrp 100 R2(config-router)#network 192.168.255.2 R2(config-router)#no auto R2(config-router)#end |
6.R3的eigrp的配置
R3(config)#router eigrp 100 R3(config-router)#no auto R3(config-router)#network 192.168.255.1 R3(config-router)#network 192.168.1.1 R3(config-router)#network 192.168.2.1 R3(config-router)#end |
7.查看R1和R3的路由表
R1#show ip route Codes: C - connected, S - static, 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 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
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks C 172.16.255.0/30 is directly connected, Serial1/0 C 172.16.1.0/24 is directly connected, Loopback0 C 172.16.2.0/24 is directly connected, Loopback1 R3#show ip route Codes: C - connected, S - static, 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 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
C 192.168.255.0/24 is directly connected, Serial1/1 C 192.168.1.0/24 is directly connected, Loopback0 C 192.168.2.0/24 is directly connected, Loopback1 |
说明:R1和R3只有直连网段信息,而没有整个网络路由信息,现在在R2上配置重发布。
8.在R2上配置重发布
R2(config)#router isis R2(config-router)#redistribute eigrp 100 metric 20 level-2 //eigrp重发布进ISIS中 R2(config-router)#exit R2(config)#router eigrp 100 R2(config-router)#redistribute isis level-1-2 metric 10000 10 255 1 1500 //ISIS重发布进eigrp中 R2(config-router)#end |
9.查看R1和R3的路由表
R1#show ip route Codes: C - connected, S - static, 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 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
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks C 172.16.255.0/30 is directly connected, Serial1/0 C 172.16.1.0/24 is directly connected, Loopback0 C 172.16.2.0/24 is directly connected, Loopback1 i L2 192.168.255.0/24 [115/30] via 172.16.255.2, Serial1/0 i L2 192.168.1.0/24 [115/30] via 172.16.255.2, Serial1/0 i L2 192.168.2.0/24 [115/30] via 172.16.255.2, Serial1/0 R3#show ip route Codes: C - connected, S - static, 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 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
172.16.0.0/24 is subnetted, 2 subnets D EX 172.16.1.0 [170/2172416] via 192.168.255.2, 00:01:47, Serial1/1 D EX 172.16.2.0 [170/2172416] via 192.168.255.2, 00:01:47, Serial1/1 C 192.168.255.0/24 is directly connected, Serial1/1 C 192.168.1.0/24 is directly connected, Loopback0 C 192.168.2.0/24 is directly connected, Loopback1 路由发现缺少172.16.255.0/24网络路由。产生此问题的原因是:IS-IS在重发布时,不会将直连网段重发布。 |
10.在R2上EIGRP协议中添加配置重发布直连网络
R2(config)#router eigrp 100 R2(config-router)#redistribute connected metric 10000 10 255 1 1500 //把直连网段重发布进eigrp |
11.在次查看R3的路由表
R3#show ip route Codes: C - connected, S - static, 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 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
172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks D EX 172.16.255.0/30 [170/2172416] via 192.168.255.2, 00:01:07, Serial1/1 D EX 172.16.1.0/24 [170/2172416] via 192.168.255.2, 00:08:42, Serial1/1 D EX 172.16.2.0/24 [170/2172416] via 192.168.255.2, 00:08:42, Serial1/1 C 192.168.255.0/24 is directly connected, Serial1/1 C 192.168.1.0/24 is directly connected, Loopback0 C 192.168.2.0/24 is directly connected, Loopback1 |
12.测试连通性
R1#ping 192.168.1.1 source lo0
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: Packet sent with a source address of 172.16.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 16/43/92 ms R1#ping 192.168.2.1 source lo0
Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds: Packet sent with a source address of 172.16.1.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 12/33/64 ms |