1. 程式人生 > >一個拓撲全搞定-- EIGRP水平分割

一個拓撲全搞定-- EIGRP水平分割

eigrp 水平分割 ccna

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條路由

技術分享


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 已經正常學習到對方的路由信息了

方法二:將單一物理接口劃分為兩個子接口

使用幀中繼子接口,將原本的單一物理接口劃分為兩個子接口,水平分割便不會影響路由器間的路由轉發了,但是啟用子接口之後會需要另一個子網(幀中繼每個子接口都是一個獨立子網):

技術分享

-- 幀中繼子接口


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路由器接口的水平分割關閉,或者使用幀中繼子接口來解決這個問題。


一個拓撲全搞定-- EIGRP水平分割