实验是把一个
Cisco
路由器配置为帧中继交换机,我所使用的
Router
为3
640
!
注意:记住虽然一个路由器可以用做帧中继交换机,但是这种情况只在实验及例子中使用。
实验拓扑图,如下:
实验连线:
R1 S0/0 <----> Framechs0/0
R3 S0/0 <----> FramechS0/1
实验
IP
地址表:
R1 S0/0 192.1.1.1/24
R3 S0/1 192.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-relay switching
用时才使用的
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, PVC STATUS = 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, last time 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 frame lmi
LMI Statistics for interface 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, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation FRAME-RELAY, crc 16, loopback not set
Keepalive set (10 sec)
LMI enq sent 0, LMI stat recvd 0, 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 Annex D frame relay DCE
FR SVC disabled, LAPF state down
Broadcast queue 0/64, broadcasts sent/dropped 0/0, interface broadcasts 0
Last input 00:00:08, output 00:00:08, output hang never
Last clearing of "show interface" 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, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/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, 0 output 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,, status defined, active
情况表明这里使用
DLCI to IP
的方法,这样的方法我们称为动态方法,这是通过反向地址解析协议形成的。后面我再写相关文章时再介绍一下。
使用
show int s0/0
R1#show int s0/0
Serial0/0 is up, line protocol is up /
/
表明接口正在接收从帧中继交换机来载波监听帧
Hardware is M4T
Internet address is 192.1.1.1/24
MTU 1500 bytes, BW 2048 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/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 stat sent 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
是可以互相通信的。
文章不足之处,请大家多多指教。
本文出自 “我是一只小小鸟” 博客,转载请与作者联系!