142536a 发表于 2018-7-16 08:11:59

把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>  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
页: [1]
查看完整版本: 把Cisco 路由器配置为帧中继交换机