帧中继的基本配置(Basic FrameRealy)

实验来源:工大瑞普Cisco网络技术论坛
实验拓扑:

说明:我们这配置的ip与拓扑图上的有些区别,具体设置看下面的配置。

1.首先配置R4为 中继交换机:
Router>ena
Router#config t
Router(config)#hostname FrSwitch
FrSwitch(config)#frame-relay switching
FrSwitch(config)#int s1/0
FrSwitch(config-if)#encapsulation frame-relay
FrSwitch(config-if)#frame-relay lmi-type ansi
FrSwitch(config-if)#frame-relay intf-type dce
FrSwitch(config-if)#frame-relay route 100 interface s1/1 101
FrSwitch(config-if)#clock rate 64000
FrSwitch(config-if)#no shu
FrSwitch(config-if)#int s1/1
FrSwitch(config-if)#encapsulation frame-relay
FrSwitch(config-if)#frame-relay lmi-type ansi
FrSwitch(config-if)#frame-relay intf-type dce
FrSwitch(config-if)#frame-relay route 101 interface s1/0 100
FrSwitch(config-if)#clock rate 64000
FrSwitch(config-if)#no shu
2.配置R1 and R2:
Router>ena
Router#config t
Router(config)#hostname Router1
Router1(config)#int s1/2
Router1(config-if)#ip add 10.0.0.1 255.255.255.0
Router1(config-if)#enca frame-relay
Router1(config-if)#frame-relay lmi-type ansi
Router1(config-if)#no shu

Router>ena
Router#config t
Router(config)#hostname Router2
Router2(config)#interface s1/2
Router2(config-if)#encapsulation frame-relay
Router2(config-if)#ip add 10.0.0.2 255.255.255.0
Router2(config-if)#frame-relay lmi-type ansi
Router2(config-if)#no shu
3.验证配置:
Router1#show frame-relay map
Serial1/2 (up): ip 10.0.0.2 dlci 100(0x64,0x1840), dynamic,
              broadcast,, status defined, active

Router2#show frame-relay map
Serial1/2 (up): ip 10.0.0.1 dlci 101(0x65,0x1850), dynamic,
              broadcast,, status defined, active

Router1#show frame-relay pvc

PVC Statistics for interface Serial1/2 (Frame Relay DTE)

              Active     Inactive      Deleted       Static
  Local          1            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0

DLCI = 100, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/2

  input pkts 6             output pkts 7            in bytes 554      
  out bytes 588            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 2         out bcast bytes 68       
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:13:00, last time pvc status changed 00:12:20

Router2#show frame-relay pvc

PVC Statistics for interface Serial1/2 (Frame Relay DTE)

              Active     Inactive      Deleted       Static
  Local          1            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0

DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial1/2

  input pkts 6             output pkts 6            in bytes 554       
  out bytes 554            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 1         out bcast bytes 34        
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
  pvc create time 00:11:24, last time pvc status changed 00:11:14
在R1上ping R2:
Router#ping 10.0.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 120/140/168 ms
OK,成功!
如果发现ping不通的话,可以使用命令show fram map查看,看是否有R2的反向ARP映射,如果没有的话我们可以手工添加:
Router2#show frame-relay map
Serial1/2 (up): ip 10.0.0.1 dlci 101(0x65,0x1850), static,
              broadcast,
              CISCO, status defined, active
这样就可以相互通信了。
讨论:配置到这里,有一个问题,假如R2 ping自己的接口ip可以ping通吗?我们做一个试验:
Route2r#ping 10.0.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
我们发现无法ping通,为什么呢?因为我们刚才看到了frame-relay map里面并没有相关信息,需要我们手工添加:
Router2(config)#int s1/2
Router2(config-if)#frame-relay map ip 10.0.0.2 101
然后我们再看一下frame-relay map
Router2#show fram map
Serial1/2 (up): ip 10.0.0.1 dlci 101(0x65,0x1850), static,
              broadcast,
              CISCO, status defined, active
Serial1/2 (up): ip 10.0.0.2 dlci 101(0x65,0x1850), static,
              CISCO, status defined, active
然后再ping一下:
Router2# ping 10.0.0.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.0.0.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 268/435/612 ms
好了,可以ping通了。
OK,实验完。

你可能感兴趣的:(职场,休闲,帧中继,FrameRealy)