EIGRP的基本配置
EIGRP的基本配置
1、? 實驗目的:
通過本次的實驗,我們可以掌握如下技能:
1)??????? 在路由器上啟用EIGRP路由進程
2)??????? 啟用參與路由協議的借口,并且通告網絡
3)??????? EIGRP度量值的計算
4)??????? 可行距離(FD)、通告距離(RD)、以及可行性條件(FC)
5)??????? 臨界表、拓撲表及其路由表的含義
6)??????? 查看和調試EIGRP路由協議相關信息
2、? 實驗拓撲圖:
3、? 實驗步驟:
(1)?????? 根據網絡拓撲,配置各個接口地址
R1(config-if)#interface loopback 0
R1(config-if)#ip ad
R1(config-if)#ip address 1.1.1.1 255.255.255.0
R1(config-if)#no sh
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#interface serial 2/0
R1(config-if)#ip ad
R1(config-if)#ip address 192.168.1.1 255.255.255.252
R1(config-if)#cl
R1(config-if)#clock r
R1(config-if)#clock rate 128000
R1(config-if)#no sh
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#
?
?
Router>en
Router#conf t
Enter configuration commands, one per line.? End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R2
R2(config)#int
R2(config)#interface s
R2(config)#interface serial 2/0
R2(config-if)#ip ad
R2(config-if)#ip address 192.168.1.2 255.255.255.252
R2(config-if)#no sh
R2(config-if)#no shutdown
?
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
R2(config-if)#exit
R2(config)#int
R2(config)#interface se
R2(config)#interface serial 3/0
R2(config-if)#clock r
R2(config-if)#clock rate 128000
R2(config-if)#ip ad
R2(config-if)#ip address 192.168.2.1 255.255.255.252
R2(config-if)#no sh
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
?
?
?
Router(config)#hostname R3
R3(config)#int
R3(config)#interface s
R3(config)#interface serial 3/0
R3(config-if)#ipa d
R3(config-if)#ip ad
R3(config-if)#ip address 192.168.2.2 255.255.255.252
R3(config-if)#no sh
R3(config-if)#no shutdown
R3(config)#interface s
R3(config)#interface serial 2/0
R3(config-if)#ip address 192.168.3.1 255.255.255.252
R3(config-if)#cl
R3(config-if)#clock r
R3(config-if)#clock rate 128000
R3(config-if)#no sh
R3(config-if)#no shutdown
?
R3(config-if)#exit
R3(config)#
?
?
R4(config-if)#interface loopback 0
R4(config-if)#ip ad
R4(config-if)#ip address 4.4.4.4 255.255.255.0
R4(config-if)#no sh
R4(config-if)#no shutdown
R4(config-if)#exit
R4(config)#inr
R4(config)#int
R4(config)#interface s
R4(config)#interface serial 2/0
R4(config-if)#ip ad
R4(config-if)#ip address 192.168.3.2 255.255.255.252
R4(config-if)#no shutdown
(2)?????? 啟用EIGRP路由協議,并將網絡發布出去
R1(config)#router eigrp 1
R1(config-router)#no au
R1(config-router)#no auto-summary
R1(config-router)#network 1.1.1.0 0.0.0.255
R1(config-router)#network 192.168.1.0
R1(config-router)#
?
?
R2(config)#router eigrp 1
R2(config-router)#no auto-summary
R2(config-router)#network 192.168.1.0
R2(config-router)#network 192.168.2.0
R2(config-router)#
?
?
R3(config)#router eigrp 1
R3(config-router)#no auto-summary
R3(config-router)#network 192.168.2.0
R3(config-router)#network 192.168.2.0
R3(config-router)#net
R3(config-router)#network 192.168.3.0
R3(config-router)#
?
?
R4(config)#router eigrp 1
R4(config-router)#ne
R4(config-router)#network 4.4.4.0 0.0.0.255
R4(config-router)#network 192.168.3.0
R4(config-router)#
(3)?????? 測試網絡情況
查看路由表:
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
?
???? 1.0.0.0/24 is subnetted, 1 subnets
D?????? 1.1.1.0 [90/20640000] via 192.168.1.1, 00:03:28, Serial2/0
D??? 4.0.0.0/8 [90/21152000] via 192.168.2.2, 00:01:56, Serial3/0
C??? 192.168.1.0/24 is directly connected, Serial2/0
C? ? 192.168.2.0/24 is directly connected, Serial3/0
D??? 192.168.3.0/24 [90/21024000] via 192.168.2.2, 00:02:33, Serial3/0
R2#
?? 以上的輸出可以看出,路由器R2通過EIGRP路由協議學習到了3條路由條目,管理距離是90。注意:EIGRP協議代碼用字母“D”表示。
對于EIGRP度量值的計算,不妨以“D?????? 1.1.1.0 [90/20640000] via 192.168.1.1, 00:03:28, Serial2/0”條目來說明。
EIGRP度量值的計算公式是[K1*Bandwidth+(K2*Bandwidth)/(256-load)+K3*delay]*[K5/(reliability+K4)]*256
在默認的情況下,K1=K3=1,K2=K4=K5=0
Band>所經由鏈路中的入口帶寬的最小值。
Delay=所經由鏈路中入口的延遲之和/10
所以本路由條目的度量值應該是[10^7/128+(5000+20000)/10]*256=2064000和路由器計算的結果是一樣的。
?
查看路由協議
R2#show ip protocols
?
Routing Protocol is "eigrp? 1 "
? 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
//顯示計算度量值所用的K值
? EIGRP maximum hopcount 100
//EIGRP支持的最大跳數
? EIGRP maximum metric variance 1
//variance默認值是1,即默認支持等價路徑的負載均衡
Redistributing: eigrp 1
? Automatic network summarization is not in effect?
//顯示自動匯總已經關閉,默認自動匯總的開啟的
? Maximum path: 4
? Routing for Networks:?
???? 192.168.1.0
???? 192.168.2.0
? Routing Information Sources:?
??? Gateway???????? Distance????? Last Update
??? 192.168.1.1???? 90??????????? 821438????
??? 192.168.2.2???? 90??????????? 867625????
? Distance: internal 90 external 170
?
R2#
?
查看EIGRP鄰居信息
R2#show ip eigrp neighbors
IP-EIGRP neighbors for process 1
H?? Address???????? Interface????? Hold Uptime??? SRTT?? RTO?? Q?? Seq
?????????? ??????????????????????? (sec)????????? (ms)??????? Cnt? Num
0?? 192.168.1.1???? Se2/0????????? 11?? 00:17:49? 40???? 1000? 0?? 7
1?? 192.168.2.2???? Se3/0????????? 11?? 00:17:03? 40???? 1000? 0?? 9
?
R2#
以上可以顯示了鄰居的信息,有鄰居接口地址,從鄰接關系建立到目前的時間等信息。
?
Show ip eigrp toplogy
R2#show ip eigrp topology
IP-EIGRP Topology Table for AS 1
?
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
?????? r - Reply status
?
P 192.168.1.0/24, 1 successors, FD is 20512000
???????? via Connected, Serial2/0
P 1.1.1.0/24, 1 successors, FD is 20640000
???????? via 192.168.1.1 (20640000/128256), Serial2/0
P 192.168.2.0/24, 1 successors, FD is 20512000
???????? via Connected, Serial3/0
P 192.168.3.0/24, 1 successors, FD is 21024000
???????? via 192.168.2.2 (21024000/20512000), Serial3/0
P 4.0.0.0/8, 1 successors, FD is 21152000
???????? via 192.168.2.2 (21152000/20640000), Serial3/0
R2#
以上的輸出可以看出每條路由條碼的FD和RD的值。
?
?
R1#show ip eigrp traffic
IP-EIGRP Traffic Statistics for process 1
? Hellos sent/received: 795/307
? Updates sent/received: 4/5
? Queries sent/received: 0/0
? Replies sent/received:? 0/0
? Acks sent/received:? 5/4
? Input queue high water mark 1, 0 drops
? SIA-Queries sent/received: 0/0
? SIA-Replies sent/received: 0/0
?
R1#
以上可以看出EIRP發送和接收到的數據包的統計情況。
?
(4)?????? 注入默認路由
在路由器R1上使用“IP default-network”可以向EIGRP網絡中注入一條默認路由,具體配置如下:
R1(config-if)#interface loopback 1
R1(config-if)#ip address 192.168.5.1 255.255.255.0
R1(config)#router eigrp 1
R1(config-router)#ne
R1(config-router)#network 192.168.5.0 0.0.0.255
R1(config-router)#exit
R1(config)#ip de
R1(config)#ip default-network 192.168.5.0
R1(config)#
?
查看R2的路由條目
R2#show ip ro
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 192.168.1.1 to network 192.168.5.0
?
???? 1.0.0.0/24 is subnetted, 1 subnets
D?????? 1.1.1.0 [90/20640000] via 192.168.1.1, 00:29:13, Serial2/0
D??? 4.0.0.0/8 [90/21152000] via 192.168.2.2, 00:27:41, Serial3/0
C??? 192.168.1.0/24 is directly connected, Serial2/0
C??? 192.168.2.0/24 is directly connected, Serial3/0
D??? 192.168.3.0/24 [90/21024000] via 192.168.2.2, 00:28:18, Serial3/0
D*?? 192.168.5.0/24 [90/20640000] via 192.168.1.1, 00:00:56, Serial2/0
R2#
以上的輸出表明R2已經收到了一條默認的路由,同樣R3和R4也同樣可以收到。。
?
OK 實驗到此結束!!!!!!!
轉載于:https://blog.51cto.com/lorna8023/240460
總結
以上是生活随笔為你收集整理的EIGRP的基本配置的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 2009年5月14日
- 下一篇: asp.net程序中最常用的三十三种编程