一、使用帧中继交换机1.1实验拓扑1.2配置示例1.帧中继交换机配置2.路由器配置脚本R1R1>enR1#conf tR1(config)#intR1(config)#interface s 1/0R1(config-if)#no shR1(config-if)#ip add 192.168.1.1 255.255.255.0R1(config-if)#encapsulation frame-relay //设置封装模式R1(config-if)#serial restart-delay 0R1(config-if)#frame-relay map ip 192.168.1.2 102 //创建映射R1(config-if)#frame-relay map ip 192.168.1.3 103R1(config-if)#no frame-relay inverse-arp //关闭inverse-arp R1(config-if)#R2R2>R2>enR2#conf tR2(config)#int s 1/0R2(config-if)#ip add 192.168.1.2 255.255.255.0R2(config-if)#no shR2(config-if)#encapsulation frame-relayR2(config-if)#frame-relay map ip 192.168.1.1 201 R2(config-if)#frame-relay map ip 192.168.1.3 203 R2(config-if)#no frame-relay inverse-arpR2(config-if)#R3R3>enR3#conf tR3(config)#int s 1/0R3(config-if)#ip add 192.168.1.3 255.255.255.0R3(config-if)#no shR3(config-if)#encapsulation frame-relayR3(config-if)#frame-relay map ip 192.168.1.1 301 R3(config-if)#frame-relay map ip 192.168.1.2 302 R3(config-if)#no frame-relay inverse-arpR3(config-if)#3.验证R3(config-if)#do ping 192.168.1.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.1, timeout is 2 seconds: !!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 32/61/88 ms R3(config-if)#do ping 192.168.1.2Type 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 = 28/47/88 ms R3(config-if)#全网互通R3(config-if)#do show fram maSerial1/0 (up): ip 192.168.1.1 dlci 301(0x12D,0x48D0), static,CISCO, status defined, activeSerial1/0 (up): ip 192.168.1.2 dlci 302(0x12E,0x48E0), static,CISCO, status defined, activeR3(config-if)#使用的是静态映射二、使用路由器模拟帧中继交换机2.1实验拓扑2.2配置示例1.R1模拟帧中继交换机配置脚本配置如下R1>enR1#conf tR1(config)#frame-relay switching //把路由器设置为帧中继交换机R1(config)#int s 1/0R1(config-if)#no shR1(config-if)#no ip addR1(config-if)#encapsulation frame-relayR1(config-if)#clock rate 64000R1(config-if)#frame-relay lmi-type ansi //设置帧中继协议为ansi R1(config-if)#frame-relay intf-type dce //帧中继交换机作为DCE端R1(config-if)#serial restart-delay 0R1(config-if)#frame-relay route 203 interface s 1/1 302//设置帧中继内部交换R1(config-if)#frame-relay route 204 interface s 1/2 402R1(config-if)#int s 1/1R1(config-if)#no shR1(config-if)#no ip addR1(config-if)#encapsulation frame-relayR1(config-if)#frame-relay lmi-type ansiR1(config-if)#frame-relay intf-type dceR1(config-if)#serial restart-delay 0R1(config-if)#frame-relay route 302 interface serial 1/0 203R1(config-if)#frame-relay route 304 interface s 1/2 403R1(config-if)#int s 1/2R1(config-if)#no shR1(config-if)#no ip addR1(config-if)#encapsulation frame-relayR1(config-if)#serial restart-delay 0R1(config-if)#clock rate 64000R1(config-if)#frame-relay lmi-type ansiR1(config-if)#frame-relay intf-type dceR1(config-if)#frame-relay route 402 int s 1/0 204R1(config-if)#fra route 403 int s 1/1 3042.其他路由器配置脚本R2R2>enR2#conf tR2(config)#int s 1/0R2(config-if)#no shR2(config-if)#ip add 192.168.1.2 255.255.255.0R2(config-if)#encapsulation frame-relayR2(config-if)#serial restart-delay 0R3R3>R3>enR3#conf tEnter configuration commands, one per line. End with CNTL/Z. R3(config)#int s 1/0R3(config-if)#no shR3(config-if)#ip add 192.168.1.3 255.255.255.0R3(config-if)#encapsulation frame-relayR4R4>enR4#conf tR4(config)#int s 1/0R4(config-if)#no shR4(config-if)#ip add 192.168.1.4 255.255.255.0R4(config-if)#encapsulation frame-relay3.验证R4(config-if)#do show fram maSerial1/0 (up): ip 192.168.1.2 dlci 402(0x192,0x6420), dynamic,broadcast,, status defined, activeSerial1/0 (up): ip 192.168.1.3 dlci 403(0x193,0x6430), dynamic,broadcast,, status defined, activeR4(config-if)#使用的是动态的映射,inverse-arpR4(config-if)#do ping 192.168.1.2Type 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 = 64/95/132 ms R4(config-if)#do ping 192.168.1.3Type 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 = 56/107/144 ms R4(config-if)#全网互通备注:Inverse ARP用于帧中继网络中IP地址和虚电路号的映射关系的动态维护4.关闭Inverse ARP 使用静态map映射R2(config-if)#no frame-relay inverse-arpR2(config-if)#do cle fram in //清除动态学到哦映射R3(config-if)#no frame-relay inverse-arpR3(config-if)#do cle fram inR4(config-if)#no frame-relay inverse-arpR4(config-if)#do cle fram inR4(config-if)#do ping 192.168.1.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds: .....Success rate is 0 percent (0/5)R4(config-if)#do ping 192.168.1.3Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.1.3, timeout is 2 seconds: .....Success rate is 0 percent (0/5)R4(config-if)#配置静态映射R2(config-if)#frame-relay map ip 192.168.1.3 203R2(config-if)#frame-relay map ip 192.168.1.4 204R2(config-if)#R3(config-if)#frame-relay map ip 192.168.1.2 302R3(config-if)#frame-relay map ip 192.168.1.3 304R3(config-if)#frame-relay map ip 192.168.1.4 304R3(config-if)#no frame-relay map ip 192.168.1.3 304R3(config-if)#R4(config-if)#frame-relay mR4(config-if)#frame-relay maR4(config-if)#frame-relay map ip 192.168.1.2 402R4(config-if)#framR4(config-if)#frame-relay maR4(config-if)#frame-relay map ip 192.168.1.3 403R4(config-if)#R4(config-if)#do ping 192.168.1.2Type 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 = 60/87/140 ms R4(config-if)#do ping 192.168.1.3Type 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 = 48/83/144 msR4(config-if)#R4(config-if)#do show fram maSerial1/0 (up): ip 192.168.1.2 dlci 402(0x192,0x6420), static, CISCO, status defined, activeSerial1/0 (up): ip 192.168.1.3 dlci 403(0x193,0x6430), static, CISCO, status defined, activeR4(config-if)#。