Frame-relay综合实验-1
试验拓扑:
理解试验拓扑:本试验拓扑为部分网格,也叫hub and sopke,R2和R3分别通过frame云和R1相连,R2与R3之间没有连接。
试验目的:使用全物理接口封装frame-relay,然后在R2上ping R3,观察出现的问题和掌握解决问题的方法。
实验配置:
Frame-relay Switch:
FRSW(config)#frame-relay switching
FRSW(config)#int s1/0
FRSW(config-if)#enca frame-relay
FRSW(config-if)#frame-relay intf-type dce
FRSW(config-if)#clock rate 5600
FRSW(config-if)#frame-relay route 301 interface s1/1 103
FRSW(config-if)#frame-relay route 302 interface s1/2 203
FRSW(config-if)#no shu
FRSW(config-if)#exit
FRSW(config)#int s1/1
FRSW(config-if)#encapsulation frame-relay
FRSW(config-if)#frame-relay intf-type dce
FRSW(config-if)#clock rate 5600
FRSW(config-if)#frame-relay route 103 interface s1/0 301
FRSW(config-if)#no shu
FRSW(config-if)#exit
FRSW(config)#int s1/2
FRSW(config-if)#encapsulation frame-relay
FRSW(config-if)#frame-relay intf-type dce
FRSW(config-if)#clock rate 5600
FRSW(config-if)#frame-relay route 203 interface s1/0 302
FRSW(config-if)#no shu
R1:
R1(config)#int s1/0
R1(config-if)#ip add 172.16.3.3 255.255.255.0
R1(config-if)#enca frame-relay
R1(config-if)#no shu
R2:
R2(config)#int s1/0
R2(config-if)#ip add 172.16.3.1 255.255.255.0
R2(config-if)#enca fram
R2(config-if)#no shu
R3:
R3(config)#int s1/0
R3(config-if)#ip add 172.16.3.2 255.255.255.0
R3(config-if)#enca fram
R3(config-if)#no shu
以上为frame-relay基本配置,下面我们用R2分别ping R1 and R3:
R2#ping 172.16.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 192/295/372 ms
可以ping通R1,是因为我们有到R1的映射。
R2#debug ip pac
IP packet debugging is on
R2#ping 172.16.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
*Mar 1 00:02:43.959: IP: tableid=0, s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), routed via RIB
*Mar 1 00:02:43.963: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, sending
*Mar 1 00:02:43.963: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, encapsulation failed.
*Mar 1 00:02:45.959: IP: tableid=0, s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), routed via RIB
*Mar 1 00:02:45.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, sending
*Mar 1 00:02:45.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, encapsulation failed.
*Mar 1 00:02:47.959: IP: tableid=0, s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), routed via RIB
*Mar 1 00:02:47.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, sending
*Mar 1 00:02:47.963: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, encapsulation failed.
*Mar 1 00:02:49.959: IP: tableid=0, s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), routed via RIB
*Mar 1 00:02:49.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, sending
*Mar 1 00:02:49.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, encapsulation failed.
*Mar 1 00:02:51.959: IP: tableid=0, s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), routed via RIB
*Mar 1 00:02:51.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, sending
*Mar 1 00:02:51.959: IP: s=172.16.3.1 (local), d=172.16.3.2 (Serial1/0), len 100, encapsulation failed.
无法ping通R3,debug信息显示“encapsulation failed”,说明链路层有问题,然后用debug fram pac命令显示链路层调试信息:
R2#debug fram pac
Frame Relay packet debugging is on
R2#ping 172.16.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
*Mar 1 00:03:03.835: Serial1/0:Encaps failed--no map entry link 7(IP).
*Mar 1 00:03:05.831: Serial1/0:Encaps failed--no map entry link 7(IP).
*Mar 1 00:03:07.831: Serial1/0:Encaps failed--no map entry link 7(IP).
*Mar 1 00:03:09.831: Serial1/0:Encaps failed--no map entry link 7(IP).
*Mar 1 00:03:11.831: Serial1/0:Encaps failed--no map entry link 7(IP).
Success rate is 0 percent (0/5)
我们看到debug信息显示“:Encaps failed--no map entry link”,说明没有到R3的映射,因为我们这里采用的是InverseARP来动态映射IP和DLCI的,由于InverseARP无法映射远端spoke的IP,所以在这里我们需要用frame-relay map命令手动添加,如下:
R2(config)#int s1/0
R2(config-if)#fram map ip 172.16.3.2 103 broadcast
再观察ping R3时调试信息:
R2#ping 172.16.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
*Mar 1 00:04:38.395: Serial1/0(o): dlci 103(0x1871), pkt type 0x800(IP), datagramsize 104
*Mar 1 00:04:38.603: Serial1/0(i): dlci 103(0x1871), pkt type 0x800, datagramsize 60.
*Mar 1 00:04:40.391: Serial1/0(o): dlci 103(0x1871), pkt type 0x800(IP), datagramsize 104.
*Mar 1 00:04:42.391: Serial1/0(o): dlci 103(0x1871), pkt type 0x800(IP), datagramsize 104.
*Mar 1 00:04:44.391: Serial1/0(o): dlci 103(0x1871), pkt type 0x800(IP), datagramsize 104.
*Mar 1 00:04:46.391: Serial1/0(o): dlci 103(0x1871), pkt type 0x800(IP), datagramsize 104.
Success rate is 0 percent (0/5)
成功发送出去,但是还是无法ping通,我们到R3上观察调试信息:
R3#debug fram pac
Frame Relay packet debugging is on
R3#
*Mar 1 00:03:49.847: Serial1/0(i): dlci 203(0x30B1), pkt type 0x800, datagramsize 104
*Mar 1 00:03:49.847: Serial1/0:Encaps failed--no map entry link 7(IP)
*Mar 1 00:03:51.863: Serial1/0(i): dlci 203(0x30B1), pkt type 0x800, datagramsize 104
*Mar 1 00:03:51.863: Serial1/0:Encaps failed--no map entry link 7(IP)
同样出现了没有做映射的问题,因为ICMP ECHO包需要返回应答,所以必须在R3上也要手动添加到R2的映射:
R3(config)#int s1/0
R3(config-if)#fram map ip 172.16.3.1 203 broadcast
然后在R2上ping R3:
R2#ping 172.16.3.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 360/392/432 ms
OK,可以ping通。能ping通的原因是spoke路由器把包发给hub路由器,由于hub路由器有到全部spoke路由器的映射,所以它可以把包成功的转发到目的spoke路由器。
总结:在部分网格/hub and spoke拓扑结构中,如果全部采用物理接口来配置frame-relay的话,需要在所有的spoke路由器上添加到其余所有spoke路由器的映射。
本文转自loveme2351CTO博客,原文链接:http://blog.51cto.com/loveme23/43208 ,如需转载请自行联系原作者