CCNP之BSCI部分实验1:EIGRP基本配置和邻接
实验目的:
1. 配置简单的EIGRP
2. 检查EIGRP邻接
3. 查看EIGRP路由信息的改变
4. 用DEBUG命令进行排错
实验拓扑:如图
实验步骤:
r1(config)#int loo 1
r1(config-if)#ip add
*Mar 1 00:02:31.455: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r1(config-if)#ip add 1.1.1.1 255.255.255.0
r1(config-if)#description engineering department
r1(config-if)#int f1/0
r1(config-if)#ip add 172.16.1.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#
*Mar 1 00:03:51.347: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up
*Mar 1 00:03:52.347: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
r1(config-if)#do sh ip int b检查接口的状态是否正常
Interface IP-Address OK? Method Status Protocol
Serial0/0 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
Serial0/2 unassigned YES unset administratively down down
Serial0/3 unassigned YES unset administratively down down
FastEthernet1/0 172.16.1.1 YES manual up up
Loopback1 1.1.1.1 YES manual up up
r1(config-if)#do ping 172.16.1.2用PING命令测试各路由器之间是否可以正常通讯
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/27/52 ms
r1(config-if)#do ping 172.16.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 8/31/52 ms
r1(config-if)#exit
r1(config)#router eigrp 1 启动EIGRP
r1(config-router)#no auto 关闭自动汇总
r1(config-router)#net 172.16.0.0 发布
r1(config-router)#net 1.0.0.0 EIGRP的基本配置
r1(config-router)#
*Mar 1 00:08:40.983: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.3 (FastEthernet1/0) is up: new adjacency
r1(config-router)#
*Mar 1 00:08:59.959: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.2 (FastEthernet1/0) is up: new adjacency邻接已经建立
r1(config-router)#do debug eigrp packets用debug eigrp packets来查看EIGRP的HELLO包发送情况,注意在那些端口上发送,发送间隔是多少。注意到路由器会忽略在自己的环回口上发到的数据。
EIGRP Packets debugging is on
(UPDATE, REQUEST, QUERY, REPLY, HELLO, IPXSAP, PROBE, ACK, STUB, SIAQUERY, SIAREPLY)
r1(config-router)#
*Mar 1 00:09:21.223: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:21.223: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:21.227: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:21.231: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:21.231: EIGRP: Packet from ourselves ignored
r1(config-router)#
*Mar 1 00:09:23.067: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.3
*Mar 1 00:09:23.071: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:23.075: EIGRP: Sending HELLO on FastEthernet1/0
*Mar 1 00:09:23.075: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:23.263: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.2
*Mar 1 00:09:23.267: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
r1(config-router)#
*Mar 1 00:09:26.027: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:26.027: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:26.031: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:26.035: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:26.035: EIGRP: Packet from ourselves ignored
r1(config-router)#
*Mar 1 00:09:27.683: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.3
*Mar 1 00:09:27.687: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:27.835: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.2
*Mar 1 00:09:27.839: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:27.931: EIGRP: Sending HELLO on FastEthernet1/0
*Mar 1 00:09:27.931: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1(config-router)#
*Mar 1 00:09:30.719: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:30.719: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:30.723: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:30.723: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:30.727: EIGRP: Packet from ourselves ignored
r1(config-router)#
*Mar 1 00:09:32.439: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.2
*Mar 1 00:09:32.443: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:32.527: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.3
*Mar 1 00:09:32.531: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:32.587: EIGRP: Sending HELLO on FastEthernet1/0
*Mar 1 00:09:32.587: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1(config-router)#
*Mar 1 00:09:35.183: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:35.183: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:35.187: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:35.187: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:35.191: EIGRP: Packet from ourselves ignored
r1(config-router)#
*Mar 1 00:09:36.927: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.3
*Mar 1 00:09:36.931: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:37.235: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.2
*Mar 1 00:09:37.239: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:37.287: EIGRP: Sending HELLO on FastEthernet1/0
*Mar 1 00:09:37.287: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1(config-router)#
*Mar 1 00:09:40.135: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:40.135: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:40.139: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:40.143: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:40.143: EIGRP: Packet from ourselves ignored
r1(config-router)#
*Mar 1 00:09:41.747: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.3
*Mar 1 00:09:41.751: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:41.991: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.2
*Mar 1 00:09:41.995: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:42.159: EIGRP: Sending HELLO on FastEthernet1/0
*Mar 1 00:09:42.159: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1(config-router)#
*Mar 1 00:09:44.955: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:44.955: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:44.959: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:44.959: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:44.963: EIGRP: Packet from ourselves ignored
r1(config-router)#do u
*Mar 1 00:09:46.143: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.3
*Mar 1 00:09:46.147: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:46.451: EIGRP: Received HELLO on FastEthernet1/0 nbr 172.16.1.2
*Mar 1 00:09:46.455: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Mar 1 00:09:47.127: EIGRP: Sending HELLO on FastEthernet1/0
*Mar 1 00:09:47.127: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1(config-router)#do un all
All possible debugging has been turned off
r1(config-router)#
*Mar 1 00:09:49.299: EIGRP: Sending HELLO on Loopback1
*Mar 1 00:09:49.299: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Mar 1 00:09:49.303: EIGRP: Received HELLO on Loopback1 nbr 1.1.1.1
*Mar 1 00:09:49.303: AS 1, Flags 0x0, Seq 0/0 idbQ 0/0
*Mar 1 00:09:49.307: EIGRP: Packet from ourselves ignored
r1(config-router)#do sh ip eigrp interfaces 查看那些端口与EIGRP有关
IP-EIGRP interfaces for process 1
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Fa1/0 2 0/0 102 0/1 388 0
Lo1 0 0/0 0 0/1 0 0
r1(config-router)#do sh 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
1.0.0.0/24 is subnetted, 1 subnets
C 1.1.1.0 is directly connected, Loopback1
2.0.0.0/24 is subnetted, 1 subnets
D 2.2.2.0 [90/156160] via 172.16.1.2, 00:03:39, FastEthernet1/0
3.0.0.0/24 is subnetted, 1 subnets
D 3.3.3.0 [90/156160] via 172.16.1.3, 00:04:02, FastEthernet1/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.1.0 is directly connected, FastEthernet1/0
r1(config-router)#do sh ip eigrp nei 查看路由器邻居关系的状态
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 172.16.1.2 Fa1/0 12 00:04:20 102 612 0 8
0 172.16.1.3 Fa1/0 12 00:04:39 102 612 0 7
r1(config-router)#do sh ip eigrp to 查看拓扑表,注意它们之间的差异
IP-EIGRP Topology Table for AS(1)/ID(1.1.1.1)
Codes: P - Passive, A - Active, U - Update, Q - Query, R - Reply,
r - reply Status, s - sia Status
P 1.1.1.0/24, 1 successors, FD is 128256
via Connected, Loopback1
P 2.2.2.0/24, 1 successors, FD is 156160
via 172.16.1.2 (156160/128256), FastEthernet1/0
P 3.3.3.0/24, 1 successors, FD is 156160
via 172.16.1.3 (156160/128256), FastEthernet1/0
P 172.16.1.0/24, 1 successors, FD is 28160
via Connected, FastEthernet1/0
r1(config-router)#
r2(config)#int loo 2
r2(config-if)#dec
*Mar 1 00:04:03.087: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback2, changed state to up
r2(config-if)#description marketing Department
r2(config-if)#ip add 2.2.2.2 255.255.255.0
r2(config-if)#int f1/0
r2(config-if)#ip add 172.16.1.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#
*Mar 1 00:05:05.539: %LINK-3-UPDOWN: Interface FastEthernet1/0, changed state to up
*Mar 1 00:05:06.539: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet1/0, changed state to up
r2(config-if)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
Serial0/0 unassigned YES unset administratively down down
Serial0/1 unassigned YES unset administratively down down
Serial0/2 unassigned YES unset administratively down down
Serial0/3 unassigned YES unset administratively down down
FastEthernet1/0 172.16.1.2 YES manual up up
Loopback2 2.2.2.2 YES manual up up
r2(config-if)#exit
r2(config)#router eigrp 1
r2(config-router)#no su
^
% Invalid input detected at '^' marker.
r2(config-router)#no au
r2(config-router)#net 172.16.0.0
r2(config-router)#net 2
*Mar 1 00:08:59.571: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.1 (FastEthernet1/0) is up: new adjacency
*Mar 1 00:08:59.575: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.3 (FastEthernet1/0) is up: new adjacency
r2(config-router)#net 2.0.0.0
r2(config-router)#do sh ip eigrp inter
IP-EIGRP interfaces for process 1
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Fa1/0 2 0/0 380 0/1 1756 0
Lo2 0 0/0 0 0/1 0 0
r2(config-router)#do sh ip eigrp n
IP-EIGRP neighbors for process 1
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 172.16.1.3 Fa1/0 13 00:04:29 683 4098 0 7
0 172.16.1.1 Fa1/0 11 00:04:29 78 468 0 7
r2(config-router)#
r3(config)#int loo 3
r3(config-if)#ip add 3
*Mar 1 00:05:11.119: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback3, changed state to up
r3(config-if)#ip add 3.3.3.3 255.255.255.0
r3(config-if)#description accounting Department
r3(config-if)#int f0/0
r3(config-if)#ip add 172.16.1.3 255.255.255.0
r3(config-if)#no sh
r3(config-if)#
*Mar 1 00:06:09.155: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:06:10.155: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
r3(config-if)#do sh ip int b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.16.1.3 YES manual up up
Loopback3 3.3.3.3 YES manual up up
r3(config-if)#exit
r3(config)#router eigrp 1
r3(config-router)#no au
r3(config-router)#net 3.0.0.0
r3(config-router)#net 172.16.0.0
r3(config-router)#
*Mar 1 00:08:40.023: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.1 (FastEthernet0/0) is up: new adjacency
r3(config-router)#
*Mar 1 00:08:58.935: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.2 (FastEthernet0/0) is up: new adjacency
r3(config-router)#do sh ip eigrp interfaces
IP-EIGRP interfaces for process 1
Xmit Queue Mean Pacing Time Multicast Pending
Interface Peers Un/Reliable SRTT Un/Reliable Flow Timer Routes
Lo3 0 0/0 0 0/1 0 0
Fa0/0 2 0/0 76 0/1 232 0
r3(config-router)#