修改EIGRP 路径cost 值,以及分析和实现等价与非等价负载均衡
生活随笔
收集整理的這篇文章主要介紹了
修改EIGRP 路径cost 值,以及分析和实现等价与非等价负载均衡
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
一、拓撲圖:
?
4、? 我們再看一下R2的路由:
2、? 我再來看一下到192.168.14.0路徑的路由情況:
3、? 根據上面的情況,我看到了R2到192.168.14.0先走192.168.12.1轉發120個count,然后再會走192.168.23.3 再轉發97個count。正是因為一個轉120 count,一個轉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。這樣我們只要R3到192.168.14.0 的FD(如果形成次路徑,此段也就是R2到192.168.14.0的AD),讓它滿足小于R2到192.168.14.0 的FD。即FD>AD.就會把這條鏈路放進拓撲中。
2、OK,現在R2到192.168.14.0/24的FD偏移了1,變成了2172417。
四、在R2上實現非等價負載均衡: 1、通過偏移cost值之后,下面我們再看一下R2的路由表:
2、通過上面的顯示情況,R2到192.168.14.0這個網段是走R2這條路徑過去,因為偏移只是把次路徑放入topology,并沒有放入路由表,那么我現在想讓它放入路由表,這樣可以實現通過兩條路徑到192.168.14.0。有效的實現了非等價負載均衡。但是必須要讓它滿足一個條件,就是R2 的successor(FD)×variance 值≥Feasible Successor,缺省情況下variance 等于1,這樣就是等價均衡,我只要把R2上面FD乘以2就能形成非等價負載均衡:
3、? 通過上面的修改,我們現在再看一下R2的variance :
二、配置各路由器的IP和EIGRP 協議,并保證鄰接關系的形成。 1、我要達到的目的是要讓R2到192.168.14.0/24這個網段能在R2和R1斷開之后,形成網網絡的快速收斂。因為根據EIGRP 的次優路徑進拓撲關系的形成條件是要滿足FC(feasible condition)=FD(feasible distance)>AD(通告距離,也就是下一跳路由器到目的網段這一距離)。這個條件也是為什么EIGRP是100%無環路的原因。現在我們看一下R2的EIGRP 拓撲:
| 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有一個P(passive)到192.168.14.0只有一條FD。那么我們想什么辦法去滿足在R2上形成FD>AD。把次優路徑放進拓撲中,讓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? (現在變成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 ? |
| 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# |
?看到了有兩條路徑可以走了,也就是實現了EIGRP 非等價負載均衡。
? 五、分析一下非等價負載均衡包的轉發情況: 1、我先在R2上關上cef 包交換| R2(config)#no ip cef |
| 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 |
?
三、下面可以用offset list命令偏移cost 值。把R2到192.168.14.0 這一段改大,我們可以在R1的出口,或者是R2的進口來做。但要注意,改大cost值對鏈路是沒影響的因為它還是處于passive 狀態,但如果把鏈路改小的話,它會有一個active 的過程。這個在TCP/IP卷里面有詳細說明。 1、下面我在R1上做一個out方向來啟用offset :| R1(config)#access-list 1 permit 192.168.12.0 0.0.0.255(通告192.168.14.0給R2時調用這cost ) R1(config)#router eigrp 100 R1(config-router)#offset-list 1 out 1 fastEthernet1/0? (我讓它在R1的F1/0這個出口上調用上access-list 1) |
| 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 (這個值就是R2到192.168.14.0的AD) 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#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 |
| R2(config)#router eigrp 100 R2(config-router)#variance 2 |
轉載于:https://blog.51cto.com/supercisco/248232
總結
以上是生活随笔為你收集整理的修改EIGRP 路径cost 值,以及分析和实现等价与非等价负载均衡的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: LYNC解决方案巡展
- 下一篇: 微软即将修复Windows 2000漏洞