A-A+

把一台Cisco路由器配置为帧中继交换机的实验和知识要点

2015年11月24日 站长资讯 暂无评论

1、这次实验目的:

通过本实验可以掌握下面三个知识要点:

A.理解帧中继交换机工作原理;

B.理解PVC的概念;

C.用路由器模拟帧中继交换机的配置。

2、网络拓扑图:

3、实验步骤:

本实验把路由器R2配置成帧中继交换机

(一)开启帧中继交换机功能

R2(config)#frame-relay switching

(二)配置接口封装帧中继

R2(config)#interface s0/0

R2(config-if)#clock rate 128000

R2(config-if)#encapsulation frame-relay //配置接口封装帧中继

R2(config-if)#no shutdown

【提示】

配置接口封装为帧中继,接口上启用的默认帧中继封装为Cisco封装。如果要连接到另一台Cisco路由器,则使用该选项;如果连接到非Cisco路由器,要使用ietf参数。

  1. R2(config)#interface serial 0/1  
  2.   
  3. R2(config-if)#clock rate 128000  
  4. R2(config-if)#encapsulation frame-relay  
  5. R2(config-if)#no shutdown  
  6.   
  7. R2(config)#interface serial 0/2  
  8. R2(config-if)#clock rate 128000  
  9. R2(config-if)#encapsulation frame-relay  
  10. R2(config-if)#no shutdown  

(三)配置帧中继LMI类型和接口类型

R2(config)#interfaces0/0

R2(config-if)#frame-relaylmi-type cisco //配置LMI类型

R2(config-if)#frame-relayintf-type dce //配置接口为帧中继的DCE

【技术要点】

A、命令“frame-relaylmi-type { cisco | ansi | q933a }”用来配置LMI的类型,默认时是Cisco类型;

B、命令“frame-relayintf-type { dce |dte }”用来配置接口是帧中继的DCE还是DTE。要注意的是:帧中继接口DCE和物理接口端是DCE还是DTE无关,也就是说即使接口是DTE端,也可以把它配置成帧中继是DCE。

R2(config)#interfaceserial 0/1

R2(config-if)#frame-relaylmi-type cisco

R2(config-if)#frame-relayintf-type dce

R2(config)#interfaceserial 0/2

R2(config-if)#frame-relaylmi-type cisco

R2(config-if)#frame-relayintf-type dce

(四)配置路由器两个接口之间的PVC

  1. R2(config)#interfaceserial 0/0   
  2. R2(config-if)#frame-relayroute 103 interface s0/1 301  
  3. //定义接口S0/0和S0/1之间的PVC,建立帧中继交换表  
  4. R2(config-if)#frame-relayroute 104 interface s0/2 401  
  5. //定义接口S0/0和S0/2之间的PVC,建立帧中继交换表  
  6. R2(config)#interfaceserial 0/1  
  7. R2(config-if)#frame-relayroute 301 interface serial 0/0 103  
  8. R2(config-if)#frame-relayroute 304 interface serial 0/2 403  
  9. R2(config)#interfaceserial 0/2  
  10. R2(config-if)#frame-relayroute 401 interface serial 0/0 104  
  11. R2(config-if)#frame-relayroute 403 interface serial 0/1 304  
  12. 4、实验调试  
  13. A、show frame-relay route  
  14. R2#shframe-relay route  
  15. InputIntf Input Dlci Output Intf Output Dlci Status  
  16. Serial0/0 103 Serial0/1 301 inactive  
  17. Serial0/0 104 Serial0/2 401 inactive  
  18. Serial0/1 301 Serial0/0 103 inactive  
  19. Serial0/1 304 Serial0/2 403 inactive  
  20. Serial0/2 401 Serial0/0 104 inactive  
  21. Serial0/2 403 Serial0/1 304 inactive  
  22. R2#  

以上输出表明了路由器R2上配置了3条PVC,状态都是活动的,其中
“Serial0/0 103 Serial0/1 301 inactive”的含义是路由器如果从S0/0接口收到DLCI=103的帧,要从S0/1接口交换出去,并且DLCI被替换为301。

B、show frame-relay pvc

该命令用于显示路由器上配置的所有PVC的统计信息。

  1. R2#shframe-relay pvc interface s0/0  
  2.   
  3. PVC Statistics for interface Serial0/0 (Frame Relay DCE)  
  4. //该接口是帧中继的DCE  
  5. Active Inactive Deleted Static  
  6. Local 0 0 0 0  
  7. Switched 0 2 0 0  
  8. Unused 0 0 0 0  
  9. //输出表明该接口有2条处于活动状态的PVC  
  10. DLCI =103, DLCI USAGE = SWITCHED, PVC STATUS = INACTIVEINTERFACE = Serial0/0  
  11. //DLCI为103的PVC处于活动状态,本地接口是S0/0,DLCI用途是完成帧中继DLCI交换  
  12. input pkts 0 output pkts 0 in bytes 0  
  13. out bytes 0 dropped pkts 0 in pkts dropped 0  
  14. out pkts dropped 0 out bytes dropped 0  
  15. in FECN pkts 0 in BECN pkts 0 out FECN pkts 0  
  16. out BECN pkts 0 in DE pkts 0 out DE pkts 0  
  17. out bcast pkts 0 out bcast bytes 0  
  18. 30 second input rate 0 bits/sec, 0packets/sec  
  19. 30 second output rate 0 bits/sec, 0packets/sec  
  20. switched pkts 0  
  21. Detailed packet drop counters:  
  22. no out intf 0 out intf down 0 no out PVC 0  
  23. in PVC down 0 out PVC down 0 pkt too big 0  
  24. shaping Q full 0 pkt above DE 0 policing drop 0  
  25. pvc create time 00:28:35, last time pvcstatus changed 00:28:35  
  26.   
  27.   
  28. //以上输出是DLCI为103的PVC的统计信息  
  29. DLCI =104, DLCI USAGE = SWITCHED, PVC STATUS = INACTIVEINTERFACE = Serial0/0  
  30. input pkts 0 output pkts 0 in bytes 0  
  31. out bytes 0 dropped pkts 0 in pkts dropped 0  
  32. out pkts dropped 0 out bytes dropped 0  
  33. in FECN pkts 0 in BECN pkts 0 out FECN pkts 0  
  34. out BECN pkts 0 in DE pkts 0 out DE pkts 0  
  35. out bcast pkts 0 out bcast bytes 0  
  36. 30 second input rate 0 bits/sec, 0packets/sec  
  37. 30 second output rate 0 bits/sec, 0packets/sec  
  38. switched pkts 0  
  39. Detailed packet drop counters:  
  40. http://www.xiaoxiongboke.com   
  41. no out intf 0 out intf down 0 no out PVC 0  
  42. in PVC down 0 out PVC down 0 pkt too big 0  
  43. shaping Q full 0 pkt above DE 0 policing drop 0  
  44. pvc create time 00:26:45, last time pvcstatus changed 00:26:45  
  45. //以上输出是DLCI为104的PVC的统计信息  
  46. R2#  

C、show frame-relay lmi

该命令用来查看LMI的统计信息。

  1. R2#shframe-relay lmi  
  2.   
  3. LMIStatistics for interface Serial0/0 (Frame Relay DCE) LMI TYPE = CISCO  
  4. //接口S0/0是帧中继的DCE,LMI类型为Cisco  
  5. Invalid Unnumbered info 0 Invalid Prot Disc 0  
  6. Invalid dummy Call Ref 0 Invalid Msg Type 0  
  7. Invalid Status Message 0 Invalid Lock Shift 0  
  8. Invalid Information ID 0 Invalid Report IE Len 0  
  9. Invalid Report Request 0 Invalid Keep IE Len 0  
  10. Num Status Enq. Rcvd 0 Num Status msgs Sent 0  
  11. //帧中继交换机收到的LMI状态查询消息的数量以及从帧中继交换机向路由器发送的LMI状态信息的数量  
  12. Num Update Status Sent 0 Num St Enq. Timeouts 232  
  13. //以上7行显示了接口S0/0的LMI的统计信息  
  14. LMIStatistics for interface Serial0/1 (Frame Relay DCE) LMI TYPE = CISCO  
  15. Invalid Unnumbered info 0 Invalid Prot Disc 0  
  16. Invalid dummy Call Ref 0 Invalid Msg Type 0  
  17. Invalid Status Message 0 Invalid Lock Shift 0  
  18. Invalid Information ID 0 Invalid Report IE Len 0  
  19. Invalid Report Request 0 Invalid Keep IE Len 0  
  20. Num Status Enq. Rcvd 0 Num Status msgs Sent 0  
  21.   
  22.   
  23. Num Update Status Sent 0 Num St Enq. Timeouts 185  
  24. //以上7行显示了接口S0/1的LMI的统计信息  
  25. LMIStatistics for interface Serial0/2 (Frame Relay DCE) LMI TYPE = CISCO  
  26. Invalid Unnumbered info 0 Invalid Prot Disc 0  
  27. Invalid dummy Call Ref 0 Invalid Msg Type 0  
  28. Invalid Status Message 0 Invalid Lock Shift 0  
  29. Invalid Information ID 0 Invalid Report IE Len 0  
  30. Invalid Report Request 0 Invalid Keep IE Len 0  
  31. Num Status Enq. Rcvd 0 Num Status msgs Sent 0  
  32. Num Update Status Sent 0 Num St Enq. Timeouts 181  
  33. //以上7行显示了接口S0/2的LMI的统计信息  
  34. R2#  
标签:

给我留言