实验19EIGRP 基本配置
1.实验目的
通过本实验可以掌握:
1)在路由器上启动EIGRP 路由进程
2)启用参与路由协议的接口,并且通告网络
3EIGRP 度量值的计算方法
4)可行距离(FD)、通告距离(RD)以及可行性条件(FC
5)邻居表、拓扑表以及路由表的含义
6)查看和调试EIGRP 路由协议相关信息
注:1.EIGRP 协议在通告网段时,如果是主类网络(即标准ABC 类的网络,或者说没有划
分子网的网络),只需输入此网络地址;如果是子网的话,则最好在网络号后面写子网掩码
或者反掩码,这样可以避免将所有的子网都加入EIGRP 进程中。
反掩码是用广播地址(255.255.255.255) 减去子网掩码所得到。如掩码地址是
255.255.248.0,则反掩码地址是0.0.7.255。在高级的IOS 中也支持网络掩码的写法。
运行EIGRP 的整个网络AS 号码必须一致,其范围为1-65535 之间。
2. 可行距离(FD):到达一个目的网络的最小度量值;
通告距离(RD):邻居路由器所通告的它自己到达目的网络的最小的度量值;
可行性条件(FC):是EIGRP 路由器更新路由表和拓扑表的依据。可行性条件可以有效
地阻止路由环路,实现路由的快速收敛。可行性条件的公式为:AD<FD
3. EIGRP 中,有五种类型的数据包:
Hello:以组播的方式定期发送,用于建立和维持邻居关系;
② 更新:当路由器收到某个邻居路由器的第一个Hello 包时,以单播传送方式回送一
个包含它所知道的路由信息的更新包。当路由信息发生变化时,以组播的方式发送只包含变
化信息的更新包;
③ 查询:当一条链路失效,路由器重新进行路由计算,但在拓扑表中没有可行的后继
路由时,路由器就以组播的方式向它的邻居发送一个查询包,以询问它们是否有一条到目的
地的后继路由;
④ 答复:以单播的方式回传给查询方,对查询数据包进行应答;
⑤ 确认:以单播的方式传送,用来确认更新、查询、答复数据包。
 
2.实验拓扑
本实验拓扑结构如图所示。
 
 
 
3.实验步骤
R0.r1.r2的配置如下:
r0(config)#int loo 1
r0(config-if)#ip add
*Mar  1 00:03:36.507: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r0(config-if)#ip add 1.1.1.1 255.255.255.0
r0(config-if)#exit
r0(config)#int s1/0
r0(config-if)#ip add 172.16.1.1 255.255.255.0
r0(config-if)#no sh
*Mar  1 00:04:05.639: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar  1 00:04:06.643: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
*Mar  1 00:04:37.203: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r0(config-if)#exit
r0(config)#router eigrp 1
r0(config-router)#no auto
r0(config-router)#net 172.16.1.0 0.0.0.255
r0(config-router)#net 1.1.1.0 0.0.0.255
*Mar  1 00:07:33.395: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.2 (Serial1/0) is up: new adjacency
r0(config-router)#do debug ip eigrip
r0(config-router)#do debug ip eigrp
r0(config-router)#do ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/32/68 ms
r0(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
     3.0.0.0/24 is subnetted, 1 subnets
D       3.3.3.0 [90/2809856] via 172.16.1.2, 00:01:42, Serial1/0
     172.16.0.0/24 is subnetted, 2 subnets
C       172.16.1.0 is directly connected, Serial1/0
D       172.16.2.0 [90/2681856] via 172.16.1.2, 00:02:02, Serial1/0
以上输出表明路由器R2 通过EIGRP 学到了2EIGRP 路由条目,管理距离是90,注意
EIGRP 协议代码用字母“D”表示,如果通过重分布方式进入EIGRP 网络的路由条目,默认管
理距离为170,路由代码用“D EX”表示,也说明EIGRP 路由协议能够区分内部路由和外部
路由。
 
r0(config-router)#do sh ip pro
Routing Protocol is "eigrp 1"
  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// 显示计算度量值所用的K
 
  EIGRP maximum hopcount 100//EIGRP 支持的最大跳数
 
  EIGRP maximum metric variance 1
// variance 值默认为1,即默认时只支持等价路径的负载均衡
 
  Redistributing: eigrp 1
  EIGRP NSF-aware route hold timer is 240s
//不间断转发的持续时间
 
  Automatic network summarization is not in effect
//显示自动汇总已经关闭,默认自动汇总是开启的
 
  Maximum path: 4
  Routing for Networks:
    1.1.1.0/24
    172.16.1.0/24
  Routing Information Sources:
    Gateway         Distance      Last Update
    172.16.1.2            90      00:01:51
  Distance: internal 90 external 170
 
r0(config-router)#do sh ip eigrp topology
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 3.3.3.0/24, 1 successors, FD is 2809856
        via 172.16.1.2 (2809856/2297856), Serial1/0
P 172.16.1.0/24, 1 successors, FD is 2169856
        via Connected, Serial1/0
P 172.16.2.0/24, 1 successors, FD is 2681856
        via 172.16.1.2 (2681856/2169856), Serial1/0
r0(config-router)#do sh ip eigrp neighbors
IP-EIGRP neighbors for process 1
H   Address                 Interface       Hold Uptime   SRTT   RTO  Q  Seq
                                            (sec)         (ms)       Cnt Num
0   172.16.1.2              Se1/0             12 00:08:25   97   582  0  9
以上输出各字段的含义如下:
H: 表示与邻居建立会话的顺序;
Address: 邻居路由器的接口地址;
Interface: 本地到邻居路由器的接口;
Hold: 认为邻居关系不存在所能等待的最大时间;
Uptime: 从邻居关系建立到目前的时间;
SRTT: 是向邻居路由器发送一个数据包以及本路由器收到确认包的时间;
RTO: 路由器在重新传输包之前等待ACK 的时间;
Q Cnt: 等待发送的队列;
Seq Num: 从邻居收到的发送数据包的序列号。
 
r0(config-router)#do debug eigrp nei
EIGRP Neighbors debugging is on
r0(config-router)#
*Mar  1 00:17:59.547: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.2 (Serial1/0) is down: peer restarted
r0(config-router)#
*Mar  1 00:17:59.547: Going down: Peer 172.16.1.2 total=0 stub 0 template=0, iidb-stub=0 iid-all=0
*Mar  1 00:17:59.563: EIGRP: Neighbor 172.16.1.2 went down on Serial1/0
r0(config-router)#
*Mar  1 00:18:01.503: EIGRP: Neighbor(172.16.1.2) not yet found
*Mar  1 00:18:01.531: EIGRP: Packet from ourselves ignored
r0(config-router)#
*Mar  1 00:18:04.039: EIGRP: New peer 172.16.1.2 total=1 stub 0 template=0 idbstub=0 iidball=1
r0(config-router)#
*Mar  1 00:18:04.039: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.2 (Serial1/0) is up: new adjacency
r0(config-router)#
*Mar  1 00:18:06.419: EIGRP: Packet from ourselves ignored
r0(config-router)#
*Mar  1 00:18:11.075: EIGRP: Packet from ourselves ignored
r0(config-router)#
*Mar  1 00:18:15.671: EIGRP: Packet from ourselves ignored
r0(config-router)#do un all
All possible debugging has been turned off
r0(config-ro
 
 
r1(config)#no ip do loo
r1(config)#lin c 0
r1(config-line)#logg s
r1(config-line)#exec-t 00
r1(config-line)#exit
r1(config)#int s1/0
r1(config-if)#ip add 172.16.1.2 255.255.255.0
r1(config-if)#no sh
r1(config-if)#exit
r1(config)#itn
*Mar  1 00:04:27.227: %LINK-3-UPDOWN: Interface Serial1/0, changed state to up
*Mar  1 00:04:28.227: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/0, changed state to up
r1(config)#int s1/0
r1(config-if)#exit
r1(config)#int s1/1
r1(config-if)#ip add 172.16.2.1 255.255.255.0
r1(config-if)#clo r 64000
r1(config-if)#exit
r1(config)#router eigrp 1
r1(config-router)#no auto
r1(config-router)#net 172.16.1.0 0.0.0.255
r1(config-router)#net 172
*Mar  1 00:07:33.571: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.1.1 (Serial1/0) is up: new adjacency
r1(config-router)#net 172.16.2.0 0.0.0.255
r1(config-router)#
r1(config-router)#do debug ip eigrp 1           
IP-EIGRP Route Events debugging is on
 
r1(config-router)#do clear ip route *
r1(config-router)#
*Mar  1 00:10:48.195: IP-EIGRP(Default-IP-Routing-Table:1): route installed for 1.1.1.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
D       1.1.1.0 [90/2297856] via 172.16.1.1, 00:00:21, Serial1/0
     172.16.0.0/24 is subnetted, 1 subnets
C       172.16.1.0 is directly connected, Serial1/0
r1(config-router)#exit
r1(config)#int s1/1
r1(config-if)#clo r 64000
r1(config-if)#no sh
r1(config-if)#
*Mar  1 00:13:08.967: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
r1(config-if)#
*Mar  1 00:13:09.007: IP-EIGRP(Default-IP-Routing-Table:1): 172.16.2.0/24 - do advertise out Serial1/0
*Mar  1 00:13:09.007: IP-EIGRP(Default-IP-Routing-Table:1): Int 172.16.2.0/24 metric 2169856 - 1657856 512000
r1(config-if)#
*Mar  1 00:13:09.971: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r1(config-if)#
*Mar  1 00:13:29.047: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.2 (Serial1/1) is up: new adjacency
*Mar  1 00:13:29.051: IP-EIGRP(Default-IP-Routing-Table:1): Processing incoming UPDATE packet
*Mar  1 00:13:29.167: IP-EIGRP(Default-IP-Routing-Table:1): Processing incoming UPDATE packet
*Mar  1 00:13:29.171: IP-EIGRP(Default-IP-Routing-Table:1): Int 3.3.3.0/24 M 2297856 - 1657856 640000 SM 128256 - 256 128000
*Mar  1 00:13:29.175: IP-EIGRP(Default-IP-Routing-Table:1): route installed for 3.3.3.0  ()
*Mar  1 00:13:29.175: IP-EIGRP(Default-IP-Routing-Table:1): 172.16.1.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.179: IP-EIGRP(Default-IP-Routing-Table:1): Int 172.16.1.0/24 metric 2169856 - 1657856 512000
*Mar  1 00:13:29.179: IP-EIGRP(Default-IP-Routing-Table:1): 1.1.1.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.179: IP-EIGRP(Default-IP-Routing-Table:1): Int 1.1.1.0/24 metric 2297856 - 1657856 640000
*Mar  1 00:13:29.183: IP-EIGRP(Default-IP-Routing-Tabl
r1(config-if)#e:1): 172.16.2.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.199: IP-EIGRP(Default-IP-Routing-Table:1): 3.3.3.0/24 - do advertise out Serial1/0
*Mar  1 00:13:29.199: IP-EIGRP(Default-IP-Routing-Table:1): Int 3.3.3.0/24 metric 2297856 - 1657856 640000
*Mar  1 00:13:29.311: IP-EIGRP(Default-IP-Routing-Table:1): Processing incoming UPDATE packet
*Mar  1 00:13:29.311: IP-EIGRP(Default-IP-Routing-Table:1): Int 3.3.3.0/24 M 2297856 - 1657856 640000 SM 128256 - 256 128000
*Mar  1 00:13:29.315: IP-EIGRP(Default-IP-Routing-Table:1): 172.16.1.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.319: IP-EIGRP(Default-IP-Routing-Table:1): Int 172.16.1.0/24 metric 2169856 - 1657856 512000
*Mar  1 00:13:29.319: IP-EIGRP(Default-IP-Routing-Table:1): 1.1.1.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.319: IP-EIGRP(Default-IP-Routing-Table:1): Int 1.1.1.0/24 metric 2297856 - 1657856 640000
*Mar  1 00:13:29.319: IP-EIGRP(Default-IP-Routing-Table:1): 172.16.2.0/24 - do advertise out Se
r1(config-if)#rial1/1
*Mar  1 00:13:29.991: IP-EIGRP(Default-IP-Routing-Table:1): 172.16.1.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.991: IP-EIGRP(Default-IP-Routing-Table:1): Int 172.16.1.0/24 metric 2169856 - 1657856 512000
*Mar  1 00:13:29.991: IP-EIGRP(Default-IP-Routing-Table:1): 1.1.1.0/24 - do advertise out Serial1/1
*Mar  1 00:13:29.995: IP-EIGRP(Default-IP-Routing-Table:1): Int 1.1.1.0/24 metric 2297856 - 1657856 640000
*Mar  1 00:13:29.995: IP-EIGRP(Default-IP-Routing-Table:1): 172.16.2.0/24 - do advertise out Serial1/1
*Mar  1 00:13:30.075: IP-EIGRP(Default-IP-Routing-Table:1): Int 3.3.3.0/24 metric 2297856 - 1657856 640000
r1(config-if)#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.2.2              Se1/1             12 00:02:41   98   588  0  3
0   172.16.1.1              Se1/0             12 00:08:37  110   660  0  3
r1(config-if)#exit
r1(config)#int s1/0
r1(config-if)#sh
 
 
 
r2(config)#no ip do loo
r2(config)#lin c 0
r2(config-line)#logg s
r2(config-line)#exec-t 00
r2(config-line)#exit
r2(config)#
r2(config)#int loo 1
r2(config-if)#ip add 3.3.3
*Mar  1 00:05:03.727: %LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
r2(config-if)#ip add 3.3.3.3 255.255.255.0
r2(config-if)#int s1/0
r2(config-if)#sh
r2(config-if)#exit
 
r2(config)#int s1/1
r2(config-if)#ip add 172.16.2.2 255.255.255.0
r2(config-if)#no sh
r2(config-if)#
*Mar  1 00:05:45.999: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
r2(config-if)#
*Mar  1 00:05:47.003: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r2(config-if)#exit
r2(config)#router eigrp 1
r2(config-router)#no auto
r2(config-router)#net 3.3.3.0 0.0.0.255
r2(config-router)#net
*Mar  1 00:06:07.379: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
r2(config-router)#net 172.16.2.0 0.0.0.255
r2(config-router)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
FastEthernet0/1            unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  172.16.2.2      YES manual up                    down   
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback1                  3.3.3.3         YES manual up                    up     
r2(config-router)#exit
r2(config)#int s1/1
r2(config-if)#no sh
r2(config-if)#
r2(config-if)#
r2(config-if)#sh
r2(config-if)#no sh
r2(config-if)#
*Mar  1 00:09:34.567: %LINK-5-CHANGED: Interface Serial1/1, changed state to administratively down
r2(config-if)#
*Mar  1 00:09:37.479: %LINK-3-UPDOWN: Interface Serial1/1, changed state to up
r2(config-if)#
*Mar  1 00:09:38.483: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r2(config-if)#
*Mar  1 00:10:07.335: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to down
r2(config-if)#do sh contr s1/1
% Ambiguous command:  "sh contr s1/1"
r2(config-if)#do sh controll s1/1
M4T: show controller:
PAS unit 1, subunit 1, f/w version 1-45, rev ID 0x2800001, version 1
idb = 0x6663F768, ds = 0x66640810, ssb=0x66640BCC
Clock mux=0x0, ucmd_ctrl=0x1C, port_status=0x7B
Serial config=0x8, line config=0x200
maxdgram=1608, bufpool=78Kb, 120 particles
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
line state: up
cable type : V.11 (X.21) DCE cable, received clockrate 2015232
 
base0 registers=0x3D000000, base1 registers=0x3D002000
mxt_ds=0x66251A18, rx ring entries=78, tx ring entries=128
rxring=0x7DDC520, rxr shadow=0x66647230, rx_head=0
txring=0x7DDC7E0, txr shadow=0x6664760C, tx_head=11, tx_tail=11, tx_count=0
throttled=0, enabled=0
halted=0, last halt reason=0
Microcode fatal errors=0
rx_no_eop_err=0, rx_no_stp_err=0, rx_no_eop_stp_err=0
rx_no_buf=0, rx_soft_overrun_err=0, dump_err= 0, bogus=0, mxt_flags=0x0
tx_underrun_err=0, tx_soft_underrun_err=0, tx_limited=1(2)
tx_fullring=0, tx_started=63, mxt_flush_count=0
rx_int_count=13, tx_int_count=70
r2(config-if)#sh
r2(config-if)#no sh
r2(config-if)#
*Mar  1 00:13:27.319: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial1/1, changed state to up
r2(config-if)#
*Mar  1 00:13:28.951: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 1: Neighbor 172.16.2.1 (Serial1/1) is up: new adjacency
r2(config-if)#do sh ip int b
Interface                  IP-Address      OK? Method Status                Protocol
FastEthernet0/0            unassigned      YES unset  administratively down down   
FastEthernet0/1            unassigned      YES unset  administratively down down   
Serial1/0                  unassigned      YES unset  administratively down down   
Serial1/1                  172.16.2.2      YES manual up                    up     
Serial1/2                  unassigned      YES unset  administratively down down   
Serial1/3                  unassigned      YES unset  administratively down down   
Loopback1                  3.3.3.3         YES manual up                    up     
r2(config-if)#