实验拓扑
Router(config)#frame-relay switching 把路由器模拟成帧中继交换机
Router(config)#inter s1/1
Router(config-if)#clock rate 128000
Router(config-if)#encapsulation frame-relay 配置接口封装帧中继
接口上启用的默认帧中继封装为Cisco封装,如果连接到非思科路由器,要使用itef参数
Router(config-if)#no shu
Router(config)#inter s1/2
Router(config-if)#clo rate 128000
Router(config-if)#encapsulation fr
Router(config-if)#no shu
changed state to upnointer s1/3
Router(config-if)#clo rate 128000
Router(config-if)#encapsulation fr
Router(config-if)#no shu
Router(config)#inter s1/1
Router(config-if)#frame-relay lmi-type cisco 配置LMI类型
Router(config-if)#frame-relay intf-type dce 配置接口为帧中继的DCE
Router(config-if)#inter s1/2
Router(config-if)#frame-relay lmi-type cisco
Router(config-if)#frame-relay intf-type dce
Router(config-if)#inter s1/3
Router(config-if)#frame-relay lmi-type cisco
Router(config-if)#frame-relay intf-type dce
配置路由器两个接口之间的pvc
Router(config)#inter s1/1
Router(config-if)#frame-relay route 103 inter s1/2 301
Router(config-if)#frame-relay route 104 inter s1/3 401
Router(config-if)#exit
Router(config)#inter s1/2
Router(config-if)#frame-relay route 301 inter s1/1 103
Router(config-if)#frame-relay route 304 inter s1/3 403
Router(config-if)#exit
Router(config)#inter s1/3
Router(config-if)#frame-relay route 401 inter s1/1 104
Router(config-if)#frame-relay route 403 inter s1/2 304
Router(config-if)#
Router#show frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial1/1 103 Serial1/2 301 active
Serial1/1 104 Serial1/3 401 active
Serial1/2 301 Serial1/1 103 active
Serial1/2 304 Serial1/3 403 active
Serial1/3 401 Serial1/1 104 active
Serial1/3 403 Serial1/2 304 active
表明路由器R2上配置3条PVC 状态都是活动的
R1的配置
Router(config)#inter s1/1
Router(config-if)#ip address 172.16.134.1 255.255.255.0
Router(config-if)#encapsulation fr 接口封装帧中继
Router(config-if)#frame-relay lmi-type cisco
Router(config)#inter fa0/0
Router(config-if)#ip add
Router(config-if)#ip address 192.168.1.1 255.255.255.0
Router(config-if)#no shu
如果采用Cisco路由器的IOS是11.2及以后的版本,路由器可以自动协商LMI是类型
所以可以不配
Router(config)#router rip
Router(config-router)#ver 2
Router(config-router)#no auto-summary
Router(config-router)#network 172.16.134.0
Router(config-router)#network 192.168.1.0
Router(config-router)#exit
R3和R4同R1
ping测试
Router#ping 172.16.134.1 source 192.168.4.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.134.1, timeout is 2 seconds:
Packet sent with a source address of 192.168.4.1
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/155/200 ms
查看帧中继的映射
Router#show frame-relay map
Serial1/1 (up): ip 172.16.134.3 dlci 103(0x67,0x1870), dynamic,