1. EIGRP基本配置

1.1.  介绍

本文档描述了EIGRP的基本配置,

1.2.  拓扑图

CCNP实验一:EIGRP基本配置_第1张图片

1.3.  配置

1.3.1.   R1配置

version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
interface Loopback0
 ip address 1.1.1.1 255.255.255.0
!
interface Loopback1
 ip address 1.1.2.1 255.255.255.0
!
interface Loopback2
 ip address 1.1.3.1 255.255.255.0
!
interface FastEthernet0/0
 ip address 12.1.1.1 255.255.255.0
 duplex auto
 speed auto
!
!
!
router eigrp 1 //起一个EIGRP进程。AS号要求一致
 network 1.0.0.0
 network 12.1.1.1 0.0.0.0
 auto-summary //默认自动汇总
!
!
!
!
gatekeeper
 shutdown
!
!
!        
end      
         

1.3.2.   R2配置

Current configuration : 1006 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!        
!
!
!
interface FastEthernet0/0
 ip address 12.1.1.2 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet2/0
 ip address 23.1.1.2 255.255.255.0
 duplex half
!
router eigrp 1
 network 12.1.1.2 0.0.0.0
 network 23.1.1.2 0.0.0.0
 auto-summary
!
!
!
End
 

1.3.3.   R3配置

R3#sh run
Building configuration...
 
Current configuration : 1057 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
ip cef
!
!
!
!
!
multilink bundle-name authenticated
!
!        
interface Loopback0
 ip address 3.3.1.1 255.255.255.0
!
interface Loopback1
 ip address 3.3.2.1 255.255.255.0
!
interface Loopback2
 ip address 3.3.3.1 255.255.255.0
!
interface FastEthernet2/0
 ip address 23.1.1.3 255.255.255.0
 duplex half
!
!
router eigrp 1
 network 3.0.0.0
 network 23.0.0.0
 auto-summary
!
!
!
control-plane
!
!
!
end
 
 

1.4.R1调试过程

R1#debug eigrp packets query update reply //调试查看EIGRPqueryupdatereply
 
*Apr 20 20:38:45.867: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 12.1.1.2 (FastEthernet0/0) is up: new adjacency //形成邻接关系
*Apr 20 20:38:45.871: EIGRP: Enqueueing UPDATE on FastEthernet0/0 nbr 12.1.1.2 iidbQ un/rely 0/1 peerQ un/rely 0/0
*Apr 20 20:38:45.879: EIGRP: Received UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:45.879:   AS 1, Flags 0x1, Seq 18/0 idbQ 0/0 iidbQ un/rely 0/1 peerQ un/rely 0/0
*Apr 20 20:38:45.887: EIGRP: Received UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:45.887:   AS 1, Flags 0xA, Seq 19/0 idbQ 0/0 iidbQ un/rely 0/1 peerQ un/rely 0/0
*Apr 20 20:38:45.895: EIGRP: Enqueueing UPDATE on FastEthernet0/0 iidbQ un/rely 0/1 serno 1-6
*Apr 20 20:38:45.919: EIGRP: Enqueueing UPDATE on FastEthernet0/0 nbr 12.1.1.2 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 1-6
*Apr 20 20:38:45.927: EIGRP: Sending UPDATE on FastEthernet0/0
*Apr 20 20:38:45.927:   AS 1, Flags 0xA, Seq 2/0 idbQ 0/0 iidbQ un/rely 0/0 serno 1-6
*Apr 20 20:38:45.943: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:45.943:   AS 1, Flags 0x1, Seq 1/18 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/2
*Apr 20 20:38:46.015: EIGRP: Received UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:46.019:   AS 1, Flags 0x8, Seq 19/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/2
*Apr 20 20:38:46.035: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:46.035:   AS 1, Flags 0x8, Seq 2/19 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 1-6
*Apr 20 20:38:46.107: EIGRP: Received UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:46.11
R1(config-router)#1:   AS 1, Flags 0x8, Seq 20/1 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1
*Apr 20 20:38:46.115: EIGRP: Enqueueing UPDATE on FastEthernet0/0 iidbQ un/rely 0/1 serno 7-8
*Apr 20 20:38:46.123: EIGRP: Enqueueing UPDATE on FastEthernet0/0 nbr 12.1.1.2 iidbQ un/rely 0/0 peerQ un/rely 0/0 serno 7-8
*Apr 20 20:38:46.223: EIGRP: Received UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:46.227:   AS 1, Flags 0x2, Seq 21/0 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/2
*Apr 20 20:38:46.231: EIGRP: Received UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:46.231:   AS 1, Flags 0x0, Seq 21/2 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/2
*Apr 20 20:38:46.647: EIGRP: Sending UPDATE on FastEthernet0/0 nbr 12.1.1.2
*Apr 20 20:38:46.651:   AS 1, Flags 0x8, Seq 4/21 idbQ 0/0 iidbQ un/rely 0/0 peerQ un/rely 0/1 serno 1-6
 

1.5.查看路由表

1.5.1.         R1的路由表

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, 4 subnets, 2 masks
C       1.1.1.0/24 is directly connected, Loopback0
D       1.0.0.0/8 is a summary, 00:02:36, Null0 //汇总路由指向了null0,用于防止环路
C       1.1.2.0/24 is directly connected, Loopback1
C       1.1.3.0/24 is directly connected, Loopback2
D    3.0.0.0/8 [90/158720] via 12.1.1.2, 00:02:35, FastEthernet0/0
//因为没有关闭自动汇总,在经过主类网络边界是自动汇总成/8
D    23.0.0.0/8 [90/30720] via 12.1.1.2, 00:02:35, FastEthernet0/0
     12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       12.1.1.0/24 is directly connected, FastEthernet0/0
D       12.0.0.0/8 is a summary, 00:02:35, Null0
 

1.5.2.         R2的路由表

R2#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
 
D    1.0.0.0/8 [90/156160] via 12.1.1.1, 00:03:17, FastEthernet0/0
D    3.0.0.0/8 [90/156160] via 23.1.1.3, 01:02:35, FastEthernet2/0
     23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       23.1.1.0/24 is directly connected, FastEthernet2/0
D       23.0.0.0/8 is a summary, 01:02:58, Null0
     12.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       12.1.1.0/24 is directly connected, FastEthernet0/0
D       12.0.0.0/8 is a summary, 01:02:58, Null0
 

1.5.3.         R3的路由表

R3#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
 
D    1.0.0.0/8 [90/158720] via 23.1.1.2, 00:03:55, FastEthernet2/0
     3.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C       3.3.1.0/24 is directly connected, Loopback0
C       3.3.2.0/24 is directly connected, Loopback1
C       3.3.3.0/24 is directly connected, Loopback2
D       3.0.0.0/8 is a summary, 01:03:14, Null0
     23.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C       23.1.1.0/24 is directly connected, FastEthernet2/0
D       23.0.0.0/8 is a summary, 01:03:14, Null0
D    12.0.0.0/8 [90/30720] via 23.1.1.2, 01:03:13, FastEthernet2/0