帧中继( Frame Relay)是一种用于连接计算机系统的面向分组的通信方法。它主要用在公共或专用网上的局域网互联以及广域网连接。大多数公共电信局都提供帧中继服务,把它作为建立高性能的虚拟广域连接的一种途径。帧中继是进入带宽范围从56Kbps到1.544Mbps的广域分组交换网的用户接口。CCNA考试有时会抽到此题,掌握一下没有坏处。
   下面我们用模拟器来做这个试验,用路由器来模拟帧继环境。
实验环境:两台路由,串口相连
实验要求:用路由器模拟帧中继环境,FR-SW为帧中继交换机,同时使用缺省路由使全网互通
实验拓扑:
一:配置帧中继及连通性
fr-sw的配置:
fr-sw(config)#fram-relay switching    启用帧中继交换机功能
fr-sw(config)#int loopback 1
fr-sw(config-if)#ip add 1.1.1.1 255.255.255.0
fr-sw(config-if)#int s1/0
fr-sw(config-if)#ip add 192.168.10.1 255.255.255.0
fr-sw(config-if)#no sh
fr-sw(config-if)#encapsulation frame-relay  封装帧中继
fr-sw(config-if)#fram-relay intf-type dce     设为时钟提供端
fr-sw(config-if)#clock rate 64000     设定时钟为64000
fr-sw(config-if)#fram-relay map ip 192.168.10.2 102 broadcast
-->启用静态映射,这个DLCI号码(102)同时也是对端设备的DLCI,两端必须相同
fr-sw(config-if)#fram-relay map ip 192.168.10.1 102 broadcast 
-->指向自已,是为了PING通本路由器的接口
fr-sw(config)#ip route 0.0.0.0 0.0.0.0 0.0.0.0
 
R1的配置:
r1(config)#int loopback 2
r1(config-if)#ip add 2.2.2.2 255.255.255.0
r1(config)#int s0/0
r1(config-if)#ip add 192.168.10.2 255.255.255.0
r1(config-if)#no sh
r1(config-if)#encapsulation fram-relay
r1(config-if)#fram-relay map ip 192.168.10.1 102 broadcast   与对端相同
r1(config-if)#fram-relay map ip 192.168.10.2 102 broadcast   指向自已
r1(config)#ip route 0.0.0.0 0.0.0.0 0.0.0.0   启用缺省路由
 
 
调试验证:
fr-sw的帧中继映射关系:
fr-sw#sh frame-relay map
Serial0/0 (up): ip 192.169.10.1 dlci 102(0x64,0x1840), static,
              broadcast,
              CISCO, status defined, active
Serial0/0 (up): ip 192.169.10.2 dlci 102(0x64,0x1840), static,
              broadcast,
              CISCO, status defined, active
 
R1的帧中继状态:
r1#sh frame-relay pvc
PVC Statistics for interface Serial0/0 (Frame Relay DTE)   s0/0为DTE端
              Active     Inactive      Deleted       Static
  Local          1            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0
DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
  input pkts 0             output pkts 0            in bytes 0        
  out bytes 0              dropped pkts 0           in FECN pkts 0        
  in BECN pkts 0           out FECN pkts 0          out BECN pkts 0        
  in DE pkts 0             out DE pkts 0        
  out bcast pkts 0          out bcast bytes 0        
  pvc create time 00:03:12, last time pvc status changed 00:02:32
 
R1的帧中继映射;
r1#sh frame-relay map
Serial0/0 (up): ip 192.168.10.1 dlci 102(0x64,0x1840), static,
              broadcast,
              CISCO, status defined, active
Serial0/0 (up): ip 192.168.10.2 dlci 102(0x64,0x1840), static,
              broadcast,
              CISCO, status defined, active
 
连通性测试:
FR-SW上连通性测试:
fr-sw#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 28/31/32 ms
fr-sw#ping 192.168.10.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/30/36 ms
 
R1上连通性测试:
r1#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/28/72 ms
r1#ping 192.168.10.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.10.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/28/32 ms