R1配置
r1(config)#int lo0
r1(config-if)#ip ad 1.1.1.1 255.255.255.0
r1(config)#int s2/1
r1(config-if)#ip ad 192.168.0.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#int f0/0
r1(config-if)#ip ad 172.16.0.1 255.255.255.0
r1(config-if)#no sh
r1(config-if)#end
r1#sh ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.16.0.1 YES manual up up
Serial2/0 unassigned YES unset administratively down down
Serial2/1 192.168.0.1 YES manual up up
Serial2/2 unassigned YES unset administratively down down
Serial2/3 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
Serial3/1 unassigned YES unset administratively down down
Serial3/2 unassigned YES unset administratively down down
Serial3/3 unassigned YES unset administratively down down
Loopback0 1.1.1.1 YES manual up up
r1#conf t
r1(config)#router ei 100
r1(config-router)#net 1.1.1.1
r1(config-router)#net 172.16.0.1
r1(config-router)#net 192.168.0.1
r1(config-router)#end
R2配置
r2(config)#int lo0
r2(config-if)#ip ad 2.2.2.2 255.255.255.0
r2(config-if)#int s2/1
r2(config-if)#ip ad 192.168.0.2 255.255.255.0
r2(config-if)#no sh
r2#sh ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial2/0 unassigned YES unset administratively down down
Serial2/1 192.168.0.2 YES manual up up
Serial2/2 unassigned YES unset administratively down down
Serial2/3 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
Serial3/1 unassigned YES unset administratively down down
Serial3/2 unassigned YES unset administratively down down
Serial3/3 unassigned YES unset administratively down down
Loopback0 2.2.2.2 YES manual up up
r2#conf t
r2(config)#router ei 100
r2(config-router)#net 2.2.2.2
r2(config-router)#net 192.168.0.2
R3配置
r3(config)#int lo0
r3(config-if)#ip ad 3.3.3.3 255.255.255.0
r3(config-if)#int f0/0
r3(config-if)#ip ad 172.16.0.3 255.255.255.0
r3(config-if)#no sh
r3(config-if)#end
r3#sh ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 172.16.0.3 YES manual up up
Serial2/0 unassigned YES unset administratively down down
Serial2/1 unassigned YES unset administratively down down
Serial2/2 unassigned YES unset administratively down down
Serial2/3 unassigned YES unset administratively down down
Serial3/0 unassigned YES unset administratively down down
Serial3/1 unassigned YES unset administratively down down
Serial3/2 unassigned YES unset administratively down down
Serial3/3 unassigned YES unset administratively down down
Loopback0 3.3.3.3 YES manual up up
r3#conf t
r3(config)#router ei 100
r3(config-router)#net 3.3.3.3
r3(config-router)#net 172.16.0.3
r3(config-router)#end
R1看现象
r1#sh ip pro
Routing Protocol is "eigrp 100"
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 100
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is in effect
Automatic address summarization:
192.168.0.0/24 for Loopback0, FastEthernet0/0
172.16.0.0/16 for Loopback0, Serial2/1
Summarizing with metric 28160
1.0.0.0/8 for FastEthernet0/0, Serial2/1
Summarizing with metric 128256
Maximum path: 4
Routing for Networks:
1.0.0.0
172.16.0.0
192.168.0.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:46:48
192.168.0.2 90 00:45:56
172.16.0.3 90 00:45:55
Distance: internal 90 external 170
r1#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/8 is variably subnetted, 2 subnets, 2 masks
C 1.1.1.0/24 is directly connected, Loopback0
D 1.0.0.0/8 is a summary, 00:47:29, Null0
D 2.0.0.0/8 [90/2297856] via 192.168.0.2, 00:47:01, Serial2/1
D 3.0.0.0/8 [90/156160] via 172.16.0.3, 00:46:37, FastEthernet0/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, FastEthernet0/0
D 172.16.0.0/16 is a summary, 00:47:29, Null0
C 192.168.0.0/24 is directly connected, Serial2/1
关闭R1上的自动汇总
r1#conf t
r1(config)#router ei 100
r1(config-router)#no au
查看现象
r1#sh ip pro
Routing Protocol is "eigrp 100"
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 100
EIGRP NSF-aware route hold timer is 240s
Automatic network summarization is not in effect 说明已经关闭掉了自动汇总
Maximum path: 4
Routing for Networks:
1.0.0.0
172.16.0.0
192.168.0.0
Routing Information Sources:
Gateway Distance Last Update
(this router) 90 00:48:56
192.168.0.2 90 00:00:36
172.16.0.3 90 00:00:36
Distance: internal 90 external 170
查看R1路由信息
r1#sh ip ro
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, Loopback0
D 2.0.0.0/8 [90/2297856] via 192.168.0.2, 00:00:28, Serial2/1
D 3.0.0.0/8 [90/156160] via 172.16.0.3, 00:00:28, FastEthernet0/0
172.16.0.0/24 is subnetted, 1 subnets
C 172.16.0.0 is directly connected, FastEthernet0/0
C 192.168.0.0/24 is directly connected, Serial2/1
调试eigrp
r1#debug ei pa
EIGRP Packets debugging is on
(UPDATE, REQUEST, QUERY, REPLY, HELLO, IPXSAP, PROBE, ACK, STUB, SIAQUERY, SIAREPLY)
r1#
*Jul 16 18:05:06.295: EIGRP: Received HELLO on FastEthernet0/0 nbr 172.16.0.3
*Jul 16 18:05:06.295: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Jul 16 18:05:06.523: EIGRP: Sending HELLO on Loopback0
*Jul 16 18:05:06.523: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Jul 16 18:05:06.527: EIGRP: Received HELLO on Loopback0 nbr 1.1.1.1
*Jul 16 18:05:06.527: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0
*Jul 16 18:05:06.527: EIGRP: Packet from ourselves ignored
*Jul 16 18:05:06.791: EIGRP: Sending HELLO on FastEthernet0/0
*Jul 16 18:05:06.791: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1#
*Jul 16 18:05:08.527: EIGRP: Sending HELLO on Serial2/1
*Jul 16 18:05:08.527: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1#
*Jul 16 18:05:09.567: EIGRP: Received HELLO on Serial2/1 nbr 192.168.0.2
*Jul 16 18:05:09.567: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
r1#
*Jul 16 18:05:10.631: EIGRP: Received HELLO on FastEthernet0/0 nbr 172.16.0.3
*Jul 16 18:05:10.631: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
*Jul 16 18:05:10.795: EIGRP: Sending HELLO on Loopback0
*Jul 16 18:05:10.795: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Jul 16 18:05:10.795: EIGRP: Received HELLO on Loopback0 nbr 1.1.1.1
*Jul 16 18:05:10.799: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0
*Jul 16 18:05:10.799: EIGRP: Packet from ourselves ignored
r1#
*Jul 16 18:05:11.695: EIGRP: Sending HELLO on FastEthernet0/0
*Jul 16 18:05:11.695: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
r1#
*Jul 16 18:05:13.407: EIGRP: Sending HELLO on Serial2/1
*Jul 16 18:05:13.407: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0
*Jul 16 18:05:14.267: EIGRP: Received HELLO on Serial2/1 nbr 192.168.0.2
*Jul 16 18:05:14.267: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0
查看EIGRP邻居信息
r1#sh ip ei nei
IP-EIGRP neighbors for process 100
H Address Interface Hold Uptime SRTT RTO Q Seq
(sec) (ms) Cnt Num
1 192.168.0.2 Se2/1 11 00:03:12 68 408 0 6
0 172.16.0.3 Fa0/0 12 00:03:14 32 200 0 5
查看EIGRP交换信息
r1#sh ip ei top
IP-EIGRP Topology Table for AS(100)/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, Loopback0
P 2.0.0.0/8, 1 successors, FD is 2297856
via 192.168.0.2 (2297856/128256), Serial2/1
P 3.0.0.0/8, 1 successors, FD is 156160
via 172.16.0.3 (156160/128256), FastEthernet0/0
P 192.168.0.0/24, 1 successors, FD is 2169856
via Connected, Serial2/1
P 172.16.0.0/24, 1 successors, FD is 28160
via Connected, FastEthernet0/0