实验31:帧中继基本配置、帧中继映射
1. 实验目的
通过本实验,读者可以掌握如下技能:
1) 帧中继的基本配置
2) 帧中继的动态映射
2. 实验拓扑
如图。
 
3. 实验步骤
 
 
r0(config)#no ip do loo
r0(config)#lin c 0
r0(config-line)#logg s
r0(config-line)#exec-t 00
r0(config-line)#exit
r0(config)#int s0/0
r0(config-if)#ip add 172.16.1.1 255.255.255.0
r0(config-if)#no sh
r0(config-if)#enc fra//encapsulation frame-relay [ ietf ]”命令用来配置接口封装成帧中继,如果不加
ietf 参数,帧类型为cisco;如果加ietf 参数,则帧类型为ietf
r0(config-if)#
*Mar  1 00:05:04.383: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar  1 00:05:05.387: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r0(config-if)#do ping 172.16.1.3
 
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/54/140 ms
r0(config-if)#do sh frame-relay map
Serial0/0 (up): ip 172.16.1.3 dlci 101(0x65,0x1850), dynamic,
              broadcast,, status defined, active
Serial0/0 (up): ip 172.16.1.2 dlci 102(0x66,0x1860), dynamic,
              broadcast,, status defined, active
从命令输出中可以得到的信息有:
172.16.1.3 映射到101
Dynamic:表明是动态映射
Broadcast:该PVC 允许广播包的通过
Active:该PVC 是激活的
该命令是很重要的一条命令,如果在映射表中不存在映射,路由器将无法通信。可以使用名
命令“clear frame-relay inarp”命令清除无效的帧中继映射表。
 
r0(config-if)#do sh fram-relay route
 
r0(config-if)#do show frame pvc
 
PVC Statistics for interface Serial0/0 (Frame Relay DTE)
 
              Active     Inactive      Deleted       Static
  Local          2            0            0            0
  Switched       0            0            0            0
  Unused         0            0            0            0
 
DLCI = 101, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
 
  input pkts 6             output pkts 6            in bytes 554      
  out bytes 554            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 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:05:49, last time pvc status changed 00:05:49
 
  从命令输出中可以得到的信息有:
􀁺 DLCI = 101:表明该PVC DLCI 101
􀁺 PVC STATUS = ACTIVE:表明PVC 的状态是激活的;若PVC STATUS = INACTIVE——表
明远端路由器没正确配置;若PVC STATUS = DELETED——表明输入了错误的DLCI
PVC 不存在。
       
DLCI = 102, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
          
  input pkts 1             output pkts 1            in bytes 34       
  out bytes 34             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 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:06:01, last time pvc status changed 00:06:01
r0(config-if)#do sh frame lmi
 
LMI Statistics for interface Serial0/0 (Frame Relay DTE) LMI TYPE = ANSI
  Invalid Unnumbered info 0             Invalid Prot Disc 0
  Invalid dummy Call Ref 0              Invalid Msg Type 0
  Invalid Status Message 0              Invalid Lock Shift 0
  Invalid Information ID 0              Invalid Report IE Len 0
  Invalid Report Request 0              Invalid Keep IE Len 0
  Num Status Enq. Sent 56               Num Status msgs Rcvd 57
  Num Update Status Rcvd 0              Num Status Timeouts 0
  Last Full Status Req 00:00:10         Last Full Status Rcvd 00:00:10
r0(config-if)#
 
 
 
r1(config-if)#ip add 172.16.1.2 255.255.255.0
r1(config-if)#no sh
r1(config-if)#
*Mar  1 00:01:46.831: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r1(config-if)#
*Mar  1 00:01:47.835: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r1(config-if)#enc
*Mar  1 00:02:17.331: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
r1(config-if)#encapsulation frame-relay
r1(config-if)#
*Mar  1 00:02:27.771: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r1(config-if)#
r1(config-if)#do sh frame map
Serial0/0 (up): ip 172.16.1.1 dlci 301(0x12D,0x48D0), dynamic,
              broadcast,, status defined, active
r1(config-if)#
 
 
 
r2(config)#int s0/0
r2(config-if)#ip add 172.16.1.3 255.255.255.0
r2(config-if)#no sh
r2(config-if)#
*Mar  1 00:00:58.275: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
r2(config-if)#
*Mar  1 00:00:59.279: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r2(config-if)#
*Mar  1 00:01:27.095: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to down
r2(config-if)#enc fra
r2(config-if)#
*Mar  1 00:02:35.867: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
r2(config-if)#do sh fram map
Serial0/0 (up): ip 172.16.1.1 dlci 201(0xC9,0x3090), dynamic,
              broadcast,, status defined, active
r2(config-if)#
手工配置帧中继映射
默认情况下,路由器支持逆向ARP。若逆向ARP 未打开,可以用下列命令设置:
R1(config-if)#frame-relay inverse-arp
我们也可以关闭IARP,使用静态映射,命令如下:
frame-relay map ip address dlci [ broadcast ]
这里的broadcast 参数是允许该帧中继链路通过多播或广播包,如果帧中继链路上要运行路
由协议,该参数非常重要。读者自己试试