EIGRP水平分割

1.1.1.所需设备

下面是做这个实验练习所需的设备:

1) 三台具有一个串行端口的Cisco路由器;

2) Cisco IOS 10.0版或更高;

3) 一台运行了终端仿真程序的PC 

4) 三根Cisco DTE/DCE交叉电缆;

5) 一根Cisco扁平电缆供路由器的控制台端口访问使用。

配置概述

    验证EIGRPHub-Spoke拓扑结构下水平分割对其影响及解决方式,具体实验要求:R1R2R3三台路由器通过帧中继网络连接,拓扑类型为 Hub-Spok模型。R1HubR2R3Spoke路由器,三台路由器之间运行EIGRP协议,通过配置EIGRP水平分割特性,始三台路由器路由表学习完整,即三台路由器均通过EIGRP学习到2条路由

一个拓扑全搞定-- EIGRP水平分割_第1张图片


3.路由器配置

1. 帧交换机

FrameSwitch# show running-config

!

hostname FrameSwitch

!

frame-relay switching

!

interface Serial0/1

  encapsulation frame-relay

  frame-relayintf-type dce

 frame-relayroute 102 interface Serial0/2 201

!

interface Serial0/2

 encapsulation frame-relay

 frame-relayintf-type dce

 frame-relayroute 201 interface Serial0/1 102

 frame-relayroute 203 interface Serial0/3 302

!

interface Serial0/3

 encapsulation frame-relay

 frame-relay intf-type dce

 frame-relayroute 302 interface Serial0/2 203

!

end

2. 路由器R1

R1#show running-config

 

interface Loopback0

 ip address 1.1.1.1255.255.255.0

!

interface Serial0/1

 ip address 123.123.123.1255.255.255.0

 encapsulation frame-relay

  frame-relaymap ip 123.123.123.3 102 broadcast

 frame-relaymap ip 123.123.123.2 102 broadcast

!

router EIGRP 90

 network 1.0.0.0

 network 123.123.123.0

 auto-summary

!

!

end

3. 路由器R2

R2#show running-config

!

interface Loopback0

 ip address 2.2.2.2255.255.255.0

!

interface Serial0/2

 ip address 123.123.123.2255.255.255.0

 encapsulation frame-relay

 frame-relaymap ip 123.123.123.3 203 broadcast

 frame-relaymap ip 123.123.123.1 201 broadcast

 

!

router EIGRP 90

 network 2.0.0.0

 network 123.123.123.0

 auto-summary

!

!

end

4. 路由器R3

 R3#showrunning-config

!

interface Loopback0

 ip address 3.3.3.3255.255.255.0

!

interface Serial0/3

 ip address 123.123.123.3255.255.255.0

 encapsulation frame-relay

  frame-relaymap ip 123.123.123.2 301 broadcast

 frame-relaymap ip 123.123.123.1 301 broadcast

 

!

router EIGRP 90

 network 3.0.0.0

 network 123.123.123.0

 auto-summary

!

!

end

 

4.监测配置

查看EIGRP邻居

R1

R1#show ip eigrp neighbors

IP-EIGRP neighbors for process 90

H  Address                Interface       Hold Uptime   SRTT  RTO  Q  Seq

                                            (sec)         (ms)       Cnt Num

0   123.123.123.2           Se0/1            178 00:03:40 1311  5000 0  7

R2

R2#show ip eigrp neighbors

IP-EIGRP neighbors for process 90

H  Address                Interface       Hold Uptime   SRTT  RTO  Q  Seq

                                            (sec)         (ms)       Cnt Num

1   123.123.123.1           Se0/2            158 00:05:45  176  1584  0  3

0  123.123.123.3           Se0/2            154 00:06:00  158  948  0  3

R3

R3#show ip eigrp neighbors

IP-EIGRP neighbors for process 90

H  Address                 Interface       Hold Uptime   SRTT  RTO  Q  Seq

                                            (sec)         (ms)       Cnt Num

0   123.123.123.2           Se0/3            158 00:06:58  170  1020  0  7

 

查看路由表

R1

Gateway of last resort is not set

 

Gateway of last resort is not set

 

     1.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       1.1.1.0/24is directly connected, Loopback0

D       1.0.0.0/8is a summary, 00:07:05, Null0

D    2.0.0.0/8[90/2297856] via 123.123.123.2, 00:07:03, Serial0/1

     123.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C      123.123.123.0/24 is directly connected, Serial0/1

D      123.0.0.0/8 is a summary, 00:07:05, Null0

R1 路由表不正常,不能够正常学习到R3 环回接口的路由条目

R2

R2#show ip route

Gateway of last resort is not set

 

D    1.0.0.0/8[90/2297856] via 123.123.123.1, 00:08:55, Serial0/2

     2.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       2.2.2.0/24is directly connected, Loopback0

D       2.0.0.0/8is a summary, 00:09:12, Null0

D    3.0.0.0/8[90/2297856] via 123.123.123.3, 00:09:12, Serial0/2

    123.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C      123.123.123.0/24 is directly connected, Serial0/2

D      123.0.0.0/8 is a summary, 00:09:12, Null0

R2的路由表正常,学到R1R3的环回接口路由

R3

R3#show ip route

Gateway of last resort is not set

 

D    2.0.0.0/8[90/2297856] via 123.123.123.2, 00:09:38, Serial0/3

     3.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       3.3.3.0/24is directly connected, Loopback0

D       3.0.0.0/8is a summary, 00:09:54, Null0

    123.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C      123.123.123.0/24 is directly connected, Serial0/3

D      123.0.0.0/8 is a summary, 00:09:54, Null0

同样,R3无法学到R1的路由

在这里,因为帧中继网络是一个NBMA网络,R2通过相同的物理接口s0/2接口与R1R3通信,由于EIGRP 是一个距离矢量型协议,具有水平分割特性,所以水平分割抑制了R1R3 之间的路由学习(R1R3 之间的路由学习需要通过R2转发,但由于水平分割特性,R2s0/1接口学习到的路由不会再从相同接口转发出去)。


解决方法

方法一:关闭R2路由器s0/2接口的水平分割

配置如下

R2(config)#int s0/2

R2(config-if)#no ip split-horizon eigrp 90

//注意,这里跟RIP下关闭水平分割不同,命令后面必须跟上eigrpAS号。

再查看R1R3的路由表

R1#show ip route

Gateway of last resort is not set

 

     1.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       1.1.1.0/24is directly connected, Loopback0

D       1.0.0.0/8is a summary, 00:00:09, Null0

D    2.0.0.0/8[90/2297856] via 123.123.123.2, 00:12:17, Serial0/1

D    3.0.0.0/8[90/2809856] via 123.123.123.2, 00:00:09, Serial0/1

    123.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C      123.123.123.0/24 is directly connected, Serial0/1

D      123.0.0.0/8 is a summary, 00:12:19, Null0

R3#show ip route

Gateway of last resort is not set

 

D    1.0.0.0/8[90/2809856] via 123.123.123.2, 00:00:41, Serial0/3

D    2.0.0.0/8[90/2297856] via 123.123.123.2, 00:13:06, Serial0/3

     3.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       3.3.3.0/24is directly connected, Loopback0

D       3.0.0.0/8is a summary, 00:00:41, Null0

    123.0.0.0/8 is variably subnetted, 2 subnets, 2 masks

C      123.123.123.0/24 is directly connected, Serial0/3

D      123.0.0.0/8 is a summary, 00:13:22, Null0

可以看到R1R3 已经正常学习到对方的路由信息了

方法二:将单一物理接口划分为两个子接口

使用帧中继子接口,将原本的单一物理接口划分为两个子接口,水平分割便不会影响路由器间的路由转发了,但是启用子接口之后会需要另一个子网(帧中继每个子接口都是一个独立子网):

一个拓扑全搞定-- EIGRP水平分割_第2张图片

-- 帧中继子接口


R2需要将s0/2接口配置为帧中继子接口,分为两个网段。

R2

interface Serial0/2

 no ipaddress

 encapsulation frame-relay

 serialrestart-delay 0

!

interface Serial0/2.1 point-to-point

 ip address123.1.1.2 255.255.255.0

 frame-relayinterface-dlci 201  

!

interface Serial0/2.2 point-to-point

 ip address123.1.2.2 255.255.255.0

 frame-relayinterface-dlci 203   

!

R1

interface Serial0/1

 ip address123.1.1.1 255.255.255.0

 encapsulation frame-relay

 serialrestart-delay 0

frame-relay map ip 123.1.1.2 102 broadcast

 noframe-relay inverse-arp

!

R3

interface Serial0/3

 ip address123.1.2.3 255.255.255.0     //与前例不同,这里R3在另一个子网内,对应R2子接口s0/2.2

 encapsulation frame-relay

 serialrestart-delay 0

 frame-relaymap ip 123.1.2.2 302 broadcast



配置EIGRP

R1

router eigrp 90

      network 1.1.1.00.0.0.255

network 123.1.1.0 0.0.0.255

      noauto-summary  

R2

router eigrp 90

       network 2.2.2.0 0.0.0.255

       network 123.1.1.0 0.0.0.255

network 123.1.2.0 0.0.0.255

no auto-summary  

 

R3

  routereigrp 90

       network 3.3.3.00.0.0.255

       network 123.1.2.0 0.0.0.255

       no auto-summary

 

现在查看路由表

R1

R1#show ip rou

Gateway of last resort is not set

 

     1.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       1.1.1.0/24is directly connected, Loopback0

D       1.0.0.0/8is a summary, 00:31:52, Null0

D    2.0.0.0/8[90/2297856] via 123.1.1.2, 00:09:28, Serial0/1

D    3.0.0.0/8[90/2809856] via 123.1.1.2, 00:03:33, Serial0/1

    123.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

D      123.1.2.0/24 [90/2681856] via 123.1.1.2, 00:09:28, Serial0/1

C      123.1.1.0/24 is directly connected, Serial0/1

D      123.0.0.0/8 is a summary, 00:31:52, Null0

R2

R2#show ip rou

Gateway of last resort is not set

 

D    1.0.0.0/8[90/2297856] via 123.1.1.1, 00:10:10, Serial0/2.1

     2.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       2.2.2.0/24is directly connected, Loopback0

D       2.0.0.0/8is a summary, 00:33:07, Null0

D    3.0.0.0/8[90/2297856] via 123.1.2.3, 00:04:16, Serial0/2.2

    123.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

C      123.1.2.0/24 is directly connected, Serial0/2.2

C       123.1.1.0/24 is directly connected,Serial0/2.1

D      123.0.0.0/8 is a summary, 00:33:06, Null0

R3

R3#show ip rou

Gateway of last resort is not set

 

D    1.0.0.0/8[90/2809856] via 123.1.2.2, 00:04:39, Serial0/3

D    2.0.0.0/8[90/2297856] via 123.1.2.2, 00:04:39, Serial0/3

     3.0.0.0/8is variably subnetted, 2 subnets, 2 masks

C       3.3.3.0/24is directly connected, Loopback0

D       3.0.0.0/8is a summary, 00:54:07, Null0

    123.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

C      123.1.2.0/24 is directly connected, Serial0/3

D      123.1.1.0/24 [90/2681856] via 123.1.2.2, 00:04:39, Serial0/3

D      123.0.0.0/8 is a summary, 00:06:34, Null0


     在帧中继Hub-and-Spoken 拓扑结构中,默认水平分割开启的情况下,只有Hub路由器能够学习到完整的路由,由于水平分割作用,两个Spoke路由器均不能学习到对方的路由信息,解决方法是将Hub路由器接口的水平分割关闭,或者使用帧中继子接口来解决这个问题。