EIGRP的等价负载均衡

实验拓扑如下所示:

R1

R1#sh run

interface Loopback0

 ip address 1.1.1.1 255.255.255.0

interface FastEthernet0/0

 ip address 14.1.1.1 255.255.255.0

 duplex auto

 speed auto

interface Serial1/1

 ip address 12.1.1.1 255.255.255.0

router eigrp 1

 network 1.1.1.0 0.0.0.255

 network 12.1.1.0 0.0.0.255

 network 14.1.1.0 0.0.0.255

 no auto-summary

R2

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

interface Serial1/0

 ip address 12.1.1.2 255.255.255.0

interface Serial1/1

 ip address 23.1.1.2 255.255.255.0

router eigrp 1

 network 2.2.2.0 0.0.0.255

 network 12.1.1.0 0.0.0.255

 network 23.1.1.0 0.0.0.255

 no auto-summary

R3

interface Loopback0

 ip address 3.3.3.3 255.255.255.0

interface Serial1/0

 ip address 23.1.1.3 255.255.255.0

 serial restart-delay 0

interface Serial1/1

 ip address 34.1.1.3 255.255.255.0

router eigrp 1

 network 3.3.3.0 0.0.0.255

 network 23.1.1.0 0.0.0.255

 network 34.1.1.0 0.0.0.255

 no auto-summary

R4

interface Loopback0

 ip address 4.4.4.4 255.255.255.0

interface FastEthernet0/0

 ip address 14.1.1.4 255.255.255.0

interface Serial1/1

 ip address 34.1.1.4 255.255.255.0

router eigrp 1

 network 4.4.4.0 0.0.0.255

 network 14.1.1.0 0.0.0.255

 network 34.1.1.0 0.0.0.255

 no auto-summary

查看R4的路由表:

R4#sh ip route

Gateway of last resort is not set

     34.0.0.0/24 is subnetted, 1 subnets

C       34.1.1.0 is directly connected, Serial1/1

     1.0.0.0/24 is subnetted, 1 subnets

D       1.1.1.0 [90/156160] via 14.1.1.1, 00:04:23, FastEthernet0/0

     2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/2300416] via 14.1.1.1, 00:04:23, FastEthernet0/0

     3.0.0.0/24 is subnetted, 1 subnets

D       3.3.3.0 [90/2297856] via 34.1.1.3, 00:06:57, Serial1/1

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

     23.0.0.0/24 is subnetted, 1 subnets

D       23.1.1.0 [90/2681856] via 34.1.1.3, 00:04:23, Serial1/1

     12.0.0.0/24 is subnetted, 1 subnets

D       12.1.1.0 [90/2172416] via 14.1.1.1, 00:04:23, FastEthernet0/0

     14.0.0.0/24 is subnetted, 1 subnets

C       14.1.1.0 is directly connected, FastEthernet0/0

 

R42.2.2.0走接口F0/0,因为F0/0metric

FastEtherne接口走,metric = 256*107 / 1544 + (100+20000+5000 )/ 10= 2300591  (这个公式没有错吧,为什么没有算出路由表中的2300416 呢??)

Serial接口走,metric = 256 * (107 / 1544 + (20000+5000+20000) / 10 ) = 2810031

 

所以从R42.2.2.0会从FastEtherne接口走。

R4#sh ip ei 1 topology

可以看到:

P 2.2.2.0/24, 1 successors, FD is 2300416

        via 14.1.1.1 (2300416/2297856), FastEthernet0/0

        via 34.1.1.3 (2809856/2297856), Serial1/1

和计算结果相符合。

从上面的计算公式可以看出,两种接口的延迟相差大概2000,所以在R4上:

R4(config)#int f0/0

R4(config-if)#delay 2000

再次查看R4的路由表:

R4#sh ip ro

D       2.2.2.0 [90/2809856] via 34.1.1.3, 00:00:15, Serial1/1

                [90/2809856] via 14.1.1.1, 00:00:15, FastEthernet0/0

这样就实现了EIGRP的负载均衡。

===================== 我是分割线 ================================

上述实验或者计算如有错误欢迎提出,谢谢。