一:eigrp簡介:
EIGRP:Enhanced Interior Gateway Routing Protocol 即 加強型内部網關路由協定,協定号88。 EIGRP是Cisco公司的私有協定。Cisco公司是該協定的發明者和唯一具備該協定解釋和修改權的廠商。 EIGRP結合了鍊路狀态和距離矢量型路由選擇協定的特點,采用彌散修正算法(DUAL)來實作快速收斂,可以不發送定期的路由更新資訊以減少帶寬的占用,支援Appletalk、IP、Novell和NetWare等多種網絡層協定。
二:協定特點:
1:支援自動彙總路由,可以手動關閉
2:100% 無環路的無類别的路由選擇協定
3:路由增量更新和觸發更新
4:支援等負載均衡,非等負載均衡
5:用多點傳播位址(224.0.0.10)和單點傳播位址代替了廣播位址,減少帶寬占用
6:支援可變長度子網路遮罩(VLSM)和不連續的子網。
7:收斂速度快
8:支援多網絡層協定
三:eigrp的封包類型
1: Hello封包: 建立鄰居關系(Establish neighbor relationships)。Hello包在一般的網絡中(比如點到點,point-to-point)是每<b>5</b>秒多點傳播<b>1</b>次;在多點(multipoint)X.25,
幀中繼(Frame Relay,FR)和ATM接口(比如ATM SVC)和ISDN PRI接口上,Hello包的發送間隔是<b>60</b>
2: 更新封包(Update):傳送路由更新( Send routing updates)。采用單點傳播或多點傳播的方式發送.更新發生在路由器啟動,拓撲或度發生變化,和路由狀态的遷移
3:查詢封包(Query): 向鄰居請求有關的路由更新(Ask neighbors about routing information)。當路由器開始進行路由計算和沒有FD的時候,它就發送給鄰居一個可靠的查
詢包來詢問是否有到達目的地的FD.查詢包通常以多點傳播的方式發送
4:回應封包(Reply): 對查詢(query)封包作出回應(Respond to query about routing information)。以單點傳播的方式發回給發出查詢包的路由器,作為應答
5:确認封包(ACK): 對可靠的封包進行确認(Acknowledge a reliable packet)。ACK 包是采用單點傳播的 hello 包,包含非 0 的确認數字.update 包,query包和 reply包均是可
靠發送,是以它們都需要确認;而 hello 包和ACK包就不需要确認
四:eigrp的三張表格
1.鄰居表格。使用hello包來發現鄰居
2.拓撲結構資料庫。鄰居關系形成後互相交換路由資訊,形成了拓撲結構資料庫。撲結構資料庫中包含了路由的最佳路徑和次佳路徑,直接把路由拿出來放進路由表項,且有
備份的路由資訊。
3.路由表。将拓撲結構資料庫中的路由資訊直接拿出來放入路由表中,如果最佳路由宕掉,則将備份的路由資訊拿出來放入路由表中
五:eigrp的相關術語:
1:後繼者路由器 (successor ): 通告到目的網絡擁有最小度量路由的鄰居路由器。
2:可行後繼者路由器 ( feasible successor ):本地路由器的鄰居路由器通告的到達目的網絡的距離滿足了可行性條件,那麼這個鄰居路由器就成為到那個目的網絡的一個可行後繼路由器 .
3:可行距離:到達目标網絡的最小的metric将作為到達目标網絡的FD
4:可行性條件(feasibility condition): 本地路由器的一個鄰居路由器所通告的到達一個目的網絡的距離是否小于本地路由器到達相同目的網絡的可行距離FD。
5:非等代價負載均衡需要滿足的條件:
1:Variance指令 允許路徑成本是最優路由的最小路徑成本的整數倍的路由。
且最優路徑乘以variance 所配置的整數倍必須大于其他路徑的路徑成本
2:其他路徑的AD必須小于最優路徑的FD
6:關閉自動彙總:(config-router)#no auto-summary
手動彙總(彙總是基于配置在網絡中任意路由器的每一個接口上):(config-if)#ip summary-address eigrp [as-number] [address] [mask]
7:eigrp的末節區域(stub):任何鄰居路由器從末節路由區域接收到封包資訊,就不會向末節區域路由器查詢任何路由。進而減少了資源的利用。
配置:Router(config-router)#eigrp stub [receive only|connected|static|summary]
receive-only: 防止STUB路由器發送路由更新
connected: 允許STUB路由器發送直連路由資訊
static : 允許STUB路由器發送重釋出靜态的路由
summary : 允許STUB路由器發送彙總路由資訊
8:eigrp使用反子網路遮罩通告網絡。如果通告的網絡是有類網絡,則不用寫反子網路遮罩,如果通告的網路是五類網絡,在必須帶有反子網路遮罩。
R2(config-router)#network 192.168.4.0 0.0.0.7
9:配置認證:
Router(config)#key chain test #建立鑰匙鍊名為test
Router(config-keychain)#key 1 #規定第一個鑰匙
Router(config-keychain-key)#key-string cisco #鑰匙的密碼為cisco
Router(config)#interface serial 0 #進入接口模式
Router(config-if)#ip authentication key-chain EIGRP AS-number test #是鑰匙在eigrp上生效
Router(config-if)#ip authentication mode EIGRP AS-numbe md5 #使用md5加密
六:案例:
1:實驗要求:
配置ospf多區域,實驗多區域間的互通。且在ASBR也即R2上同過路由引入,将ospf引入eigrp中,将eigrp同過預設路由的方式引入ospf中,最終實作全網互通。
2:拓撲方案:
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_1344088778FyfC.png"></a>
3:配置
<b>R1</b>
R1(config)#int loo 0
R1(config-if)#ip add 192.168.5.1 255.255.255.0
R1(config-if)#no shut
R1(config)#int ser 0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config)#router ospf 100
R1(config-router)#network 192.168.1.0 0.0.0.255 area 1
R1(config-router)#network 192.168.5.0 0.0.0.255 area 1
顯示路由表資訊
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_1344088786AZGa.png"></a>
<b>R2</b>
R2#conf t
R2(config)#int ser 0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config)#int ser 0/1
R2(config-if)#ip add 192.168.2.1 255.255.255.0
R2(config)#int ser 0/2
R2(config-if)#ip add 192.168.6.1 255.255.255.0
R2(config)#router ospf 200
R2(config-router)#network 192.168.1.0 0.0.0.255 area 1
R2(config-router)#network 192.168.2.0 0.0.0.255 area 0
R2(config-router)#default-information originate always
R2(config)#router eigrp 100
R2(config-router)#network 192.168.6.0
R2(config-router)#redistribute ospf 200 metric 1000 200 255 1 1500
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_1344088795jZYv.png"></a>
<b>R4</b>
R4#conf t
R4(config)#int ser 0/0
R4(config-if)#ip add 192.168.2.2 255.255.255.0
R4(config-if)#no shut
R4(config)#int s 0/1
R4(config-if)#ip add 192.168.3.1 255.255.255.0
R4(config)#router ospf 400
R4(config-router)#network 192.168.2.0 0.0.0.255 area 0
R4(config-router)#network 192.168.3.0 0.0.0.255 area 2
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_1344088805kavW.png"></a>
<b>R5</b>
R5#conf t
R5(config)#int ser 0/0
R5(config-if)#ip add 192.168.3.2 255.255.255.0
R5(config-if)#no shut
R5(config)#int loo 0
R5(config-if)#ip add 192.168.4.1 255.255.255.0
R5(config)#router ospf 500
R5(config-router)#network 192.168.3.0 0.0.0.255 area 2
R5(config-router)#network 192.168.4.0 0.0.0.255 area 2
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_1344088814raaA.png"></a>
<b>R6</b>
R6(config)#int ser 0/0
R6(config-if)#ip add 192.168.6.2 255.255.255.0
R6(config-if)#no shut
R6(config)#int s 0/1
R6(config-if)#ip add 192.168.7.1 255.255.255.0
R6(config)#router eigrp 100
R6(config-router)#network 192.168.6.0
R6(config-router)#network 192.168.7.0
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_13440888239Lv4.png"></a>
<b>R7</b>
R7(config)#int ser 0/0
R7(config-if)#ip add 192.168.7.2 255.255.255.0
R7(config-if)#no shut
R7(config)#int loo 0
R7(config-if)#ip add 192.168.8.1 255.255.255.0
R7(config)#router eigrp 100
R7(config-router)#network 192.168.7.0
R7(config-router)#network 192.168.8.0
<a href="http://5493845.blog.51cto.com/attachment/201208/4/5493845_1344088833IyIB.png"></a>
本文轉自 liuyatao666 51CTO部落格,原文連結:http://blog.51cto.com/5503845/954519,如需轉載請自行聯系原作者