日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

修改EIGRP 路径cost 值,以及分析和实现等价与非等价负载均衡

發(fā)布時間:2025/3/8 编程问答 39 豆豆
生活随笔 收集整理的這篇文章主要介紹了 修改EIGRP 路径cost 值,以及分析和实现等价与非等价负载均衡 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
一、拓撲圖:

二、配置各路由器的IPEIGRP 協(xié)議,并保證鄰接關(guān)系的形成。 1、我要達到的目的是要讓R2192.168.14.0/24這個網(wǎng)段能在R2R1斷開之后,形成網(wǎng)網(wǎng)絡(luò)的快速收斂。因為根據(jù)EIGRP 的次優(yōu)路徑進拓撲關(guān)系的形成條件是要滿足FCfeasible condition=FDfeasible distance>AD(通告距離,也就是下一跳路由器到目的網(wǎng)段這一距離)。這個條件也是為什么EIGRP100%無環(huán)路的原因。現(xiàn)在我們看一下R2EIGRP 拓撲:
R2#show ip eigrp to

IP-EIGRP Topology Table for AS(100)/ID(192.168.23.2)

?

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

?????? r - reply Status, s - sia Status

?

P 192.168.34.0/24, 1 successors, FD is 2172416

??????? via 192.168.23.3 (2172416/28160), Serial0/1

P 192.168.12.0/24, 1 successors, FD is 28160

??????? via Connected, FastEthernet1/0

P 192.168.14.0/24, 1 successors, FD is 2172416

??????? via 192.168.12.1 (2172416/2169856), FastEthernet1/0

P 192.168.23.0/24, 1 successors, FD is 2169856

??????? via Connected, Serial0/1

R2#

2、通過上面的topology,我們看到R2有一個Ppassive)到192.168.14.0只有一條FD。那么我們想什么辦法去滿足在R2上形成FD>AD。把次優(yōu)路徑放進拓撲中,讓EIGRP在另一條鏈路DOWN 后形成一個快速收斂的過程。我們在R2上看到這么一條: P 192.168.14.0/24, 1 successors, FD is 2172416 ??????? via 192.168.12.1 (2172416/2169856), FastEthernet1/0 下面再看一下R3:
R3#sho ip eigrp to

IP-EIGRP Topology Table for AS(100)/ID(192.168.34.3)

?

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

?????? r - reply Status, s - sia Status

?

P 192.168.34.0/24, 1 successors, FD is 28160

??????? via Connected, FastEthernet1/0

P 192.168.12.0/24, 1 successors, FD is 2172416

??????? via 192.168.23.2 (2172416/28160), Serial0/1

P 192.168.14.0/24, 1 successors, FD is 2172416

??????? via 192.168.34.4 (2172416/2169856), FastEthernet1/0

P 192.168.23.0/24, 1 successors, FD is 2169856

??????? via Connected, Serial0/1

R3#

?

R2#show ip protocols Routing Protocol is "eigrp 100" ? Outgoing update filter list for all interfaces is not set ? Incoming update filter list for all interfaces is not set ? Outgoing routes in FastEthernet1/0 will have 1 added to metric if on list 1 ? Incoming routes in FastEthernet1/0 will have 1 added to metric if on list 1 ? Default networks flagged in outgoing updates ? Default networks accepted from incoming updates ? EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0 ? EIGRP maximum hopcount 100 ? EIGRP maximum metric variance 2? (現(xiàn)在變成2) ? Redistributing: eigrp 100 ? EIGRP NSF-aware route hold timer is 240s ? Automatic network summarization is not in effect ? Maximum path: 4 ? Routing for Networks: ??? 192.168.12.0 ??? 192.168.23.0 ? Routing Information Sources: ??? Gateway???????? Distance????? Last Update ??? 192.168.12.1????????? 90????? 00:25:56 ??? 192.168.23.3????????? 90????? 00:25:56 ? Distance: internal 90 external 170

?
4、? 我們再看一下R2的路由:
R2#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

?

C??? 192.168.12.0/24 is directly connected, FastEthernet1/0

D??? 192.168.14.0/24 [90/2684416] via 192.168.23.3, 00:29:04, Serial0/1

???????????????????? [90/2172417] via 192.168.12.1, 00:29:04, FastEthernet1/0

C??? 192.168.23.0/24 is directly connected, Serial0/1

D??? 192.168.34.0/24 [90/2172416] via 192.168.23.3, 00:29:04, Serial0/1

D??? 192.168.1.0/24 [90/156160] via 192.168.12.1, 00:29:04, FastEthernet1/0

R2#

?看到了有兩條路徑可以走了,也就是實現(xiàn)了EIGRP 非等價負載均衡。

? 五、分析一下非等價負載均衡包的轉(zhuǎn)發(fā)情況: 1、我先在R2上關(guān)上cef 包交換
R2(config)#no ip cef

2、? 我再來看一下到192.168.14.0路徑的路由情況:
R2#show ip route 192.168.14.0

Routing entry for 192.168.14.0/24

? Known via "eigrp 100", distance 90, metric 2172417, type internal

? Redistributing via eigrp 100

? Last update from 192.168.23.3 on Serial0/1, 00:37:03 ago

? Routing Descriptor Blocks:

??? 192.168.23.3, from 192.168.23.3, 00:37:03 ago, via Serial0/1

????? Route metric is 2684416, traffic share count is 97

????? Total delay is 40100 microseconds, minimum bandwidth is 1544 Kbit

????? Reliability 255/255, minimum MTU 1500 bytes

????? Loading 1/255, Hops 2

? * 192.168.12.1, from 192.168.12.1, 00:37:03 ago, via FastEthernet1/0

????? Route metric is 2172417, traffic share count is 120

????? Total delay is 20100 microseconds, minimum bandwidth is 1544 Kbit

????? Reliability 255/255, minimum MTU 1500 bytes

????? Loading 1/255, Hops 1

3、? 根據(jù)上面的情況,我看到了R2192.168.14.0先走192.168.12.1轉(zhuǎn)發(fā)120count,然后再會走192.168.23.3 再轉(zhuǎn)發(fā)97count。正是因為一個轉(zhuǎn)120 count,一個轉(zhuǎn)97 count,我想也就是叫非等價的原因。 3、我們看到了: P 192.168.14.0/24, 1 successors, FD is 2172416 ??????? via 192.168.34.4 (2172416/2169856), FastEthernet1/0 EIGRP COST值:如果改帶寬,改K值,這樣會影響整個鏈路。如果只想把一條路徑加進topology。這樣我們只要R3192.168.14.0 FD(如果形成次路徑,此段也就是R2192.168.14.0AD),讓它滿足小于R2192.168.14.0 FD。即FD>AD.就會把這條鏈路放進拓撲中。

?

三、下面可以用offset list命令偏移cost 值。把R2192.168.14.0 這一段改大,我們可以在R1的出口,或者是R2的進口來做。但要注意,改大cost值對鏈路是沒影響的因為它還是處于passive 狀態(tài),但如果把鏈路改小的話,它會有一個active 的過程。這個在TCP/IP卷里面有詳細說明。 1、下面我在R1上做一個out方向來啟用offset :
R1(config)#access-list 1 permit 192.168.12.0 0.0.0.255(通告192.168.14.0R2時調(diào)用這cost )

R1(config)#router eigrp 100

R1(config-router)#offset-list 1 out 1 fastEthernet1/0? (我讓它在R1F1/0這個出口上調(diào)用上access-list 1)

2OK,現(xiàn)在R2192.168.14.0/24FD偏移了1,變成了2172417
R2#show ip eigrp topology

IP-EIGRP Topology Table for AS(100)/ID(192.168.23.2)

?

Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,

?????? r - reply Status, s - sia Status

?

P 192.168.34.0/24, 1 successors, FD is 2172416

? ??????via 192.168.23.3 (2172416/28160), Serial0/1

P 192.168.12.0/24, 1 successors, FD is 28160

??????? via Connected, FastEthernet1/0

P 192.168.14.0/24, 1 successors, FD is 2172417

??????? via 192.168.12.1 (2172417/2169857), FastEthernet1/0

??????? via 192.168.23.3 (2684416/2172416), Serial0/1 (這個值就是R2192.168.14.0AD)

P 192.168.1.0/24, 1 successors, FD is 156160

??????? via 192.168.12.1 (156160/128256), FastEthernet1/0

P 192.168.23.0/24, 1 successors, FD is 2169856

??????? via Connected, Serial0/1

四、在R2上實現(xiàn)非等價負載均衡: 1、通過偏移cost值之后,下面我們再看一下R2的路由表:
R2#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

?

C??? 192.168.12.0/24 is directly connected, FastEthernet1/0

D??? 192.168.14.0/24 [90/2172417] via 192.168.12.1, 00:10:52, FastEthernet1/0

C??? 192.168.23.0/24 is directly connected, Serial0/1

D??? 192.168.34.0/24 [90/2172416] via 192.168.23.3, 00:10:52, Serial0/1

D??? 192.168.1.0/24 [90/156160] via 192.168.12.1, 00:10:53, FastEthernet1/0

2、通過上面的顯示情況,R2192.168.14.0這個網(wǎng)段是走R2這條路徑過去,因為偏移只是把次路徑放入topology,并沒有放入路由表,那么我現(xiàn)在想讓它放入路由表,這樣可以實現(xiàn)通過兩條路徑到192.168.14.0。有效的實現(xiàn)了非等價負載均衡。但是必須要讓它滿足一個條件,就是R2 successor(FD)×variance 值≥Feasible Successor,缺省情況下variance 等于1,這樣就是等價均衡,我只要把R2上面FD乘以2就能形成非等價負載均衡:

R2(config)#router eigrp 100

R2(config-router)#variance 2

3、? 通過上面的修改,我們現(xiàn)在再看一下R2variance :

轉(zhuǎn)載于:https://blog.51cto.com/supercisco/248232

總結(jié)

以上是生活随笔為你收集整理的修改EIGRP 路径cost 值,以及分析和实现等价与非等价负载均衡的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。