1、环境:两台路由器,由串口相连。要求:用两台路由器来模拟帧中继环境,fr-sw 为帧中继交换机,并使用静态路由使网络联通。步骤一:配置帧中继及联通性fr-sw 的配置:fr-sw (config)#frame-relay switching ?启用帧中继交换机fr-sw (config)#interface loopback 0fr-sw (config-if)#ip address 1.1.1.1 255.255.255.0fr-sw (config-if)#interface serial 0fr-sw (config-if)#encapsulation frame-relay ?封装帧中继
2、fr-sw (config-if)#frame-relay intf-type dce ?时钟提供端fr-sw (config-if)#clock rate 64000fr-sw (config-if)#ip address 10.1.1.1 255.255.255.0fr-sw (config-if)#frame-relay map ip 10.1.1.2 102 broadcast?启用静态映射,此DLCI 号码同时也是分配给对端设备的 DLCI。因此,要求两端的 DLCI 号码必须相同。fr-sw (config-if)#frame-relay map ip 10.1.1.1 102 b
3、roadcast?指向自己的目的,是为了 PING 通本路由器的接口。fr-sw (config-if)#no shutdownr2的配置r2(config)#interface loopback 0r2(config-if)#ip address 2.2.2.2 255.0.0.0r2(config-if)#interface serial0r2(config-if)#encapsulation frame-relayr2(config-if)#ip address 10.1.1.2 255.255.255.0r2(config-if)#frame-relay map ip 10.1.1.1
4、 102 broadcast?与对端相同。r2(config-if)#frame-relay map ip 10.1.1.2 102 broadcast?与对端相同。r2(config-if)#no shutdown步骤二、配置路由fr-sw (config)#ip route 2.2.2.0 255.255.255.0 10.1.1.2r2(config)#ip route 1.1.1.0 255.255.255.0 10.1.1.1步骤三、测试fr-sw #ping ipTarget IP address: 2.2.2.2Extended commands n: ySource addre
5、ss or interface: 1.1.1.1!r2#pingProtocol ip:Target IP address: 1.1.1.1Extended commands n: ySource address or interface: 2.2.2.2!步骤四、查看状态fr-sw 的帧中继状态fr-sw #show frame-relay pvc ?查看 PVC 状态PVC Statistics for interface Serial0 (Frame Relay DCE)Active Inactive Deleted StaticLocal 1 0 0 0Switched 0 0 0 0
6、Unused 0 0 0 0DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0input pkts 69 output pkts 49 in bytes 6074out bytes 5052 dropped pkts 0 in pkts dropped 0out pkts dropped 0 out bytes dropped 0in FECN pkts 0 in BECN pkts 0 out FECN pkts 0out BECN pkts 0 in DE pkts 0 out DE pkts 0
7、out bcast pkts 0 out bcast bytes 0pvc create time 00:48:44, last time pvc status changed 00:47:23fr-sw #show frame-relay map ?查看帧中继映射Serial0 (up): ip 10.1.1.1 dlci 102(0x66,0x1860), static,broadcast,CISCO, status defined, activeSerial0 (up): ip 10.1.1.2 dlci 102(0x66,0x1860), static,broadcast,CISCO,
8、 status defined, activer2帧中继的状态:r2#show frame-relay pvc ?显示 PVC 状态PVC Statistics for interface Serial0 (Frame Relay DTE)Active Inactive Deleted StaticLocal 1 0 0 0Switched 0 0 0 0Unused 0 0 0 0DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0input pkts 26 output pkts 35 in byt
9、es 2660out bytes 3137 dropped pkts 0 in pkts dropped 0out pkts dropped 0 out bytes dropped 0in FECN pkts 0 in BECN pkts 0 out FECN pkts 0out BECN pkts 0 in DE pkts 0 out DE pkts 0out bcast pkts 9 out bcast bytes 477pvc create time 00:20:07, last time pvc status changed 00:20:07r2#show frame-relay ma
10、p ?显示帧中继映射Serial0 (up): ip 10.1.1.1 dlci 102(0x66,0x1860), static,broadcast,CISCO, status defined, activeSerial0 (up): ip 10.1.1.2 dlci 102(0x66,0x1860), static,broadcast,CISCO, status defined, active步骤五、显示当前配置fr-sw 的当前配置:fr-sw #show running-confighostname fr-sw!frame-relay switching!interface Loopb
11、ack0ip address 1.1.1.1 255.255.255.0!interface Serial0ip address 10.1.1.1 255.255.255.0encapsulation frame-relayclockrate 64000frame-relay map ip 10.1.1.1 102 broadcastframe-relay map ip 10.1.1.2 102 broadcastframe-relay intf-type dce!ip route 2.2.2.0 255.255.255.0 10.1.1.2!endr2的当前配置:r2#show runnin
12、g-confighostname r2!interface Loopback0ip address 2.2.2.2 255.255.255.0!interface Serial0ip address 10.1.1.2 255.255.255.0encapsulation frame-relayframe-relay map ip 10.1.1.1 102 broadcastframe-relay map ip 10.1.1.2 102 broadcast!ip route 1.1.1.0 255.255.255.0 10.1.1.1!endframe-relay switching !路由器用
13、作帧中继交换机interface Serial1/0no ip addressencapsulation frame-relay !配置帧中继封装clockrate 56000 !dce 配置时钟frame-relay lmi-type cisco !帧中继 lmi 类型(11.2 后就不需此配置了 .)frame-relay intf-type dce !端口类型为 dceframe-relay route 18 interface Serial1/1 28 !配置帧中继交换表上面这条命令说简单点:从哪个 DLCI(18)进入 S1/0(inter s1/0)的数据要到哪个 DLCI(28)
14、.它将从哪个接口出去(S1/1)同样的进 S1/1 口为其做配置.interface Serial1/1no ip addressencapsulation frame-relayclockrate 56000frame-relay lmi-type ciscoframe-relay intf-type dceframe-relay route 28 interface Serial1/0 18现在 FR 中心的 FR-S 已经配置完毕.就好象-f 参数定义好了.接下来,该配置 FR 用户端了.R1R1(config)#int s1/0R1(config-if)#ip address 192.
15、168.12.1 255.255.255.0R1(config-if)#encapsulation frame-relayR1(config-if)#frame-relay lmi-type ciscoR1(config-if)#frame-relay map ip 192.168.12.2 18 broadcast上面这条命令: 协议地址映射 .即远端 IP 映射到本地的 DLCI.后面的 Broadcast 参数指明路由更新信息通过该电路穿越网络(让 NBMA 支持广播 )R2R2(config)#int s1/0R2(config-if)#ip address 192.168.12.2
16、255.255.255.0R2(config-if)#encapsulation frame-relayR2(config-if)#frame-relay lmi-type ciscoR2(config-if)#frame-relay map ip 192.168.12.1 28 broadcast查看:1检查各个 pvc 是否处于 active 状态,命令 show frame-relay pvc;2启动路由协议;3使用 ping 命令检查各个用于路由器是否连通;4用 show frame-relay lmi 看 lmi 信息;5用 show frame-relay map 看帧中继映射表;6用 show ip route 看路由表是否正确?以上内容即为 FR-S 的简单配置,当然,大家可以尝试配置 FR 的子接口等