●配置實(shí)例

本節主要針對EIGRP協(xié)議配置申的被動(dòng)接口和不等度量值負載均衡的配置進(jìn)行演示和講解。
1.實(shí)驗目的
通過(guò)本實(shí)驗,讀者可以掌握以下技能
配置EIGRP被動(dòng)接口;
配置不等度量值負載均衡;
監測EIGRP協(xié)議相關(guān)信息。
2.設備需求
本實(shí)驗需要以下設備。
●Cisco路由器3臺,分別命名為R1、R2和R3。其中R1具有1個(gè)串行接口;R2具有
●2個(gè)串行接口和1個(gè)以太網(wǎng)接口;R3具有1個(gè)串行接口和2個(gè)以太網(wǎng)接口。
●2條DCE電纜和2條DTE電纜,或2條DCE轉DTE電纜。
●1條交叉線(xiàn)序雙絞線(xiàn)。
●1臺終端服務(wù)器,如Cisco2509路由器,及用于反向Telnet的相應電纜。
●1臺帶有超級終端程序的PC機,以及Console電纜及轉接器。
3.拓撲結構及配置說(shuō)明
實(shí)驗的拓撲結構如圖6-3所示。首先把DCE申纜和DTE電纜進(jìn)行對接,組成2對電纜,然后用這2對電纜把R1和R3,R2和R3連接起來(lái)。然后通過(guò)交叉線(xiàn)序雙絞線(xiàn)把R2和R3連接起來(lái)。

各路由器使用的接口及其編號見(jiàn)圖6-3中的標注。
各接口IP地址分配如下:
R1: 51 201.1.13.1/30, L0 192.1.1.1/24
R2: 50 201.1.23.1/30, E0 200.1.1.2/24, L0 192.1.2.2/24
R3: 50 201.1.23.2/30, S1 201.1.13.2/30, E0 200.1.1.3/24
實(shí)驗中R1、R3之間和R2、R3之間的串行線(xiàn)路速率設置為2000kbit/s。
4.實(shí)驗配置及監測結果
首先對3臺路由器進(jìn)行接口配置和EIGRP基本配置,各路由器的配置見(jiàn)配置清單6-2。
R1#sh runn
Building configuration...
Current configuratptime
service timestamps log uptime
no service password-encryption
!
hostname R1
!
ip subnet-zero
!
interface Loopback0
ip address 192.1.1.1255.255.255.0
!
interface Serial 1
bandwidth 2000
ip address 201.1.13.1 255.255.255.252
clockrate 2000000
!
router EIGRP 200
network 192.1.1.0
network 201.1.13.0 0.0.0.3
no auto-summary
no EIGRP Sog-neighbor-chailges
!
ip classless
ip http server
!
line con 0
line aux 0
line vty 0 4
password Cisco
login
!
end
R1#
第2段:R2路由器配置清單
R2#sh run
Building configuration...
Current configuration : 733 bytes
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R2
!
no logging console
ip subnet-zero
no ip finger!
!
interface Loopback0
ip address 192.1.2.2 255.255.255.0
!
interface Ethemet0
ip address 200.1.1.2 255.255.255.0
!
interface Serial0
bandwidth 2000
ip address 201.1.23.1 255.255.255.252
!
router EIGRP 200
network 192.1.2.0
network 200.1.1.0
network 201.1.23.0 0.0.0.3
no auto-summary
no EIGRP log-neighbor-changes
!
ip classless
ip http server
!
line con 0
line aux 0
line vty 0 4
!
end
R2#
第3段:R3路由器配置清單
R3#sh runn
Building configuration...
Current configuration : 744 bytes
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname R3
!
ip subnet-zero
no ip finger
!
interface Ethemet0
ip address 200.1.1.3 255.255.255.0
!
interface Serial0
bandwidth 2000
ip address 201.1.23.2 255.255.255.252
no fair-queue
clockrate 2000000
!
interface Serial 1
bandwidth 2000
ip address 201.1.13.2 255.255.255.252
!
router EIGRP 200
network 200.1.1.0
network 201.1.13.0 0.0.0.3
network 201.1.23.0 0.0.0.3
no auto-summary
no EIGRP log-neighbor-changes
!
ip classless
ip http server
!
line con 0
line aux 0
line vty 04
!
end
對于上述配置,沒(méi)有太多需要說(shuō)明的,請讀者注意串行接口配置和網(wǎng)絡(luò )聲明語(yǔ)句兩處容易出現錯誤的部分。
第1段:設置被動(dòng)接口
R3#sh ip route EIGRP
D 192.1.1.0/24[90/40640000]via 201.1.13.1,00:01:40,Serial1
D 192.1.2.0/24[90/409600]via 200.1.12.1,00:03:36,Ethernet0
R3#sh ip EIGRP neighbor
IP-EIGRP neighbors for process 200
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
1 201.1.13.1 Se1 10 00:01:51 810 4860 0 10
2 201.1.23.1 Se0 12 00:34:57 224 1344 0 23
0 200.1.1.2 Et0 12 00:38:57 12 200 0 24
R3#sh
Enter configuration commands,one per line.End with CNTL/Z.
R3(config)#router EIGRP 200
R3(config-router)#passive-interface s1
R3(config-router)#^Z
R3#sh
01:40:23:%SYS-5-CONFIG_I:Configured from console by console
R3:sh ip route EIGRP
D 192.1.2.0/24[90/409600]via 200.1.12.1,00:04:16,Ethernet0
R3#sh ip eigr neighbor
IP-EIGRP neighbor
IP-EIGRP neighbors for process 200
H Address Interface Hold Uptime SRTT RTO Q Seq Type
(sec) (ms) Cnt Num
2 201.1.13.1 Se0 11 00:35:35 149 894 0 28
0 200.1.1,2 Et0 11 00:39:36 11 200 0 27
R3#sh ip protocol
Routing Protocol is "EIGRP 200"
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
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
Routing for Networks:
200.1.1.0
201.1.13.0/30
201.1.23.0/30
Passive lnterface(s):
Serial1
Routing Information Sources:
Gateway Distance Last Update
201.1.13.1 90 00:02:39
200.1.1.2 90 00:00:27
201.1.23.1 90 00:00:27
Distance: internal 90 external 170
第2段:設置不等度量值負載均衡
R3#
R3#sh ip EIGRP topology
IP-EIGRP Topology Table for AS(200)/ID(201.1.23.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 192.1.2,0/24, 1 successors, PD is 409600
via 200.1.1.2(409600/128256),Ethernet0
P201.1.13.1/30,1 successors,FD is 40512000
via Connected, Serial1
P 200.1,1.0/24, 1 successors,FD is 281600)
via Connected,Ethernet0
P201.1,23.0/30,1 successors,FD is 1792000
via Connected, Setial0
R3#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R3(config)#router EIGRP 200
R3(config-router)#variance 5
R3(config-router)#no passive-int si
R3(config-router)#^Z
R3#sh ip route
Codes: C - connected, S - static, I - igrp, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - external, 0 - 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
201.1.23.0/30 is subnetted, i subnets
C 201.1.23.01s directly connected, Serial0
C 200.1.1.0/24 is directly connected, Ethernet0
201.1.13.0/30 is subnetted, 1 subnets
C 201.1.13.0 is directly connected, Serial1
D 192.1.2.0/24[90/1920000]via 201.1.13.2,00:00:43, Serial1
D 192.1.2.0/24[90/409600]via 200.1.1.2,00:00:43, Ethernet0
R3#cle ip route *
R3#sh ip route
Codes: C - connected, S - static, I - igrp, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, 0 - 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
201.1.23.0/30 is subnetted, 1 subnets
C 201.1.23.01s directly connected, Serial0
C 200.1.1.0/24 is directly connected, Ethemet0
201.1.13.0/30 is subnetted, 1 subnets
C 201.1.13.01s directly connected. Serial 1
D 192.1.1.0/24[90/1920000]via 201.1.13.1,00:00:02,Serial1
D 192.1.2.0/24[90/409600]via 200.1.1.2,00:00:02,Ethernet0
[90/1920000]via 201.1.23.1,00:00:02,Serial0
R3#
Term_Server>2
[Resuming connection 2 to R2 ... ]
R2#sh ip EIGRP topology
IP-EIGRP Topology Table for AS(200)/ID( 192.1.2.2)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 192.1.1.0/24,1 successors,FD is 1945600
via 200.1.1.3(1945600/1920000),Ethernet0
via 201.1.23.2(2432000/1920000),Serial0
P 192.1.2.0/24, 1 successors, FD is 128256
via Connected, Loopback0
P 201.1.13.0/30, 1 successors, FD is 1817600
via 200.1.1.3(1817600/1792000),Ethernet0
via 201.1.23.2(234000/1792000),Serial0
P 200.1.1.0/24, 1 successors, FD is 281600
via Connected, Ethemet0
P 201.1.23.0/30, 1 successors, FD is 1792000
via Connected, Serial0
R2#sh ip route ei
201.1.13.0/30 is subnetted, 0 subnets
D 201.1.13.0[90/1817600]via 200.1.1.3,00:05:12,Ethernet0
D 192.1.1.0/24[90/1945600]via 200.1.1.3,00:05:12,Ethernet0
R2#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router EIGRP 200
R2(config-router)#variance 5
R2(ccmfig-router)#^Z
R2#cle ip route *
R2#sh ip route EIGRP
201.1.13.0/30 is subnetted, 1 subnets
D 201.1.13.0 [90/1817600] via 200.1.1.3, 00:00:05, Ethernet0
[90/2304000] via 201.1.23.2, 00:00:05, Serial0
D 192.1.1.0/24 [90/1945600] via 200.1.1.3, 00:00:05,Ethernet0
[90/2432000] via 201.1.23.2, 00:00:05, Serial0
R2#
R2#conft
Enter configuration commands, one per line. End with CNTL/Z.
R2(config)#router EIGRP 200
R2(config-router)#maximum-paths 1
R2(config-router)#^Z
R2#sh ip route EIGRP
201.1.13.0/30 is subnetted, 1 subnets
有一些Show和Debug命令是監測和診斷EIGRP協(xié)議的配置時(shí)常用的,熟悉這些俞令,將有利于對EIGRP進(jìn)行配置和排障。本節對這些命令進(jìn)行演示和講解。
1.實(shí)驗目的
通過(guò)本實(shí)驗,讀者可以掌握以下技能
查看EIGRP的流量信息;
查看EIGRP拓撲信息,
監測EIGRP相關(guān)信息。
2.設備需求及拓撲結構
本實(shí)驗是在實(shí)驗1配置成功的基礎上進(jìn)行的,設備和拓撲結構與實(shí)驗1完全相同。為了閱讀上的方便,現將拓撲結構圖復制到這里,見(jiàn)圖6-2。

3.實(shí)驗配置及監測結果
本實(shí)驗主要演示show ip EIGRP topoTogy、show ip EIGRP traffic、debug ip EIGRP和debug EIGRP packet等命令的用法和輸出結果。
監測清單6-2記錄了實(shí)驗的全過(guò)程,隨后有對相應內容的講解。
監測清單6-2 使用EIGRP常用的監測和診斷命令
R1#
R1#sh ip EIGRP ?
interfaces IP-EIGRP mterfaces
neighbors IP-Bigrp neighbors
topology IP-EIGRP Topology Table
traffic IP-EIGRP Traffic Statistics
R1#sh ip EIGRP topology
IP-EIGRP Topology Table for AS(100)/ID(10.1.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 10..1.1.O/24, 1 successors, FD is 128256
via Connected, Loopback0
P 201.1.12.0/30, 1 successors, FD is 1792000
via Coimected, Serial0
P 201,1.13.0/30, 1 successors.FD is 1792000
via Connected, Serial 1
P 200.1.1.0/24, 2 successors, 3FT>is 1817600
via 201,1.13,2 (181760028160), Serial1
via 201.1.12.2 (1817600/281101, Serial0
R1#sh ip EIGRP traffic
IP-EIGRP Traffic Statistics for process 100
Hellos sent/received:2469/2341
Updates :seBt/received:8/8
Queries seBt/received: 0/0
Replies seat/received: 0/0
Acks sent/received: 4/4
Input queue high water mark 2, 0 drops
SIA-Queries sent/received: 0/0
SIA-Replies sent/received: 0/0
R1#conft
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#logg console
R1(config)#^Z
01:44:12: %SYS-5-CONFIG_1: Configured from console by console
R1#debug ip EIGRP
IP-EIGRP Route Events debugging is on
R1#
R1#conft
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#int si
R1(config-if)#shut
R1(config-if)#^Z
R1#
01:47:45:IP-EIGRP: 201.1.13.0/30 -do advertise out Serial0
01:47:45: IP"EIGRP: Int 201,1,13.0/30 metric 4294967295-04294967295
01:47:45: IP-EIGRP: Processiag incoming REPLY packet
01:47:45: IP-EIGRP: Int 201.1,13.0/30 M 2329600-1280000 1049600 SM 1817600 - 1280000537600
01:47:45: IP-EIGRP: 201.1.13.0/30 routing table not updated
01:47:45: IP-EIGRP: Int 201.1.13.0/30 metric 2329600- 1280000 1049600
R1#
01:47:47: %LINK-5-CHANGED: Interface Seriall, changed state to administratively down
R1#
R1#imdebug all
All possible debugging has been turned off
R1#debug EIGRP packet
EIGRP Packets debugging is on
(UPSTATE, REQUEST, QUBRY, REPLY, HELLO, IPXSAP, PROBE, ACK, STUB, SIAQUERY,SIAREPLY)
R1#
01:48:17: EIGRP: Sending HELLO onLoopback0
01:48:17: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQun/rely 0/0
01:48:17: EIGRP: Received HELLO on LoopbackO nbr 10.1.1.1
01:48:17: AS 100, Flags 0x0, Seq O/OidbQ 0/0
01:48:17: EIGRP: Packet from ourselves ignored
R1#
01:48:19: Sending HELLO on Serial0
01:48:19: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
R1#
01:48:20: EIGRP: Received HELLO on nbr 201.1.12.2
01:48:20: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
R1#undebug all
R1#
R1#sh ip route
D 200.L 1.0/24[90/1817600} via 201.1.12.2, 01:02:29, Serial0
(1)show ip EIGRP命令下有4個(gè)子命令,即interfaces、neighbors、topology和traffic,分別查看EIGRP協(xié)議的接口、鄰居。拓撲和流量等信息。本實(shí)驗中重點(diǎn)考察topology和traffic。兩個(gè)子命令。
(2)show ip EIGRP topology命令列出從EIGRP協(xié)議所獲取的所有路由信息。
實(shí)驗中給出了在R1路由器上使用此命令的結果,其中前3項(10.1.1.0/24、201.1.12.0/30和201.1.13.0/30)是直連接口上的網(wǎng)段。最后1項(200.1.1.0/24)有2個(gè)路由信息源,即R2和R3的IP地址。
show ip EIGRP topology命令給出所有EIGRP路由信息,但并不是說(shuō)所有這些信息都進(jìn)入路由表而被路由器所使用,只有最佳的路由才被使用。最佳的路由就是度量值最小的路由。
(3)show ip EIGRP traffic命令顯示了EIGRP協(xié)議所產(chǎn)生和使用的各種信息包的發(fā)送和接收情況,其中主要有Hello、Update(更新)、Query(查詢(xún))。Reply(應答)、ACK(確認)幾種包的類(lèi)型。缺省情況下Hello包每5s鐘發(fā)送1次,所以它的收發(fā)數最多;在一個(gè)穩定運行的網(wǎng)絡(luò )中,其他各種包都較少。
(4)debu ip EIGRP監測IP EIGRP路由事件信息。為了查看路由變化的情況,我們手工把R1路由器的S1接口關(guān)閉,查看輸出的Debug信息。監測表明有關(guān)201.1.13.0/30網(wǎng)段的路由信息己經(jīng)出現變化。
(5)debug EIGRP packet命令主要監測EIGRP使用的各種信息包的收發(fā)情況,實(shí)驗記錄中主要是Hello包的信息。
(6)最后我們看到,關(guān)閉了S1接口后,R1路由器的路由表中只有通過(guò)201.1.12.2到達200.1.1.0/24網(wǎng)段這一條路由。
聯(lián)系客服