|
在作實驗以前我想先解釋一下實現EIGRP負載的一些知識(圖)!
![]()
一:思考
若是
R1
想去去往
R5
的話,那麼它面臨着有
3
條路能夠走,可是咱們能夠請注意到,
3
條路的度量值是不同的,因此度量值不同即不能實現負載均衡,因而
R1
就會選擇
R3
作爲它的下一跳,把它放入路由表當中
,
那咱們怎樣實現非等價負載呢(即帶寬不一致的狀況)?
二:術語
AD
(
Advertise Distance
)
:
宣告距離
(鄰居到某網絡的距離)
FD (Feasible Distance)
:可行距離
(本身到某網絡的距離)
如圖所示
:
若是
R1
從
R3
到
R5
,那麼它的
AD=10
,
FD=20.
注:這個必定得搞清,否則接下來都不知道我講什麼
.
三:條件
1. 若是我在
R1
配置
R1
(
config-router
)
#variance 2
的話,那麼
R2
會作爲
R1
的另外一條去住
R5
的路徑,由於
2*
(
FD
)
>
(
20+10=30
),即從
R2
到
R5
的
FD
小於
R3
到
R5
的
FD
,因此才能實現負載
.
2.
若是我
variance
設置爲
3
的話,那麼按我剛剛所說的從
R4
到
R5
的
FD
也小於
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
的路由,又變成了兩條
.
實驗完畢
.
|