实验拓扑图,如下:
RouterB S0/1 ---------Frameswitch s0/1
RouterB S0/1 : 192.1.1.3/24
具体配置情况,如下:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RouterA
RouterA(config)#int s0/0
RouterA(config-if)#ip address 192.1.1.1 255.255.255.0
RouterA(config-if)#encapsulation frame-relay
RouterA(config-if)#frame-relay lmi-type ansi
RouterA(config-if)#frame-relay interface-dlci 200
RouterA(config-fr-dlci)#no shut
RouterA(config-if)#end
RouterA#
RouterB:
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname RouterB
RouterB(config)#int s0/1
RouterB(config-if)#ip address 192.1.1.3 255.255.255.0
RouterB(config-if)#encapsulation frame-relay
RouterB(config-if)#frame-relay lmi-type ansi
RouterB(config-if)#frame-relay interface-dlci 201 //定义DLCI号。
RouterB(config-fr-dlci)#no shut
RouterB(config-if)#end
RouterB#
Frameswitch:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#frame-relay switching
Router(config)#hostname Frameswitch
Frameswitch(config)#int s0/0
Frameswitch(config-if)#encapsulation frame-relay //默认为CISCO。
Frameswitch(config-if)#frame-relay lmi-type ansi //LMI类型为ANSI 附件 D.
Frameswitch(config-if)#frame-relay intf-type dce //用来定义帧交换机的类型为DCE.
Frameswitch(config-if)#frame-relay route 200 int s0/1 201 //配置 两个接口间的一条PVC
Frameswitch(config-if)#clock rate 64000
Frameswitch(config-if)#no shut
Frameswitch(config-if)#int s0/1
Frameswitch(config-if)#encapsulation frame-relay
Frameswitch(config-if)#frame-relay lmi-type ansi
Frameswitch(config-if)#frame-relay intf-type dce
Frameswitch(config-if)#frame-relay route 201 int s0/0 200
Frameswitch(config-if)#clock rate 64000
Frameswitch(config-if)#no shut
Frameswitch(config-if)#end
注意:以上命令请参考,我前面发表的配置路由器具备帧中继交换机能力的例子。
Sending 5, 100-byte ICMP Echos to 192.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/40/64 ms
Protocol [ip]:
Target IP address: 192.1.1.1
Repeat count [5]: 50
Datagram size [100]: 600
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 50, 600-byte ICMP Echos to 192.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 16/61/156 ms
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
out bytes 30200 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:16:15, last time pvc status changed 00:12:32
注意:out DE为0,说明没有被丢弃的包。
RouterB>en
RouterB#config t
Enter configuration commands, one per line. End with CNTL/Z.
RouterB(config)#frame-relay de-list 3 protocol ip gt 512 //创建一个Frame-relay DE 列表,大于512字节的数据流被丢弃。
RouterB(config-if)#int s0/1
RouterB(config-if)#frame-relay de-group 3 201 // 把DLCI和列表号联系起来,应用在此接口上。
RouterB(config-if)#end
Clear "show interface" counters on all interfaces [confirm]
确认一下,是否已经清除!
RouterB#show frame pvc
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 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:59:46, last time pvc status changed 00:56:02
下面我还是用扩展PING 验证DE丢弃!!
Protocol [ip]:
Target IP address: 192.1.1.1
Repeat count [5]: 50
Datagram size [100]: 600
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 50, 600-byte ICMP Echos to 192.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 24/70/264 ms
RouterB#show frame pvc
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
out bytes 30200 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 50
out bcast pkts 0 out bcast bytes 0
pvc create time 01:05:08, last time pvc status changed 01:01:25
注意:
发出50个包,全都丢弃了,因为我们发送的包的包长(600字节)超过了流出路由器DE不置位包为512字节的限制。
再来看看,如果我们发送字节的大小为500,看情况怎么样。
Protocol [ip]:
Target IP address: 192.1.1.1
Repeat count [5]: 50
Datagram size [100]: 500
Timeout in seconds [2]:
Extended commands [n]:
Sweep range of sizes [n]:
Type escape sequence to abort.
Sending 50, 500-byte ICMP Echos to 192.1.1.1, timeout is 2 seconds:
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Success rate is 100 percent (50/50), round-trip min/avg/max = 12/42/84 ms
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
out bytes 55400 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 50
out bcast pkts 0 out bcast bytes 0
pvc create time 01:11:55, last time pvc status changed 01:08:12