> 文章列表 > 思科实验 EIGRP

思科实验 EIGRP

思科实验 EIGRP

1.1.1 实验目的

通过对 CCNA 课程中的 EIGRP 实验部分进行回顾,从而更加准确掌握 EIGRP 路由协议的
配置方法,以及对 network 命令的正确理解。并且学会对 EIGRP 路由协议查看排错的相关命
令。

1.1.2 实验拓扑

思科实验 EIGRP

拓扑说明:本实验由两台思科路由器完成,对平台无特殊要求。所连接接口如图所示。
接口 IP 地址取值方式:以 YY.XX 来进行。其中固定前缀为 10.10.YY.XX。YY 代表设备编号
组合,XX 代表单个设备编号。例如上图中,R1 和 R2 之间链路地址为 10.10.12.0/24,其中
12 为 R1 和 R2 的设备编号组合,而 R1 的 e0/0 接口 IP 地址为 10.10.12.1,由于该接口属于
R1;同理,R2 的 e0/0 接口地址为 10.10.12.2,由于该接口属于 R2。

1.1.3 实验步骤

  1. 首先在 R1 上配置相关接口,并且在 R1 上配置两个环回口,loopback 0 地址为=1.1.1.1/24,loopback 1 地址为 192.168.1.1/24。并且在 e0/0,loopback 0,loopback1 上启用 EIGRP 100。
    R1(config)#int e0/0
    R1(config-if)#ip add 10.10.12.1 255.255.255.0 //配置接口地址
    R1(config-if)#no sh
    R1(config-if)#exit
    R1(config)#int loo0
    R1(config-if)#ip add 1.1.1.1 255.255.255.0
    R1(config-if)#no sh
    R1(config-if)#exit
    R1(config)#int lo1
    R1(config-if)#ip add 192.168.1.1 255.255.255.0
    R1(config-if)#no sh
    R1(config-if)#exit

R1(config)#
R1(config)#router eigrp 100 //开启 EIGRP 100 进程,其中 100 为 AS 号,可以理解
为 EIGRP 的同一区域。
R1(config-router)#no auto-summary //关闭 EIGRP 自动汇总
R1(config-router)#network 1.0.0.0
R1(config-router)#network 192.168.1.0
R1(config-router)#network 10.0.0.0
R1(config-router)#exit
2. 同样的,在 R2 上进行相应的 EIGRP 配置。在 R2 上配置两个环回口,loopback 0
的地址为 2.2.2.2/24,loopback 1 的地址为 192.168.2.2/24。并且在 e0/0,loopback
0,loopback 1 上启用 EIGRP 100。
R2(config)#int e0/0
R2(config-if)#ip add 10.10.12.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#int lo0
*Mar 1 00:04:56.019: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to
up
*Mar 1 00:04:56.935: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Loopback0, changed state to up
*Mar 1 00:04:57.019: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Ethernet0/0, changed state to up
R2(config-if)#ip add 2.2.2.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#int lo1
*Mar 1 00:05:04.823: %LINEPROTO-5-UPDOWN: Line protocol on Interface
Loopback1, changed state to up
R2(config-if)#ip add 192.168.2.2 255.255.255.0
R2(config-if)#no sh
R2(config-if)#exit
R2(config)#router eigrp 100
R2(config-router)#no auto-summary
R2(config-router)#network 2.2.2.0 0.0.0.255
R2(config-router)#network 192.168.2.0 0.0.0.255
R2(config-router)#network 10.10.12.0 0.0.0.255
R2(config-router)#exit

思科实验 EIGRP

从上述配置中,我们可以发现,EIGRP 默认是开启自动汇总的,所以为了避免出现次优
路由选择,一般来说我们都直接关闭 EIGRP 的自动汇总。
同时,我们可以发现,在 R1 和 R2 上 network 命令的不同使用方法。

注意:

a) 如果使用了 network 命令,并且没有添加反掩码,那么 network 后的网络参数必须
为有类主网,该台路由器上所有满足所指定的主类网络范围的接口将会被加入 EIGRP 进程。
b)如果使用了 network 命令,并且添加了反掩码,那么 network 后的网络参数和反掩
码准确匹配的网络范围将和路由器上直连接口相互比较,满足该范围的被加入 EIGRP 进程。
3. 通过路由器上实时出现的日志可以判断 EIGRP 邻居建立完成。
*Mar 1 00:05:41.791: %DUAL-5-NBRCHANGE: IP-EIGRP(0) 100: Neighbor 10.10.12.2
(Ethernet0/0) is up: new adjacency