BSCI—2:EIGRP非等價負載均衡

 BSCI—2:EIGRP非等價負載均衡


 
在做實驗之前我想先解釋一下實現EIGRP負載的一些知識()!

 

一:思考

如果R1想去去往R5的話,那麼它面臨着有3條路可以走,但是我們可以請注意到,3條路的度量值是不一樣的,所以度量值不一樣即不能實現負載均衡,於是R1就會選擇R3做爲它的下一跳,把它放入路由表當中,那我們怎樣實現非等價負載呢(即帶寬不一致的情況)?

 

二:術語

ADAdvertise Distance:宣告距離 (鄰居到某網絡的距離)  

FD (Feasible Distance):可行距離   (自己到某網絡的距離)

如圖所示: 如果R1R3R5,那麼它的AD=10FD=20.

 

注:這個一定得搞清,不然接下來都不知道我講什麼.

 

三:條件

 

1.    如果我在R1配置R1config-router#variance 2的話,那麼R2會做爲R1的另一條去住R5的路徑,因爲2*FD>20+10=30),即從R2R5FD小於R3R5FD,所以才能實現負載.

 

2.如果我variance設置爲3的話,那麼按我剛剛所說的從R4R5FD也小於2*FD),那它會被加入的負載路徑裏面去嗎?答案肯定不會,因爲還有一個條件就是AD必需小於FD,從R4到R5的AD爲25,而從R3到R5的FD爲20,所以不滿足,不能實現負載.

 

 

 

實驗:拓撲如下

 

 

注:首先說明一下,由於51CTO只允許寫8萬字,所以步驟一隻寫了R1的配置,其它一樣

 
步驟一:首先先把所以接口信息以及EIGRP全部啓用,並且查看信息.

 

R1:

 

Router>

Router>en

Router#conf t

Router(config)#hostname R1

R1(config)#interface f0/0

R1(config-if)#ip address 192.168.12.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#ip address 192.168.13.1 255.255.255.0

R1(config-if)#no sh

R1(config-if)#exit

R1(config)#router eigrp 1

R1(config-router)#no auto-summary

R1(config-router)#network 192.168.12.0 0.0.0.255

R1(config-router)#network 192.168.13.0 0.0.0.255

R1(config-if)#end

R1#

 

 

 

 

 

R1上查看路由表:

 

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

 

Gateway of last resort is not set

 

     4.0.0.0/24 is subnetted, 1 subnets

D       4.4.4.0 [90/158720] via 192.168.13.2, 00:00:06, FastEthernet0/1

                [90/158720] via 192.168.12.2, 00:00:06, FastEthernet0/0

C    192.168.12.0/24 is directly connected, FastEthernet0/0

C    192.168.13.0/24 is directly connected, FastEthernet0/1

D    192.168.24.0/24 [90/30720] via 192.168.12.2, 00:04:00, FastEthernet0/0

D    192.168.34.0/24 [90/30720] via 192.168.13.2, 00:03:50, FastEthernet0/1

R1#

 

注:很清楚的看到,去往4.4.4.4有兩條路可以走,因爲其度量值一樣,EIGRP自動實現負載均衡,

 

 

 

 

 

步驟二:R1設置F0/1接口帶寬爲512KB,其兩邊度量值不一樣,使得所以數據只向F0/0轉發,產查看路由表與拓撲表.

 

R1(config)#interface f0/1

R1(config-if)#bandwidth 512

R1(config-if)#end

R1#

 

 

查看路由表:

 

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

 

Gateway of last resort is not set

 

     4.0.0.0/24 is subnetted, 1 subnets

D       4.4.4.0 [90/158720] via 192.168.12.2, 00:08:43, FastEthernet0/0

C    192.168.12.0/24 is directly connected, FastEthernet0/0

C    192.168.13.0/24 is directly connected, FastEthernet0/1

D    192.168.24.0/24 [90/30720] via 192.168.12.2, 00:12:37, FastEthernet0/0

D    192.168.34.0/24 [90/33280] via 192.168.12.2, 00:01:04, FastEthernet0/0

R1#

 

//這裏因爲改變F0/1了帶寬,所以去住4.4.4.4全部往F0/0轉發.只有一條.

 

 

 

 

 

步驟三:實現非等價負載均衡

 

R1(config)#router eigrp 1

R1(config-router)#variance 32    //    32=5133056除以158720,滿足條件.

 

查看路由表:

 

R1#show ip route

Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP

       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area

       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2

       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP

       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area

       * - candidate default, U - per-user static route, o - ODR

       P - periodic downloaded static route

 

Gateway of last resort is not set

 

     4.0.0.0/24 is subnetted, 1 subnets

D       4.4.4.0 [90/5133056] via 192.168.13.2, 00:00:02, FastEthernet0/1

                [90/158720] via 192.168.12.2, 00:00:01, FastEthernet0/0

C    192.168.12.0/24 is directly connected, FastEthernet0/0

C    192.168.13.0/24 is directly connected, FastEthernet0/1

D    192.168.24.0/24 [90/30720] via 192.168.12.2, 00:00:01, FastEthernet0/0

D    192.168.34.0/24 [90/30720] via 192.168.13.2, 00:00:02, FastEthernet0/1

R1#

 

// 去往4.4.4.4的路由,又變成了兩條.

 

 

實驗完畢.

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