概念预习:

什么是多点双向路由重发布?
不同路由协议相互之间通过重发布相互传递各自的路由信息,承担重发布工作ASBR路由器数量多于一台.ASBR在每个路由协议内都能够收到相互间重发布通告的路由信息。
一:实验拓扑:

 


 
二:实验目的:
 双点:为了路由条目的冗余,Down掉任何一台ASBR路由器都不影响两个AS的通信;
 双向:不同AS的路由能够相互学习。
三:实验描述:
 R1,R2,R3运行OSPF,并将1.1.1.1重分布进OSPF[redistribute connected subnet]
 R2,R3,R4运行EIGRP,并将4.4.4.4重分布进EIGRP[redistribute connected subnet]
四:实验要求:
 R1能够学到EIGRP的路由,并且到4.4.4.4是负载均衡
 R4能够学到OSPF的路由,并且到1.1.1.1是负载均衡
五:实验过程:
1:基本接口的配置:
R1(config)#int s0/1
R1(config-if)#ip add 12.0.0.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int s0/2
R1(config-if)#ip add 13.0.0.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#int lo 0
R1(config-if)#ip add 1.1.1.1 255.255.255.0

R2(config)#int s0/1
R2(config-if)#ip add 12.0.0.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int e1/0
R2(config-if)#ip add 10.0.234.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#int lo 0
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#^Z
R3(config)#int s0/2
R3(config-if)#ip add 13.0.0.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int e1/0
R3(config-if)#ip add 10.0.234.3 255.255.255.0
R3(config-if)#no sh
R3(config-if)#int lo 0
R3(config-if)#ip add 3.3.3.3 255.255.255.0

R4(config)#int e0/0
R4(config-if)#ip add 10.0.234.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#int lo 0
R4(config-if)#ip add 4.4.4.4 255.255.255.0
R4(config-if)#no sh

2:路由的配置:
R1(config)#router os 1
R1(config-router)#net 12.0.0.0 0.0.0.255 a 0
R1(config-router)#net 13.0.0.0 0.0.0.255 a 0
R1(config-router)#redistribute connected subnets

R2(config)#router os 1
R2(config-router)#net 12.0.0.0 0.0.0.255 a 0
R2(config-router)#net 2.2.2.0 0.0.0.255 a 0
R2(config-router)#exit
R2(config)#router eigrp 1
R2(config-router)#net 10.0.234.0 0.0.0.255
R2(config-router)#no au

R3(config)#router os 1
R3(config-router)#net 13.0.0.0 0.0.0.255 a 0
R3(config-router)#net 3.3.3.0 0.0.0.255 a 0
R3(config-router)#exit
R3(config)#router eigrp 1
R3(config-router)#net 10.0.234.0 0.0.0.255
R3(config-router)#no au

R4(config)#router eigrp 1
R4(config-router)#net 10.0.234.0 0.0.0.255
R4(config-router)#redistribute connected

R1#sho ip route
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/32 is subnetted, 1 subnets
O       2.2.2.2 [110/65] via 12.0.0.2, 00:01:58, Serial0/1
     3.0.0.0/32 is subnetted, 1 subnets
O       3.3.3.3 [110/65] via 13.0.0.3, 00:01:58, Serial0/2
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial0/1
     13.0.0.0/24 is subnetted, 1 subnets
C       13.0.0.0 is directly connected, Serial0/2

R4#sho ip route
     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.0.234.0 is directly connected, Ethernet0/0
//发现R1和R4不能相互学习路由,下来我们在E2和R3上实现双向重分布。
3:双向重分布的配置:
R2(config)#router os 1
R2(config-router)#redistribute eigrp 1 subnets
R2(config-router)#exit
R2(config)#router eigrp 1
R2(config-router)#redistribute ospf 1 metric 100000 1 255 1 1500

R3(config)#router os 1
R3(config-router)#redistribute eigrp 1 subnets
R3(config-router)#router eigrp 1
R3(config-router)#redistribute ospf 1 metric 100000 1 255 1 1500

R4#sho ip route eigrp 
     1.0.0.0/24 is subnetted, 1 subnets
D EX    1.1.1.0 [170/281856] via 10.0.234.3, 00:04:57, Ethernet0/0
                [170/281856] via 10.0.234.2, 00:04:57, Ethernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/409600] via 10.0.234.2, 00:06:15, Ethernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/409600] via 10.0.234.3, 00:06:15, Ethernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
D EX    12.0.0.0 [170/281856] via 10.0.234.3, 00:04:57, Ethernet0/0
                 [170/281856] via 10.0.234.2, 00:04:57, Ethernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
D EX    13.0.0.0 [170/281856] via 10.0.234.3, 00:04:57, Ethernet0/0
                 [170/281856] via 10.0.234.2, 00:04:57, Ethernet0/0
//发现R4上有到达R1的负载均衡的路由。
R1#sho ip route
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       2.2.2.2/32 [110/65] via 12.0.0.2, 00:01:34, Serial0/1
O E2    2.2.2.0/24 [110/20] via 13.0.0.3, 00:01:34, Serial0/2
     3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       3.3.3.3/32 [110/65] via 13.0.0.3, 00:01:34, Serial0/2
O E2    3.3.3.0/24 [110/20] via 12.0.0.2, 00:01:34, Serial0/1
     4.0.0.0/24 is subnetted, 1 subnets
O E2    4.4.4.0 [110/20] via 12.0.0.2, 00:01:33, Serial0/1
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.234.0 [110/20] via 13.0.0.3, 00:01:34, Serial0/2
                   [110/20] via 12.0.0.2, 00:01:34, Serial0/1
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial0/1
     13.0.0.0/24 is subnetted, 1 subnets
C       13.0.0.0 is directly connected, Serial0/2
//发现R1上没有到4.4.4.0的负载均衡的路由,Why?
我们查看一下两台ASBR路由器上的路由表:
R3#sho ip route
     1.0.0.0/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/20] via 13.0.0.1, 00:02:47, Serial0/2
     2.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O       2.2.2.2/32 [110/129] via 13.0.0.1, 00:02:47, Serial0/2
D EX    2.2.2.0/24 [170/281856] via 10.0.234.2, 00:08:55, Ethernet1/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.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.1, 00:02:47, Serial0/2
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.234.0 is directly connected, Ethernet1/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.0.0.0 [110/128] via 13.0.0.1, 00:02:47, Serial0/2
     13.0.0.0/24 is subnetted, 1 subnets
C       13.0.0.0 is directly connected, Serial0/2
发现R3上没有4.4.4.4的EIGRP路由,取而代之的是OSPF路由,按理来说应该通过EIGRP好,但现在选的是OSPF,原因是R3从EIGRP学到的4.4.4.0的路由是外部路由,管理距离为170,R3从R2(将EIGRP重分布过来的)OSPF学过来的到达4.4.4.0的路由管理距离为110,R3取管理距离小的放入它的路由表,从而导致R3将EIGRP重分布到OSPF时本地EIGRP表没有4.4.4.0的路由,因此R1上没有到达4.4.4.0的负载均衡的路由。

 


解决方法:修改AD
将R2从R3上学习到的OSPF路由的管理距离改的比外部EIGRP(170)的管理距离还高,
将R3从R2上学到的EIGRP的路由的管理距离改的比外部EIGRP的管理距离还高即可解决。

R2(config)#router ospf 1
R2(config-router)#distance 180 3.3.3.3 0.0.0.0

//R2从3.3.3.3学过来的OSPF的路由修改管理距离为180

R3(config)#router os 1
R3(config-router)#distance 180 2.2.2.2 0.0.0.0

//R3从2.2.2.2学过来的路由修改管理距离为180

查看R2和R3上的路由表:
R2#sho ip route

     1.0.0.0/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/20] via 12.0.0.1, 00:00:58, Serial0/1
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/409600] via 10.0.234.3, 00:16:50, Ethernet1/0
     4.0.0.0/24 is subnetted, 1 subnets
D EX    4.4.4.0 [170/281856] via 10.0.234.4, 00:00:35, Ethernet1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.234.0 is directly connected, Ethernet1/0
     12.0.0.0/24 is subnetted, 1 subnets
C       12.0.0.0 is directly connected, Serial0/1
     13.0.0.0/24 is subnetted, 1 subnets
O       13.0.0.0 [110/128] via 12.0.0.1, 00:00:59, Serial0/1
R3#sho ip route
     1.0.0.0/24 is subnetted, 1 subnets
O E2    1.1.1.0 [110/20] via 13.0.0.1, 00:01:21, Serial0/2
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/409600] via 10.0.234.2, 00:13:37, Ethernet1/0
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     4.0.0.0/24 is subnetted, 1 subnets
D EX    4.4.4.0 [170/281856] via 10.0.234.4, 00:01:20, Ethernet1/0
     10.0.0.0/24 is subnetted, 1 subnets
C       10.0.234.0 is directly connected, Ethernet1/0
     12.0.0.0/24 is subnetted, 1 subnets
O       12.0.0.0 [110/128] via 13.0.0.1, 00:01:21, Serial0/2
     13.0.0.0/24 is subnetted, 1 subnets
C       13.0.0.0 is directly connected, Serial0/2
//发现两台ABR上已经解决了次优路由的问题,再看R1和R4的负载均衡问题。
R1#sho ip route ospf
     2.0.0.0/24 is subnetted, 1 subnets
O E2    2.2.2.0 [110/20] via 13.0.0.3, 00:17:02, Serial0/2
                [110/20] via 12.0.0.2, 00:17:02, Serial0/1
     3.0.0.0/24 is subnetted, 1 subnets
O E2    3.3.3.0 [110/20] via 13.0.0.3, 00:17:02, Serial0/2
                [110/20] via 12.0.0.2, 00:17:02, Serial0/1
     4.0.0.0/24 is subnetted, 1 subnets
O E2    4.4.4.0 [110/20] via 13.0.0.3, 00:02:29, Serial0/2
                [110/20] via 12.0.0.2, 00:02:29, Serial0/1
     10.0.0.0/24 is subnetted, 1 subnets
O E2    10.0.234.0 [110/20] via 13.0.0.3, 00:17:02, Serial0/2
                   [110/20] via 12.0.0.2, 00:17:02, Serial0/1
R4#sho ip route eigrp
     1.0.0.0/24 is subnetted, 1 subnets
D EX    1.1.1.0 [170/281856] via 10.0.234.3, 00:02:42, Ethernet0/0
                [170/281856] via 10.0.234.2, 00:02:42, Ethernet0/0
     2.0.0.0/24 is subnetted, 1 subnets
D       2.2.2.0 [90/409600] via 10.0.234.2, 00:18:45, Ethernet0/0
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/409600] via 10.0.234.3, 00:18:45, Ethernet0/0
     12.0.0.0/24 is subnetted, 1 subnets
D EX    12.0.0.0 [170/281856] via 10.0.234.3, 00:02:42, Ethernet0/0
                 [170/281856] via 10.0.234.2, 00:02:42, Ethernet0/0
     13.0.0.0/24 is subnetted, 1 subnets
D EX    13.0.0.0 [170/281856] via 10.0.234.3, 00:03:05, Ethernet0/0
                 [170/281856] via 10.0.234.2, 00:03:05, Ethernet0/0
//发现已经实现了负载均衡。