如何分析EIGRP協議

1、eigrp協議簡述

EIGRP(Enhanced Inerior gateway Routing Protocol,增強型內部網關路由協議)是一個平衡混合型路由協議,它融合了距離矢量和鏈路狀態兩種路由協議的優點,也是CISCO的私有協議。

EIGRP是一個高效的路由協議,它的特點是:

  • 通過發送和接收Hello包來建立和維持鄰居的關系,并交換路由信息;

  • 采用組播(224.0.0.10)或單播進行路由更新;

  • EIGRP的管理距離為90和170;

  • 采用觸發更新,減少帶寬占用;

  • 支持可變長子網掩碼(VLSM),默認開啟自動匯總功能;

  • 支持IP、IPX、和Apple Talk等多種網絡層協議;

  • 對每一種網絡協議,EIGRP多維持獨立的鄰居表、拓撲表和路由表;

  • EIGRP采用Diffusing Upadte算法(DUAL)來實現快速收斂并確保沒有路由環路;

  • 存儲整個網絡拓撲結構的信息,一邊快速適應網絡變化;

  • 支持等價和非等價的負載均衡

  • 使用可靠傳輸協議(RTP)保證路由信息傳輸的可靠性;

  • 無縫連接數據鏈路層協議和拓撲結構,EIGRP不要求對OSI參考模型的2層協議進行配置;

2、實驗目的

簡單理解EIGRP以下二個基礎知識點。

  • 理解鄰居表、拓撲表以及路由表;

  • EIGRP度量值的計算方法;

3、拓撲圖

如何分析EIGRP協議

兩臺相鄰的路由器要建立起鄰接關系需要滿足兩個條件,為相同的AS號和相匹配的K值。以R2為例,你可以使用“Show ip protocols”命令來查看

R2#show ip protocols

Routing Protocol is “eigrp 200 “

Outgoing update Filter list for all interfaces is not set

Incoming update filter list for all Interfaces is not set

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 1

Redistributing: eigrp 200

automatic network summarization is not in effect

Maximum path: 4???

Routing for Networks:???

192.168.10.0

192.168.20.0

192.168.40.0

192.168.50.0

0.0.0.0

Routing Information Sources:????????

Gateway ?????????????????????????? Distance ??????????????????????????? Last Update

192.168.10.2 ?????????????????? 90 ????????????????????????????? 330051

192.168.20.2 ?????????????????? 90 ????????????????????????????? 356798

192.168.40.2 ?????????????????? 90 ????????????????????????????? 382527

192.168.50.2 ?????????????????? 90 ????????????????????????????? 418109

Distance: internal 90 external 170??????????

由于當前最大允許4條線路負載均衡,若路由器允許可繼續增加線路,可用maximum-paths *來修改數量(*代表數量單位)。此外,可以注意到以紅色字體標出的“eigrp 200”,它表示當前使用的EIGRP自主系統號為200

EIGRP metric weight K1=1, K2=0, K3=1, K4=0, K5=0則為K值,其含義如下:

K1代表帶寬

K2代表負載

K3代表延時

K4和K5代表可靠性

默認情況下EIGRP只使用了帶寬和負載為度量值計算參數。若要修改K值可用metric weights tos k1 k2 k3 k4 k5命令,其中tos被用作服務質量區分服務等級,0為不啟用,1為啟用。

(1)、鄰居表

R2#show ip eigrp neighbors

IP-EIGRP neighbors for process 100

H? Address? ????Interface? Hold? Uptime? SRTT? RTO? Q?? Seq

??????????????????????????(sec)????????? (ms)????? Cnt? Num

0??192.168.10.2?Se1/1????? 12??? 00:11:47?40??1000? 0???78

1??192.168.20.2 Se1/0????? 12??? 00:11:20?40? 1000? 0?? 80

2? 192.168.40.2 Se1/2????? 11??? 00:10:54 40? 1000? 0?? 91

3? 192.168.50.2 Se1/3????? 14??? 00:10:19?40? 1000? 0?? 94

“H”表示鄰居被學到的先后順序,0是最先學到的鄰居;

“Address”是鄰居路由接口IP;

“Interface”是本地路由和這個鄰居相連的接口;

“Hold”是當前的保持時間,默認15秒,是一個遞減的數值;

“Uptime”是鄰居進入鄰居表到當前經過了多長時間;

“SRTT”是指正常往返時間,它以毫秒計算報文在路由器間傳送的平均往返時間的測量;

“RTO”是指確定重傳間隔值;

“Q”是指隊列計數,列是發送隊列中等待報文數。此數值若高于0說明鏈路中有擁塞;

(2)、路由表

R2#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

10.0.0.0/16 is subnetted, 5 subnets

D ???????????? 10.2.0.0 [90/20640000] via 192.168.10.2, 00:13:00, Serial1/1

D ???????????? 10.5.0.0 [90/20640000] via 192.168.20.2, 00:12:48, Serial1/0

C ????????????? 10.6.0.0 is directly connected, Loopback0

D ???????????? 10.11.0.0 [90/20640000] via 192.168.50.2, 00:12:23, Serial1/3

D ???????????? 10.12.0.0 [90/20640000] via 192.168.40.2, 00:12:35, Serial1/2

192.168.10.0/30 is subnetted, 1 subnets

C ????????????? 192.168.10.0 is directly connected, Serial1/1

192.168.20.0/30 is subnetted, 1 subnets

C ????????????? 192.168.20.0 is directly connected, Serial1/0

192.168.30.0/30 is subnetted, 1 subnets

D ???????????? 192.168.30.0 [90/21024000] via 192.168.40.2, 00:12:35, Serial1/2

[90/21024000] via 192.168.50.2, 00:12:23, Serial1/3

192.168.40.0/30 is subnetted, 1 subnets

C ????????????? 192.168.40.0 is directly connected, Serial1/2

192.168.50.0/30 is subnetted, 1 subnets

C ????????????? 192.168.50.0 is directly connected, Serial1/3

路由表中若出現”D *.*.*.*/* is a summary, 00:15:00, Null0″,是一條自動匯總產生的路由,EIGRP和RIP默認都在主網邊界自動匯總,而不同的是EIGRP會在本地產生一條自動匯總后的路由,目標指向空接口(Null0)發往空接口的數據會被丟棄。每條鏈路都會有自動匯總記錄,從而有效地避免路由環路的產生。不必使用自動匯總功能,可以通過取消no auto-summary來實現。

D 192.168.30.0 [90/21024000] via 192.168.40.2, 00:12:35, Serial1/2這是一條通過EIGRP學到的最終路由,D代表是通過EIGRP學到的,可以看到192.168.30.0/30這條鏈路是被匯總得來的,[90/21024000]中的90是EIGRP默認的管理距離,后面是度量值。可以通過R4或R5中的任何一個路由器到達192.168.30.0/30這條鏈路。

(3)、拓撲表

R2#show ip eigrp topology

IP-EIGRP Topology table for AS 200

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

r – Reply status

P 10.2.0.0/16, 1 successors, FD is 20640000

via 192.168.10.2 (20640000/128256), Serial1/1

P 10.5.0.0/16, 1 successors, FD is 20640000

via 192.168.20.2 (20640000/128256), Serial1/0

P 10.6.0.0/16, 1 successors, FD is 128256

via Connected, Loopback0

P 10.11.0.0/16, 1 successors, FD is 20640000

via 192.168.50.2 (20640000/128256), Serial1/3

via 192.168.40.2 (21152000/2297856), Serial1/2

P 10.12.0.0/16, 1 successors, FD is 20640000

via 192.168.40.2 (20640000/128256), Serial1/2

via 192.168.50.2 (21152000/2297856), Serial1/3

P 192.168.10.0/30, 1 successors, FD is 20512000

via Connected, Serial1/1

P 192.168.20.0/30, 1 successors, FD is 20512000

via Connected, Serial1/0

P 192.168.30.0/30, 2 successors, FD is 21024000

via 192.168.40.2 (21024000/2169856), Serial1/2

via 192.168.50.2 (21024000/2169856), Serial1/3

P 192.168.40.0/30, 1 successors, FD is 20512000

via Connected, Serial1/2

P 192.168.50.0/30, 1 successors, FD is 20512000

via Connected, Serial1/3

其中P表示被動路由,即路由是穩定可用的。

Successors是到達遠程網絡的主要路由,對任何特定的路由可以有多達標4條后繼路由。

例如:192.168.10.0/30, 1 successors,為去往192.168.10.0/30的最佳路徑,FD為可行距離。

(4)、EIGRP度量值的計算方法

EIGRP通過組合帶寬、延遲、可靠性和負載等因素的復合度量值計算到目的地址的最佳路徑。如果K1、K2、K3、K4、K5都不為0,則可使用以下公式計算復合度量值:

Metric=[K1*Bandwidth+(K2*Bandwidth)/(256-Load)+K3*Delay]*[K5/(Reliability+K4)]

其中K1影響的是帶寬(Bandwidth),K2影響的是負載(Load),K3影響的是延時(Delay),K4和K5影響的是可靠性(Reliability);

一般情況下Cisco路由器只使用K1和K3來進行復合度量值的計算,所以公式同樣可以使用如下公式:

重寫后的句子: The metric is calculated as 256 times the sum of (10000M divided by the minimum link bandwidth between the source and destination, plus the sum of all link delays between the source and destination divided by 10).

其中源和目的之間最低鏈路帶寬,單位是M;源和目的之間所有鏈路延時總和,單位是微秒(usec);那么為什么我要用延時總和除以10,那是因為EIGRP度量值計算中是使用10微秒作為單位進行計算的。

下面我們看看實驗,例如要計算R2到R1的loopback0接口的復合度量值,怎么計算?

首先我們要注意R2到R1的loopback0接口的度量值,要使用R2向R1的loopback0接口方向的出接口的帶寬和延時作為參數來計算:

R2#show int se1/1

Serial1/1 is up, line protocol is up (connected)

Hardware is HD64570

Internet address is 192.168.10.1/30

MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec,

如上可以查看到R2的Serial 1/1接口參數為BW帶寬等0.128M,延時為20000微秒。

R1#show int loopback0

Loopback0 is up, line protocol is up (connected)

Hardware is Loopback

Internet address is 10.2.0.2/16

MTU 1514 bytes, BW 8000000 Kbit, DLY 5000 usec,

如上為R1的loopback0接口的參數,其帶寬為8000M,延時為5000微秒。

那么我來根據公式“重寫后的句子: The metric is calculated as 256 times the sum of (10000M divided by the minimum link bandwidth between the source and destination, plus the sum of all link delays between the source and destination divided by 10).”,如果R2的Serial1/1去往R1的loopback0接口,最低鏈路帶寬是0.128M,延時總和是Serial1/1的延時+R1的loopback0接口的延時=20000+5000,把它代入公式計算:

[10000/R2的serial1/1接口帶寬(單位M)+(R2的serial1/1接口延時+R1的loopback0接口延時)/10]*256

即[10000/0.128+(20000+5000)/10]*256

[78125+2500]*256=20640000

下面我們來驗證一下,R2去往R1的loopback0端口

R2#show ip eigrp topology

IP-EIGRP Topology Table for AS 200

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

r – Reply status

P 10.2.0.0/16, 1 successors, FD is 20640000

via 192.168.10.2 (20640000/128256), Serial1/1

P 10.5.0.0/16, 1 successors, FD is 20640000

via 192.168.20.2 (20640000/128256), Serial1/0

P 10.6.0.0/16, 1 successors, FD is 128256

via Connected, Loopback0

P 10.11.0.0/16, 1 successors, FD is 20640000

via 192.168.50.2 (20640000/128256), Serial1/3

via 192.168.40.2 (21152000/2297856), Serial1/2

P 10.12.0.0/16, 1 successors, FD is 20640000

via 192.168.40.2 (20640000/128256), Serial1/2

via 192.168.50.2 (21152000/2297856), Serial1/3

P 192.168.10.0/30, 1 successors, FD is 20512000

via Connected, Serial1/1

P 192.168.20.0/30, 1 successors, FD is 20512000

via Connected, Serial1/0

P 192.168.30.0/30, 2 successors, FD is 21024000

via 192.168.40.2 (21024000/2169856), Serial1/2

via 192.168.50.2 (21024000/2169856), Serial1/3

P 192.168.40.0/30, 1 successors, FD is 20512000

via Connected, Serial1/2

P 192.168.50.0/30, 1 successors, FD is 20512000

via Connected, Serial1/3

? 版權聲明
THE END
喜歡就支持一下吧
點贊14 分享