把Cisco 路由器配置爲幀中繼交換機

 
我們這裏主要看R2 的配置。
(1) 開啓幀中繼交換功能
R2(config)#frame-relay switching //注:把該路由器當成幀中繼交換機
(2) 配置接口封裝
R2(config)#int s0/0/0
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000 //注:該接口爲DCE,要配置時鐘
R2(config-if)#encapsulation frame-relay
//“encapsulation frame-relay [ ietf ]”命令用來配置接口封裝成幀中繼,如果不加ietf 參數,幀類型爲cisco;如果加ietf 參數,則幀類型爲ietf。
R2(config)#int s0/0/1
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
R2(config)#int s0/1/0
R2(config-if)#no shutdown
R2(config-if)#clock rate 128000
R2(config-if)#encapsulation frame-relay
(3) 配置LMI 類型
R2(config)#int s0/0/0
R2(config-if)#frame-relay lmi-type cisco
//命令“frame-relay lmi-type { ansi | cisco | q933a }用來配置LMI 的類型,默認時是cisco
R2(config-if)#frame-relay intf-type dce
//命令“frame-relay intf-type { dce | dte }”用來配置接口是幀中繼的DCE 還是DTE,要注意的是:這裏的幀中繼接口DCE 和s0/0/0 接口是DCE 還是DTE 無關,也就是說即使s0/0/0 是DTE,也可以把它配置成幀中繼的DCE。
R2(config)#int s0/0/1
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
R2(config)#int s0/1/0
R2(config-if)#frame-relay lmi-type cisco
R2(config-if)#frame-relay intf-type dce
(4) 配置幀中繼交換表
R2(config)#int s0/0/0
R2(config-if)#frame-relay route 103 interface s0/0/1 301
R2(config-if)#frame-relay route 104 interface s0/1/0 401
//命令“frame-relay route 103 interface s0/0/1 301”是配置幀中繼交換表的,告訴路由器如果從該接口收到DLCI=103 的幀,要從s0/0/1 交換出去,並且DLCI 改爲301。
R2(config)#int Serial0/0/1
R2(config-if)#frame-relay route 301 interface Serial0/0/0 103
R2(config)#int Serial0/1/0
R2(config-if)#frame-relay route 401 interface Serial0/0/0 104
測試
可以使用“show frame-relay route”、“show frame pvc”、“show frame lmi”等命令檢查幀中繼交換機是否正常。
(1) “show frame-relay route”
R2#show frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0/0/0 103 Serial0/0/1 301 inactive
Serial0/0/0 104 Serial0/1/0 401 inactive
Serial0/0/1 301 Serial0/0/0 103 inactive
Serial0/1/0 401 Serial0/0/0 104 inactive
(2) “show frame pvc”
R2#show frame-relay pvc
PVC Statistics for interface Serial0/0/0 (Frame Relay DCE)
Active Inactive Deleted Static
Local 0 0 0 0
Switched 0 2 0 0
Unused 0 0 0 0
DLCI = 103, DLCI USAGE = SWITCHED, PVC STATUS = INACTIVE, INTERFACE =Serial0/0/0
//由於PVC 還未被使用,所以狀態爲inactive
input pkts 0 output pkts 0 in bytes 0
out bytes 0 dropped pkts 0 in pkts dropped 0
out pkts dropped 0 out bytes dropped 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
30 second input rate 0 bits/sec, 0 packets/sec
30 second output rate 0 bits/sec, 0 packets/sec
switched pkts 0
Detailed packet drop counters:
no out intf 0 out intf down 0 no out PVC 0
in PVC down 0 out PVC down 0 pkt too big 0
shaping Q full 0 pkt above DE 0 policing drop 0
pvc create time 00:06:05, last time pvc status changed 00:06:05
·········································································
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章