4.7 Frame-Relay&Static Route

实验目的:

1、掌握帧中继上部署静态路由技术。

2、通过静态路由实现不同分支之间的通信。

实验拓扑:

PingingLab传世经典系列《CCNA完全配置宝典》-4.7 Frame-Relay&Static Route_CCNA


实验步骤:

1、依据图中拓扑,通过路由器模拟帧中继交换机,配置如下:

开启帧中继交换功能

FW-SW(config)#frame-relay switching

接口开启帧中继封装,并定义为DCE接口

FW-SW(config)#int s0/0

FW-SW(config-if)#no shutdown

FW-SW(config-if)#encapsulation frame-relay

FW-SW(config-if)#frame-relay intf-type dce

FW-SW(config-if)#exit

FW-SW(config)#int s0/1

FW-SW(config-if)#no shutdown

FW-SW(config-if)#encapsulation frame-relay

FW-SW(config-if)#frame-relay intf-type dce

FW-SW(config-if)#exit

FW-SW(config)#int s0/2

FW-SW(config-if)#no shutdown

FW-SW(config-if)#encapsulation frame-relay

FW-SW(config-if)#frame-relay intf-type dce

FW-SW(config-if)#exit

编写帧中继转发条目

FW-SW(config)#int s0/0

FW-SW(config-if)#frame-relay route 102 interface s0/1 201

FW-SW(config-if)#frame-relay route 201 interface s0/0 102

FW-SW(config-if)#exit

FW-SW(config)#int s0/1

FW-SW(config-if)#frame-relay route 201 interface s0/0 102

FW-SW(config-if)#exit

FW-SW(config)#int s0/2

FW-SW(config-if)#frame-relay route 301 interface s0/0 102

FW-SW(config-if)#exit

2、通过部署帧中继技术,使得各个站点直连连通,其中R1为中心点,R2R3为分支点,配置如下:

R1

R1(config)#int s0/0

R1(config-if)#no shutdown

R1(config-if)#encapsulation frame-relay

R1(config-if)#no frame-relay inverse-arp

R1(config-if)#frame-relay map ip 192.168.1.2 102 broadcast

R1(config-if)#frame-relay map ip 192.168.1.3 103 broadcast

R1(config-if)#exit

R2

R2(config)#int s0/0

R2(config-if)#no shutdown

R2(config-if)#encapsulation frame-relay

R2(config-if)#no frame-relay inverse-arp

R2(config-if)#frame-relay map ip 192.168.1.1 201 broadcast

R2(config-if)#frame-relay map ip 192.168.1.3 201 broadcast

R2(config-if)#exit

R3

R3(config)#int s0/0

R3(config-if)#no shutdown

R3(config-if)#encapsulation frame-relay

R3(config-if)#no frame-relay inverse-arp

R3(config-if)#frame-relay map ip 192.168.1.1 301 broadcast

R3(config-if)#frame-relay map ip 192.168.1.2 301 broadcast

R3(config-if)#exit

测试直连连通性,如下:

R1#ping 192.168.1.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 36/42/60 ms

R1#ping 192.168.1.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 16/31/52 ms

R2#ping 192.168.1.3

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds:

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 44/68/96 ms

可以看到,直连连通没有问题。

3、部署静态路由技术,使得不同分支之间能够相互通信,配置如下:

R1(config)#ip route 2.2.2.2 255.255.255.255 192.168.1.2[PL1]

R1(config)#ip route 3.3.3.3 255.255.255.255 192.168.1.3

R2(config)#ip route 1.1.1.1 255.255.255.255 192.168.1.1

R2(config)#ip route 3.3.3.3 255.255.255.255 192.168.1.3

R3(config)#ip route 1.1.1.1 255.255.255.255 192.168.1.1

R3(config)#ip route 2.2.2.2 255.255.255.255 192.168.1.2

此时测试不同分支背后网段能否相互通信,如下:

R1#ping 2.2.2.2 source 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 24/45/64 ms

R1#ping 3.3.3.3 source 1.1.1.1

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

Packet sent with a source address of 1.1.1.1

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 40/42/52 ms

R2#ping 3.3.3.3 source 2.2.2.2

Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:

Packet sent with a source address of 2.2.2.2

!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 48/59/80 ms

测试成功,此实验完成。


[PL1]帧中继环境下,静态路由写法需要采用下一跳。如果采用出接口写法,则无法找到映射信息,封装失败,导致通信失败,若采用下一跳,则经过路由递归后可以找到映射信息。一般在点对点环境下静态路由采用出接口写法,在多路访问环境下采用下一跳写法。

==========================================

PingingLab·高品质IT教育提供商

CCIE 实验室·IT项目实战·高端人才定制

深圳拼客信息科技有限公司·广州大学城外环西路站

新浪微博:@拼客科技PingingLab  @PingingLab-陈鑫杰

PingingLab微信公众号:pinginglab

PingingLab技术交流群:240920680

PingingLab传世经典系列《CCNA完全配置宝典》-4.7 Frame-Relay&Static Route_CCNA_02