ospf 静态重分发 管理距离 ospf重分布进eigrp_网络

问题描述:

1、R1和R4的环回口均不参与路由协议,作为直连接口即可

2、R1到R4环回口实现负载均衡,即可以从R2到达,也可从R3到达

3、R4到R1环回口实现负载均衡,即可以从R2到达,也可从R3到达

思考:重分布时要注意避免环路,怎样设置重分布中的metic值比较好?

实验现象及分析:

当只把ospf重分布进eigrp时,R4路由表显示如下:

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

         1.0.0.0/24 is subnetted, 1 subnets 
   
D EX    1.1.1.0 [170/284160] via 10.234.0.2, 00:01:45, FastEthernet0/0
                [170/284160] via 10.234.0.3, 00:00:40, FastEthernet0/0
     4.0.0.0/24 is subnetted, 1 subnets    
C       4.4.4.0 is directly connected, Loopback0    
     10.0.0.0/24 is subnetted, 1 subnets    
C       10.234.0.0 is directly connected, FastEthernet0/0    
     12.0.0.0/30 is subnetted, 1 subnets    
D EX    12.0.0.0 [170/284160] via 10.234.0.2, 00:01:45, FastEthernet0/0    
                 [170/284160] via 10.234.0.3, 00:00:39, FastEthernet0/0    
     13.0.0.0/30 is subnetted, 1 subnets    
D EX    13.0.0.0 [170/284160] via 10.234.0.2, 00:01:45, FastEthernet0/0    
                 [170/284160] via 10.234.0.3, 00:00:39, FastEthernet0/0

由R4路由表可知,到达R1环回口可以通过R2或R3两条路径。

现在把eigrp重分布进ospf中后,R1路由表显示如下:

R1#show ip 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    
     4.0.0.0/24 is subnetted, 1 subnets    
O E2    4.4.4.0 [110/20] via 12.0.0.2, 00:00:38, Serial0/0/0    
     10.0.0.0/24 is subnetted, 1 subnets    
O E2    10.234.0.0 [110/20] via 13.0.0.2, 00:00:04, Serial0/0/1    
     12.0.0.0/30 is subnetted, 1 subnets    
C       12.0.0.0 is directly connected, Serial0/0/0    
     13.0.0.0/30 is subnetted, 1 subnets    
C       13.0.0.0 is directly connected, Serial0/0/1

由R1路由表可知,R1到达R4环回口只能通过R2,此时并没有实现负载均衡,原因何在?

看看R3的路由表先:

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

         1.0.0.0/24 is subnetted, 1 subnets 
   
O E2    1.1.1.0 [110/20] via 13.0.0.1, 00:33:04, Serial0/0/0    
     4.0.0.0/24 is subnetted, 1 subnets    
O E2    4.4.4.0 [110/20] via 13.0.0.1, 00:03:33, Serial0/0/0
     10.0.0.0/24 is subnetted, 1 subnets    
C       10.234.0.0 is directly connected, FastEthernet0/0    
     12.0.0.0/30 is subnetted, 1 subnets    
O       12.0.0.0 [110/128] via 13.0.0.1, 00:34:53, Serial0/0/0    
     13.0.0.0/30 is subnetted, 1 subnets    
C       13.0.0.0 is directly connected, Serial0/0/0

对于后面这两句话表述不知道准不准确,如不对,还请大家多多指教)

(大家可以试试采用前一种修改办法,此时会有什么不同的效果。我做时到后来是不行的)

修改后R1和R4的路由表显示如下:

R1#show ip 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    
     4.0.0.0/24 is subnetted, 1 subnets    
O E2    4.4.4.0 [110/20] via 13.0.0.2, 00:03:58, Serial0/0/1
                [110/20] via 12.0.0.2, 00:03:58, Serial0/0/0
     10.0.0.0/24 is subnetted, 1 subnets    
O E2    10.234.0.0 [110/20] via 12.0.0.2, 00:34:13, Serial0/0/0    
                   [110/20] via 13.0.0.2, 00:34:13, Serial0/0/1    
     12.0.0.0/30 is subnetted, 1 subnets    
C       12.0.0.0 is directly connected, Serial0/0    
     13.0.0.0/30is subnetted, 1 subnets    
C       13.0.0.0 is directly connected, Serial0/1       
R4#show ip route    
Gateway of last resort is not set      

         1.0.0.0/24 is subnetted, 1 subnets 
   
D EX    1.1.1.0 [170/307200] via 10.234.0.2, 00:05:34, FastEthernet0/0
                [170/307200] via 10.234.0.3, 00:05:34, FastEthernet0/0     4.0.0.0/24 is subnetted, 1 subnets    
C       4.4.4.0 is directly connected, Loopback0    
     10.0.0.0/24 is subnetted, 1 subnets    
C       10.234.0.0 is directly connected, FastEthernet0/0    
     12.0.0.0/30 is subnetted, 1 subnets    
D EX    12.0.0.0 [170/307200] via 10.234.0.2, 00:01:45, FastEthernet0/0    
                 [170/307200] via 10.234.0.3, 00:00:39, FastEthernet0/0    
     13.0.0.0/30 is subnetted, 1 subnets    
D EX    13.0.0.0 [170/307200] via 10.234.0.2, 00:01:45, FastEthernet0/0    
                 [170/307200] via 10.234.0.3, 00:00:39, FastEthernet0/0

用ping命令测试可通,用至此,完成实验目的。

本实验由于是在packettracer5上搭建的拓扑,在模拟Cisco2811路由器上不能完成修改重分布管理距离的命令,故最后采用在真实机上搭建拓扑并完成实验,结论如上所述。

先附上真实机上操作的配置。

如有不足,请各位多多指教。