广域网的另一种技术:帧中继


一、点到点的配置

实验拓扑图:

封装为帧中继

RT1(S0/2/0)--------------------------------(S0/2/0)RT2

IP:192.168.1.1/24 IP:192.168.1.2/24


RT1:

interface s0/2/0

ip address 192.168.1.1 255.255.255.0

undo shutdown

link-protocol fr

fr interface-type dce (必须指明是DCE端)

fr dlci 100

fr inarp (可省略,默认IARP是开启的)


RT2:

interface s0/2/0

ip address 192.168.1.2 255.255.255.0

undo shutdown

link-protocol fr

fr interface-type dte(可省略,路由器默认就是DTE端)

fr inarp (可省略,默认IARP是开启的)



二、点到多点:

实验拓扑图:

(S0/2/2)----------(S0/2/1)RT2

| 12.12.12.2/24

RT1(S0/2/1)-------(S0/2/1)ATM交换机(RT10)

12.12.12.1/24 |

(S0/2/3)-----------(S0/2/1)RT3

12.12.12.3/24

注意事项:

1、其中的帧中继交换机是用路由器模拟出来的

2、帧中继是DCE设备,路由器是DTE设备

3、有两条虚链路:

RT1到RT2上的虚链路:

RT1------(DLCI=50)-------ATM-------(DLCI=60)-----RT2


RT1到RT3上的虚链路:



RT1-------(DLCI=70)------ATM-------(DLCI=80)-----RT3

4、关于水平分割

5、配置子接口


实验要求:

1、先做好帧中继的配置,让各个虚链路都能是active的状态

2、做好帧中继后,再来做路由(RIP2),关闭水平分割

3、配置子接口,启动水平分割,让各个网段都可以ping通


实验配置:

第一步:ATM基本配置

RT10:

[RT10]fr switching

[RT10]interface s0/2/1

[RT10-Serial0/2/1]link-protocol fr

[RT10-Serial0/2/1]fr interface-type dce

[RT10-Serial0/2/1]fr dlci-switch 50 interface s0/2/2 dlci 60

[RT10-Serial0/2/1]fr dlci-switch 70 interface s0/2/3 dlci 80

[RT10-Serial0/2/1]interface s0/2/2

[RT10-Serial0/2/2]link-protocol fr

[RT10-Serial0/2/2]fr interface-type dce

[RT10-Serial0/2/2]fr dlci-switch 60 interface s0/2/1 dlci 50

[RT10-Serial0/2/2]interface s0/2/3

[RT10-Serial0/2/3]link-protocol fr

[RT10-Serial0/2/3]fr interface-type dce

[RT10-Serial0/2/3]fr dlci-switch 80 interface s0/2/1 dlci 70

[RT10-Serial0/2/3]display fr dlci

[RT10-Serial0/2/3]display fr dlci-switch

Frame relay switch statistics

Status Interface(Dlci) <----------> Interface(Dlci)

Inactive Serial0/2/1(50) Serial0/2/2(60)

Inactive Serial0/2/1(70) Serial0/2/2(80)

Inactive Serial0/2/2(60) Serial0/2/1(50)

Inactive Serial0/2/3(80) Serial0/2/1(70)


RT1:

system-view

[R1]sysname RT1

[RT1]user-interface console 0

[RT1-ui-console0]idle

[RT1-ui-console0]idle-timeout 0

[RT1]interface s0/2/1

[RT1-Serial0/2/1]link-protocol fr


RT2:

system-view

System View: return to User View with Ctrl+Z.

[R2]sysname RT1

[RT2]user-interface console 0

[RT2-ui-console0]idle

[RT2-ui-console0]idle-timeout 0

[RT2]interface s0/2/1

[RT2-Serial0/2/1]link-protocol fr


RT3:

system-view

System View: return to User View with Ctrl+Z.

[R3]sysname RT1

[RT3]user-interface console 0

[RT3-ui-console0]idle

[RT3-ui-console0]idle-timeout 0

[RT3]interface s0/2/1

[RT3-Serial0/2/1]link-protocol fr


配置完成以后:(display fr dlci-switch)

RT10:

[RT10-Serial0/2/3]display fr dlci-switch

Frame relay switch statistics

Status Interface(Dlci) <----------> Interface(Dlci)

Active Serial0/2/1(50) Serial0/2/2(60)

Active Serial0/2/1(70) Serial0/2/3(80)

Active Serial0/2/2(60) Serial0/2/1(50)

Active Serial0/2/3(80) Serial0/2/1(70)


第二步:给各个物理接口配置好IP地址,用display fr map-info来查看协议地址与帧中继地址映射表,配置好以后路由器之间就可以ping通了

RT1:

interface loopback 1

ip address 171.16.1.1 255.255.255.0

interface loopback 2

ip address 171.16.2.1 255.255.255.0

interface loopback 3

ip address 171.16.3.1 255.255.255.0

[R1]interface s0/2/1

[R1-Serial0/2/1]ip address 12.12.12.1 255.255.255.0

[R1-Serial0/2/1]un shutdown

[R1-Serial0/2/1]display fr map-info

Map Statistics for interface Serial0/2/1 (DTE)

DLCI = 50, IP INARP 12.12.12.2, Serial0/2/1

create time = 2011/11/19 18:23:46, status = ACTIVE

encapsulation = ietf, vlink = 1, broadcast

DLCI = 70, IP INARP 12.12.12.3, Serial0/2/1

create time = 2011/11/19 18:24:31, status = ACTIVE

encapsulation = ietf, vlink = 2, broadcast


RT2:

interface loopback 1

ip address 172.16.1.1 255.255.255.0

interface loopback 2

ip address 172.16.2.1 255.255.255.0

interface loopback 3

ip address 172.16.3.1 255.255.255.0

[R2]interface s0/2/1

[R2-Serial0/2/1]ip address 12.12.12.1 255.255.255.0

[R2-Serial0/2/1]un shutdown

[R2-Serial0/2/1]display fr map-info

Map Statistics for interface Serial0/2/1 (DTE)

DLCI = 60, IP INARP 12.12.12.1, Serial0/2/1

create time = 2011/11/19 18:23:44, status = ACTIVE

encapsulation = ietf, vlink = 1, broadcast


RT3:

interface loopback 1

ip address 173.16.1.1 255.255.255.0

interface loopback 2

ip address 173.16.2.1 255.255.255.0

interface loopback 3

ip address 173.16.3.1 255.255.255.0

[R3]interface s0/2/1

[R3-Serial0/2/1]ip address 12.12.12.1 255.255.255.0

[R3-Serial0/2/1]un shutdown

[R3-Serial0/2/1]display fr map-info

Map Statistics for interface Serial0/2/1 (DTE)

DLCI = 80, IP INARP 12.12.12.1, Serial0/2/1

create time = 2011/11/19 18:24:29, status = ACTIVE

encapsulation = ietf, vlink = 1, broadcast


第三步:配置路由(RIP2)

RT1:

[RT1]rip

[RT1-rip-1]version 2

[RT1-rip-1]undo summary

[RT1-rip-1]network 171.16.0.0

[RT1-rip-1]network 12.0.0.0


RT2:

[R2]rip

[R2-rip-1]version 2

[R2-rip-1]un summary

[R2-rip-1]network 172.16.0.0

[R2-rip-1]network 12.0.0.0


RT3:

[R3]rip

[R3-rip-1]version 2

[R3-rip-1]un summary

[R3-rip-1]network 173.16.0.0

[R3-rip-1]network 12.0.0.0


问题:

配置完成以后用"display ip routing"查看各个路由器的路由表会发现:在RT1上可以看到所有的路由条目,但是在RT2上看不到RT3上路由条目,在RT3上看不到RT2的路由条目 !

原因:水平分割机制导致的

水平分割:从同一个接口学到的路由条目,不能再从同一个接口出去

解决办法:

从拓扑图中可以分析得出,只要在RT1上的S0/2/1接口上关闭水平分割,RT2与RT3就可以相互学到对方路由!


第四步:关闭水平分割

RT1:

[RT1]interface s0/2/1

[RT1-Serial0/2/1]un rip split-horizon


问题:

现在在RT2与RT3上"display ip routing "就可以看到全部的路由条目!但是还有一个问题:虽然现在RT2与RT3上面都有对方的路由条目,但是他们相互之间是ping不通的,只能ping通RT1(在RT1上可以ping通所有的网段)

解决办法:

配置子接口!!



第五步:配置子接口


实验拓扑图:

(S0/2/2)----------(S0/2/1)RT2

|

RT1(S0/2/1)-------(S0/2/1)ATM交换机(RT10)

|

(S0/2/3)-----------(S0/2/1)RT3

注意事项:

1、配置子接口的物理接口上不能配置IP地址

2、每个子接口,都是一个单独的网段!

RT1到RT2上的虚链路:

S0/2/1.1 1.1.1.0/24

RT1------(DLCI=50)-------ATM-------(DLCI=60)-----RT2



RT1到RT3上的虚链路:

S0/2/1.2


2.2.2.0/24

RT1-------(DLCI=70)------ATM-------(DLCI=80)-----RT3

3、现在要开启水平分割


实验配置:

RT1:

[RT1]interface s0/2/1

[RT1-Serial0/2/1]undo ip address

[RT1-Serial0/2/1]un shutdown

[RT1-Serial0/2/1]rip split-horizon

[RT1-Serial0/2/1]interface s0/2/1.1

[RT1-Serial0/2/1.1]ip address 1.1.1.1 255.255.255.0

[RT1-Serial0/2/1.1]fr dlci 50

[RT1]interface s0/2/1

[RT1-Serial0/2/1]interface s0/2/1.2

[RT1-Serial0/2/1.2]ip address 2.2.2.1 255.255.255.0

[RT1-Serial0/2/1.2]fr dlci 70


RT2:

[R2]interface s0/2/1

[R2-Serial0/2/1]undo ip address

[R2-Serial0/2/1]undo shutdown

[R2-Serial0/2/1]ip address 1.1.1.2 255.255.255.0


RT3:

[R3]interface s0/2/1

[R3-Serial0/2/1]undo ip address

[R3-Serial0/2/1]un shutdown

[R3-Serial0/2/1]ip address 2.2.2.2 255.255.255.0


配置路由:

RT1:

[RT1]rip

[RT1-rip-1]version 2

[RT1-rip-1]un summary

[RT1-rip-1]network 1.0.0.0

[RT1-rip-1]network 2.0.0.0

[RT1-rip-1]network 171.16.0.0


RT2:

[R2]rip

[RT1-rip-1]version 2

[RT1-rip-1]un summary

[R2-rip-1]network 1.0.0.0

[R2-rip-1]network 172.16.0.0


RT3:

[R3]rip

[RT1-rip-1]version 2

[RT1-rip-1]un summary

[R3-rip-1]network 2.0.0.0

[R3-rip-1]network 173.16.0.0


现在在每台路由器上用“display ip routing”查看路由表信息,可以看到所有的路由条目,相互之间也可以ping通