eigrp負載均衡

Eigrp負載均衡

 

 

1)路由器的配置

R1配置

hostname R1

interface Serial0/0

 ip address 192.168.12.1 255.255.255.0

 serial restart-delay 0

interface FastEthernet1/0

 ip address 192.168.14.1 255.255.255.0

 duplex auto

 speed auto

router eigrp 1

 network 192.168.12.0

 network 192.168.14.0

 no auto-summary

line con 0

 exec-timeout 0 0

 logging synchronous

 

R2配置

hostname R2

interface Loopback0

 ip address 2.2.2.2 255.255.255.0

!        

interface Serial0/0

 ip address 192.168.12.2 255.255.255.0

 serial restart-delay 0

 clock rate 128000

!        

interface Serial0/1

 ip address 192.168.23.2 255.255.255.0

 serial restart-delay 0

 clock rate 128000

router eigrp 1

 network 2.2.2.0 0.0.0.255

 network 192.168.12.0

 network 192.168.23.0

 no auto-summary

line con 0

 exec-timeout 0 0

 logging synchronous

 

R3配置

hostname R3

interface Serial0/0

 ip address 192.168.34.3 255.255.255.0

 serial restart-delay 0

 clock rate 128000

!        

interface Serial0/1

 ip address 192.168.23.3 255.255.255.0

 serial restart-delay 0

router eigrp 1

 network 192.168.23.0

 network 192.168.34.0

 no auto-summary

line con 0

 exec-timeout 0 0

 logging synchronous

 

R4配置

hostname R4

interface Loopback0

 ip address 4.4.4.4 255.255.255.0

!        

interface Serial0/0

 ip address 192.168.34.4 255.255.255.0

 serial restart-delay 0

interface FastEthernet1/0

 ip address 192.168.14.4 255.255.255.0

 delay 10

 duplex auto

 speed auto

!        

router eigrp 1

 network 4.4.4.0 0.0.0.255

 network 192.168.14.0

 network 192.168.34.0

 no auto-summary

line con 0

 exec-timeout 0 0

 logging synchronous

 

 

R4#show ip route

D    192.168.12.0/24 [90/2172416] via 192.168.14.1, 00:11:39, FastEthernet1/0

     2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/2300416] via 192.168.14.1, 00:11:39, FastEthernet1/0

C    192.168.14.0/24 is directly connected, FastEthernet1/0

     4.0.0.0/24 is subnetted, 1 subnets

C       4.4.4.0 is directly connected, Loopback0

D    192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:11:39, Serial0/0

C    192.168.34.0/24 is directly connected, Serial0/0

默認走快速以太網去2.2.2.2

 

R4#show ip eigrp topology

P 2.2.2.0/24, 1 successors, FD is 2300416

        via 192.168.14.1 (2300416/2297856), FastEthernet1/0

        via 192.168.34.3 (2809856/2297856), Serial0/0

P 4.4.4.0/24, 1 successors, FD is 128256

        via Connected, Loopback0

P 192.168.34.0/24, 1 successors, FD is 2169856

        via Connected, Serial0/0

P 192.168.12.0/24, 1 successors, FD is 2172416

        via 192.168.14.1 (2172416/2169856), FastEthernet1/0

P 192.168.14.0/24, 1 successors, FD is 28160

        via Connected, FastEthernet1/0

P 192.168.23.0/24, 1 successors, FD is 2681856

        via 192.168.34.3 (2681856/2169856), Serial0/0

最優FD2300416,第二條路徑的AD2297856AD<FD,滿足可行性條件,所以第二天路徑是最優路由的可行後繼。

 

2)可以通過適當的配置,使得R4上看R2loopback0的路由條目爲等價路由,從而實現等價負載均衡,這2條路徑的最小帶寬是相同的,只要延時之和相同就是等價路由,在R4 做如下設置:

R4(config)#interface fastEthernet 1/0

R4(config-if)#delay 2000

備註:在接口下用delay命令修改的延時,在計算度量值時不需要再除以10.

 

R4#show ip route eigrp

D    192.168.12.0/24 [90/2681856] via 192.168.14.1, 00:01:09, FastEthernet1/0

     2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/2809856] via 192.168.34.3, 00:01:09, Serial0/0

              [90/2809856] via 192.168.14.1, 00:01:09, FastEthernet1/0

D    192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:01:09, Serial0/0

可以發現現在這2條路徑是等價的。

3)可以用“variance”命令來實現eigrp的非等價負載均衡

R4(config)#router eigrp 1

R4(config-router)#variance 2

R4#show ip route eigrp

D    192.168.12.0/24 [90/2172416] via 192.168.14.1, 00:03:29, FastEthernet1/0

     2.0.0.0/24 is subnetted, 1 subnets

D       2.2.2.0 [90/2809856] via 192.168.34.3, 00:03:29, Serial0/0

                [90/2300416] via 192.168.14.1, 00:03:29, FastEthernet1/0

D    192.168.23.0/24 [90/2681856] via 192.168.34.3, 00:03:29, Serial0/0

 

Eigrp非等價負載均衡是通過variance命令實現的,variance默認是1variance值得範圍是1-128.

 

 

 

 

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章