EIGRP 負載均衡、彙總和認證

(1)配置路由器R1
R1(config)#router eigrp 1
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.14.0
R1(config-router)#network 192.168.12.0
(2)配置路由器R2
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.12.0
R2(config-router)#network 192.168.23.0
R2(config-router)#network 2.2.2.0 255.255.255.0
(3)配置路由器R3
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.23.0
R3(config-router)#network 192.168.34.0
(4)配置路由器R4
R4(config)#router eigrp 1
R4(config-router)#no auto-summary
R4(config-router)#network 4.4.4.0 255.255.255.0
R4(config-router)#network 192.168.34.0
R4(config-router)#network 192.168.14.0
調試
(1)按照上面的配置,在R4 查看路由表:
R4#show ip route
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
D 192.168.12.0/24
[90/20514560] via 192.168.14.1, 00:00:15, GigabitEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/20642560] via 192.168.14.1, 00:00:15, GigabitEthernet0/0
C 192.168.14.0/24 is directly connected, GigabitEthernet0/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/21024000] via 192.168.34.3, 00:00:15, Serial0/0/0
C 192.168.34.0/24 is directly connected, Serial0/0/0
本實驗只關注路由器R2 的Loopback 0,雖然路由器R4 到達路由器R2 的Loopback 0
有兩條路徑,但是路由器會將FD 最小的放入路由表,選擇走g0/0 接口。那麼另外一條路徑是不是可行後繼路由呢?在路由器R4 上查看拓撲表如下:
R4#show ip eigrp topology
IP-EIGRP Topology Table for AS(1)/ID(4.4.4.4)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 2.2.2.0/24, 1 successors, FD is 20642560
via 192.168.14.1 (20642560/20640000), GigabitEthernet0/0
via 192.168.34.3 (21152000/20640000), Serial0/0/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 20512000
via Connected, Serial0/0/0
P 192.168.12.0/24, 1 successors, FD is 20514560
via 192.168.14.1 (20514560/20512000), GigabitEthernet0/0
P 192.168.14.0/24, 1 successors, FD is 28160
via Connected, GigabitEthernet0/0
P 192.168.23.0/24, 1 successors, FD is 21024000
via 192.168.34.3 (21024000/20512000), Serial0/0/0
從上面的輸出中可以看到,第二條路徑(走s0/0/0 接口)的AD 爲20640000,而最優
路由(走g0/0 接口)的FD 爲20642560,AD<FD,滿足可行性條件,所以第二條路徑(走s0/0/0接口)是最優路由(走g0/0 接口)的可行後繼。

(2)通過適當的配置,使得在路由器R4 上看R2 的Loopback 0 的路由條目爲等價路由,從而實現等價負載均衡。根據前面講的EIGRP 度量值的計算公式,這兩條路徑的最小帶寬是相同的,只要它們的延遲之和相同,就是等價路由,爲此,在路由器R4 上做如下的配置:
R4(config)#interface gigabitEthernet 0/0
R4(config-if)#delay 2000
【提示】
在接口下用delay 命令修改的延遲,在計算度量值時,不需要再除以10。
在R4 上查看路由表:
R4#show ip route eigrp
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
D 192.168.12.0/24
[90/21024000] via 192.168.14.1, 00:00:15, GigabitEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/21152000] via 192.168.34.3, 00:00:15, Serial0/0/0
[90/21152000] via 192.168.14.1, 00:00:15, GigabitEthernet0/0
D 192.168.23.0/24 [90/21024000] via 192.168.34.3, 00:00:15, Serial0/0/0
以上輸出表明路由條目“2.2.2.0”確實有兩條等價路徑,表明EIGRP 是支持等價負載
均衡的。
(3)將R4 的以太口g0/0 的delay 恢復到原來的值,通過 “variance”命令來研究
EIGRP 的非等價負載均衡。在(1)的結果中發現,對於“2.2.2.0”路由條目,在路由器R4的拓撲結構數據庫中存在如下的記錄:
P 2.2.2.0/24, 1 successors, FD is 20642560
via 192.168.14.1 (20642560/20640000), GigabitEthernet0/0
via 192.168.34.3 (21152000/20640000), Serial0/0/0
現在只需要在R4 的路由器上調整variance 的值,使得這兩條路徑在路由表中都可見和可用,R4 上的配置如下:
R4(config)#router eigrp 1
R4(config-router)#variance 2
在R4 上查看路由表:
R4#show ip route eigrp
Codes: C - connected, S - static, 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
i - IS-IS, su - IS-IS summary, 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
D 192.168.12.0/24
[90/20514560] via 192.168.14.1, 00:00:02, GigabitEthernet0/0
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/21152000] via 192.168.34.3, 00:00:02, Serial0/0/0
[90/20642560] via 192.168.14.1, 00:00:02, GigabitEthernet0/0
D 192.168.23.0/24 [90/21024000] via 192.168.34.3, 00:00:02, Serial0/0/0
以上輸出表明路由條目“2.2.2.0”有兩條路徑可達,但是它們的度量值不同,這就是
所說的非等價路由,從而證明EIGRP 是支持非等價負載均衡的。
EIGRP 非等價負載均衡是通過“variance”命令實現的, “variance”默認是1(即代表等價路徑的負載均衡), variance 值的範圍是1-128.這個參數代表了可以接受的不等價路徑的度量值的倍數,在這個範圍內的鏈路都將被接受,並且被放入路由表中
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章