实验是把一个Cisco路由器配置为帧中继交换机,我所使用的Router为3640!
注意:记住虽然一个路由器可以用做帧中继交换机,但是这种情况只在实验及例子中使用。
实验拓扑图,如下:
实验连线:
R1 S0/0 <---->Framechs0/0
R3 S0/1 <----> FramechS0/1
实验IP地址表:
R1 S0/0192.1.1.1/24
R3 S0/1192.1.1.3/24
实验的基本详细配置如下:
R1:
router>en
router#config t
Enter configuration commands, .e per line. End with CNTL/Z.
router(config)#hostname R1
R1(config)#int s0/0
R1(config-if)#ip address 192.1.1.1 255.255.255.0 //为接口配置IP地址和子网掩码
R1(config-if)#encapsulation frame-relay //默认为Cisco,有两种封装的方式,分别为RFC 1490和Cisco专有封装。
R1(config-if)#frame-relay lmi-type ansi //设置LMI(本地管理接口)类型为ANSI 附件D
R1(config-if)#frame-relay interface-dlci 100 //设置本地DICI号为100,这个号码一般是提供商分给我们的,只具有本地意义。
R1(config-fr-dlci)#exit
R1(config-if)#no shut //别忘记开启接口!
R1(config-if)#exit
R1(config)#router rip //启动RIP协议
R1(config-router)#network 192.1.1.0
R1(config-router)#end
R1#
R3:
router>en
router#config t
Enter configuration commands, .e per line. End with CNTL/Z.
router(config)#hostname R3
R3(config)#int s0/1
R3(config-if)#ip address 192.1.1.3 255.255.255.0
R3(config-if)#encapsulation frame-relay
R3(config-if)#frame-relay lmi-type ansi
R3(config-if)#frame-relay interface-dlci 101
R3(config-fr-dlci)#no shut
R3(config-if)#end
R3#config t
Enter configuration commands, .e per line. End with CNTL/Z.
R3(config)#router rip
R3(config-router)#network 192.1.1.0
R3(config-router)#end
R3#
注意:
LMI(本地管理接口)---路由器和帧中继交换机之间的信令协议。有三种 分别为ANSI附件D,CCITT附件A,Cisco.
Framech:
Router>en
Router#config t
Enter configuration commands, .e per line. End with CNTL/Z.
Router(config)#hostname Framech
Framech(config)#frame-relay switching //在全局模式下,把router配置为具有帧中继交换机的能力!
Framech(config)#int s0/0
Framech(config-if)#clock rate 64000 //给R1的S0/0口提供时钟
Framech(config-if)#encapsulation frame-relay
Framech(config-if)#frame-relay lmi-type ansi
Framech(config-if)#frame-relay intf-type dce //配置帧中继交换机的类型,当然使用这个命令的时候是把Router当Frame-relayswitching用时才使用的
Framech(config-if)#frame-relay route 100 int s0/1 101 //两个接口间的一条PVC.
Framech(config-if)#no shut
Framech(config-if)#int s0/1
Framech(config-if)#clock rate 64000
Framech(config-if)#enca
Framech(config-if)#encapsulation frame-relay
Framech(config-if)#frame-relay lmi-type ansi
Framech(config-if)#frame-relay intf-type dce
Framech(config-if)#frame-relay route 101 int s0/0 100
Framech(config-if)#no shut
Framech(config-if)#end
Framech#
注意:
帧中继PVC是通过frame-relay route命令来定义的。举个例子,frame-relay route 100 int s0/1 101 这个命令告诉路由器:任何一个以DLCI 100 进入接口S0/0的帧中继业务,应该以DLCI 101 发出到接口S0/1.
到这里实验已经配置完全,下面我介绍一些Frame-relay 常用到的命令。
检测配置:
1.使用show frame pvc
Framech>en
Framech#show frame pvc
PVC Statistics for interface Serial0/0(Frame Relay DCE)
Active Inactive Deleted Static
Local 0 0 0 0
Switched 1 0 0 0
Unused 0 0 0 0
DLCI = 100, DLCI USAGE = SWITCHED, PVCSTATUS = ACTIVE, INTERFACE = Serial0/0
input pkts 52 output pkts 51 in bytes 3348
out bytes 3314 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 0 out bcast bytes 0
switched pkts 52
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:21:39, lasttime pvc status changed 00:19:34
注意:
PVC统计表表明了S0/0接口在这里的作用是帧中继DCE接口。在交换过程中也体现出了DLCI的用途,Pkt交换数目也显示出一共有多少帧通过接口,并被转发.。FECN\,BECN.ED,的数目,这些性能对于网络是否阻塞是非常关键的。最后一句表明了PVC维持了多少时间和它最后一次状态改变是什么时候
2. show frame lmi //路由器和交换机间的LMI相联的详细统计表。
Framech>en
Framech#show framelmi
LMI Statistics forinterface Serial0/0 (Frame Relay DCE)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. Rcvd 221 Num Status msgs Sent 221
Num Update Status Sent 0 Num St Enq. Timeouts 0
3. show frame route //显示所有配置的DLCI。
Framech#show frame route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0/0 100 Serial0/1 101 active
Serial0/1 101 Serial0/0 100 active
4.show int s0/0 //显示接口的状态信息。
Framech#show int s0/0
Serial0/0 is up, line protocol is up
Hardware is M4T
MTU 1500 bytes, BW 2048 Kbit, DLY20000 usec,
reliability 255/255, txload1/255, rxload 1/255
Encapsulation FRAME-RELAY, crc 16, loopback not set
Keepalive set (10 sec)
LMI enq sent 0, LMI stat recvd0, LMI upd recvd 0
LMI enq recvd 255, LMI stat sent 255, LMI upd sent 0, DCE LMI up
LMI DLCI 0 LMI type is ANSI AnnexD frame relay DCE
FR SVC disabled, LAPF state down
Broadcast queue 0/64, broadcastssent/dropped 0/0, interface broadcasts 0
Last input 00:00:08, output00:00:08, output hang never
Last clearing of "showinterface" counters 00:43:47
Input queue: 0/75/0/0(size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0(size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0(allocated/max allocated)
Available Bandwidth 1536 kilobits/sec
5 minute input rate 0 bits/sec, 0packets/sec
5 minute output rate 0 bits/sec, 0packets/sec
353 packets input, 9494 bytes,0 no buffer
Received 0 broadcasts, 0 runts,0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame,0 overrun, 0 ignored, 0 abort
352 packets output, 9680 bytes,0 underruns
0 output errors, 0 collisions,1 interface resets
0 output buffer failures, 0output buffers swapped out
1 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up
在R1上:
使用 show frame map
R1>en
R1#show frame map
Serial0/0 (up): ip 192.1.1.3 dlci 100(0x64,0x1840), dynamic,
broadcast,, statusdefined, active
情况表明这里使用DLCI to IP 的方法,这样的方法我们称为动态方法,这是通过反向地址解析协议形成的。后面我再写相关文章时再介绍一下。
使用 show int s0/0
R1#show int s0/0
Serial0/0 is up, line protocol isup //表明接口正在接收从帧中继交换机来载波监听帧
Hardware is M4T
Internet address is 192.1.1.1/24
MTU 1500 bytes, BW 2048 Kbit, DLY20000 usec,
reliability 255/255, txload1/255, rxload 1/255
Encapsulation FRAME-RELAY, crc 16, loopback not set
Keepalive set (10 sec)
LMI enq sent 620, LMI stat recvd 501, LMI upd recvd 0, DTE LMI up
LMI enq recvd 48, LMI statsent 0, LMI upd sent 0
LMI DLCI 0 LMI type is ANSI Annex D frame relay DTE
FR SVC disabled, LAPF state down
……..
情况表明路由器是帧中继DTE设备
下面我们来看一下,R1与R3能否通信。
R1#ping 192.1.1.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.1.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 24/34/60 ms
R3#ping 192.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/39/92 ms
情况表明R1,R3是可以互相通信的。