
实验过程: 第一步 R1、R2、R3的预配置 R1(config)#int lo0 R1(config-if)#ip add 1.1.1.1 255.255.255.0 R1(config-if)#int s2/1 R1(config-if)#ip add 192.168.0.1 255.255.255.0 R1(config-if)#no sh R1(config-if)#int f0/0 R1(config-if)#ip add 172.16.0.1 255.255.255.0 R1(config-if)#no sh R1(config-if)#exit
R2(config)#int lo0 R2(config-if)#ip add 2.2.2.2 255.255.255.0 R2(config-if)#int s2/1 R2(config-if)#ip add 192.168.0.2 255.255.255.0 R2(config-if)#no sh R2(config-if)#exit
R3(config)#int lo0 R3(config-if)#ip add 3.3.3.3 255.255.255.0 R3(config-if)#int f0/0 R3(config-if)#ip add 172.16.0.3 255.255.255.0 R3(config-if)#no sh R3(config-if)#exit
第二步 在R1、R2、R3上配置Eigrp R1(config)#router eigrp 100 R1(config-router)#net 1.1.1.1 R1(config-router)#net 192.168.0.1 R1(config-router)#net 172.16.0.1 R1(config-router)#exit
R2(config)#router eigrp 100 R2(config-router)#net 2.2.2.2 R2(config-router)#net 192.168.0.2 R2(config-router)#exit
R3(config)#router eigrp 100 R3(config-router)#net 3.3.3.3 R3(config-router)#net 172.16.0.3 R3(config-router)#exit
第三步 在R1上查看Eigrp协议配置与运行情况 R1#show ip protocols 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 Serial2/1, FastEthernet0/0 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:01:29 192.168.0.2 90 00:01:01 172.16.0.3 90 00:00:43 Distance: internal 90 external 170
R1#show 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:01:52, Null0 // R1上有一条目的地址为Null0的自动汇总生成的路由 D 2.0.0.0/8 [90/2297856] via 192.168.0.2, 00:01:21, Serial2/1 D 3.0.0.0/8 [90/156160] via 172.16.0.3, 00:01:03, 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:01:49, Null0 C 192.168.0.0/24 is directly connected, Serial2/1 R1#
第四步 关闭R1的自动汇总功能 R1#conf t R1(config)#router eigrp 100 R1(config-router)#no auto R1(config-router)# *Jul 1 14:31:49.495: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 192.168.0.2 (Serial2/1) is resync: summary configured *Jul 1 14:31:49.495: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 172.16.0.3 (FastEthernet0/0) is resync: summary configured R1(config-router)# ^Z R1# R1#show ip protocols 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:02:37 192.168.0.2 90 00:00:14 172.16.0.3 90 00:00:12 Distance: internal 90 external 170
R1#show 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, Loopback0 D 2.0.0.0/8 [90/2297856] via 192.168.0.2, 00:02:28, Serial2/1 D 3.0.0.0/8 [90/156160] via 172.16.0.3, 00:02:10, 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 R1#
第五步 调试Eigrp信息 R1#debug eigrp packets EIGRP Packets debugging is on (UPDATE, REQUEST, QUERY, REPLY, HELLO, IPXSAP, PROBE, ACK, STUB, SIAQUERY, SIAREPLY) R1# *Jul 1 14:32:39.835: EIGRP: Received HELLO on FastEthernet0/0 nbr 172.16.0.3 *Jul 1 14:32:39.839: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0 *Jul 1 14:32:40.315: EIGRP: Sending HELLO on Serial2/1 *Jul 1 14:32:40.315: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 R1# *Jul 1 14:32:41.691: EIGRP: Sending HELLO on Loopback0 *Jul 1 14:32:41.691: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 *Jul 1 14:32:41.695: EIGRP: Received HELLO on Loopback0 nbr 1.1.1.1 *Jul 1 14:32:41.699: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 *Jul 1 14:32:41.699: EIGRP: Packet from ourselves ignored R1# *Jul 1 14:32:43.055: EIGRP: Received HELLO on Serial2/1 nbr 192.168.0.2 *Jul 1 14:32:43.059: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0 *Jul 1 14:32:43.647: EIGRP: Sending HELLO on FastEthernet0/0 *Jul 1 14:32:43.647: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 R1# *Jul 1 14:32:44.571: EIGRP: Received HELLO on FastEthernet0/0 nbr 172.16.0.3 *Jul 1 14:32:44.575: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/0 *Jul 1 14:32:45.015: EIGRP: Sending HELLO on Serial2/1 *Jul 1 14:32:45.015: AS 100, Flags 0x0, Seq 0/0 idbQ 0/0 iidbQ un/rely 0/0 R1# R1#u all All possible debugging has been turned off R1# R1#show ip eigrp neighbors // 查看Eigrp的邻接关系 IP-EIGRP neighbors for process 100 H Address Interface Hold Uptime SRTT RTO Q Seq (sec) (ms) Cnt Num 1 172.16.0.3 Fa0/0 14 00:03:01 158 948 0 9 0 192.168.0.2 Se2/1 13 00:03:19 634 3804 0 9 R1# R1#show ip eigrp topology // 查看Eigrp交换信息 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 R1#
|