实验目的:

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

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

实验拓扑:

实验步骤:

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为中心点,R2和R3为分支点,配置如下:

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 

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

测试成功,此实验完成。