22. Redistributing into EIGRP and IS-IS

1、掌握EIGRP 与IS-IS 的重发布配置。
 
网络图:

image.png


按图配好基本信息,配好基本的动态路由协议,测试互连可达。

 

各路由器路由协议:

R1(config)#router isis
R1(config-router)#net 49.0001.0000.0000.0001.00
R1(config-router)#exit
R1(config)#int s0/0
R1(config-if)#ip router isis
R1(config-if)#int lo0
R1(config-if)#ip router isis
R1(config-if)#int lo1
R1(config-if)#ip router isis
R1(config-if)#exit

 

R2(config)#router isis
R2(config-router)#net 49.0001.0000.0000.0002.00
R2(config-router)#exit
R2(config)#int s0/0
R2(config-if)#ip router isis
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#network 192.168.255.0
R2(config-router)#exit

 

R3(config)#router eigrp 100
R3(config-router)#network 192.168.255.0
R3(config-router)#network 192.168.1.0
R3(config-router)#network 192.168.2.0
R3(config-router)#exit

 

查看各路由表:

R1#show ip 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, Serial0/0
C       172.16.1.0/24 is directly connected, Loopback0
C       172.16.2.0/24 is directly connected, Loopback1

 

R2#show ip 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, Serial0/0
i L1    172.16.1.0/24 [115/20] via 172.16.255.1, Serial0/0
i L1    172.16.2.0/24 [115/20] via 172.16.255.1, Serial0/0
C    192.168.255.0/24 is directly connected, Serial0/1
D    192.168.1.0/24 [90/2297856] via 192.168.255.1, 00:01:31, Serial0/1
D    192.168.2.0/24 [90/2297856] via 192.168.255.1, 00:01:29, Serial0/1

 

R3#show ip route
Gateway of last resort is not set

C    192.168.255.0/24 is directly connected, Serial0/0
C    192.168.1.0/24 is directly connected, Loopback0
C    192.168.2.0/24 is directly connected, Loopback1

 

只有R2学习到了全网的路由信息,因为它处于两个自治系统的边界,并且同时运行了两个动态路由协议。

 

要解决此问题可在R2上配置路由重分发实现:

R2(config)#router isis 
R2(config-router)#redistribute eigrp 100 metric 20 level-2  

R2(config-router)#exit

R2(config)#router eigrp 100
R2(config-router)#re isis level-1-2 metric 100000 10 255 1 1500
R2(config-router)#exit

指定度量值为20,level-2指定重分发的路由类型是L2的路由,可追加metric-type-extenal子参数,同时计算外部度量。

level-1-2指出需要重分发的路由为L1和L2,metric后的几个数值分别表示:带宽值100mbps(单位:kbps),网络延迟100ms(单位10ms),255可靠度100%,1负载1%,1500MTU值。

因为EIGRP是复合型的度量值,所以在重发布时需要根据网络的实际情况指定相应的度量值。

 

查看R1和R3的路由表:

R1#show ip 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, Serial0/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, Serial0/0
i L2 192.168.1.0/24 [115/30] via 172.16.255.2, Serial0/0
i L2 192.168.2.0/24 [115/30] via 172.16.255.2, Serial0/0 --->20加上本地的度量值等于30

 

R3#show ip 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:13:16, Serial0/0
D EX    172.16.2.0 [170/2172416] via 192.168.255.2, 00:13:16, Serial0/0

---->EX关键字指出此路由是非EIGRP自系统路由
C    192.168.255.0/24 is directly connected, Serial0/0
C    192.168.1.0/24 is directly connected, Loopback0
C    192.168.2.0/24 is directly connected, Loopback1

 

测试有效性:

R3#ping 172.16.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/46/108 ms

 

R1#ping 192.168.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
.....       ----------->此路不通
Success rate is 0 percent (0/5)

 

再次相看R3的路由:

R3#show ip 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:23:52, Serial0/0
D EX    172.16.2.0 [170/2172416] via 192.168.255.2, 00:23:52, Serial0/0    

---->仅有ISIS的两条路由
C    192.168.255.0/24 is directly connected, Serial0/0
C    192.168.1.0/24 is directly connected, Loopback0
C    192.168.2.0/24 is directly connected, Loopback1

原因是:ISIS在重分发路由时不重分发直连网段。

 

在R2上EIGRP协议中添加配置重分发直连网络:
R2(config)#router eigrp 100
R2(config-router)#redistribute connected metric 100000 10 255 1 1500
R2(config-router)#exit

把R2的直连网络重发布到EIGPR中

 

查看R3路由表:

R3#show ip 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:21, Serial0/0   ----->R2的直连路由
D EX    172.16.1.0/24 [170/2172416] via 192.168.255.2, 00:29:01, Serial0/0
D EX    172.16.2.0/24 [170/2172416] via 192.168.255.2, 00:29:01, Serial0/0
C    192.168.255.0/24 is directly connected, Serial0/0
C    192.168.1.0/24 is directly connected, Loopback0
C    192.168.2.0/24 is directly connected, Loopback1

 

在R1上确认有效性:

R1#ping 192.168.1.1 

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/53/136 ms

 

 

完成。

 

 

问:为何缺少中间路由就不能连通目标,此问题还没想明白。------2012.02.17标记


发表评论:

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

桂ICP备19000498号-3