1、将一台路由器模拟成帧中继交换机
FR(config)#frame-relay ?
de-list Build a classification list to be used in setting the DE bit
switching enable frame relay pvc switching
输入:
FR(config)#frame-relay switching
2、在帧中继交换机上配置
1)在接口上封装帧中继协议
FR(config-if)#encapsulation frame-relay ?
ietf Use RFC1490 encapsulation
<cr>
帧中继有两种封装协议:cisco和ietf,cisco产品默认为cisco。
cisco产品和非cisco产品连接要使用ietf
2)查看接口是否为DCE,若是,则配置时钟。
FR#show controllers serial 0
HD unit 0, idb = 0x94C7C, driver structure at 0x99A00
buffer size 1524 HD unit 0, V.35 DCE cable
显示为DCE,使用要配时钟:
FR(config-if)#clock rate 64000
有时候物理层没有UP起来,都可以使用该命令查看,如果是没有接线,则提示:
FR#show controllers serial 0
HD unit 0, idb = 0x94C7C, driver structure at 0x99A00
buffer size 1524 HD unit 0, no cable
3)配置帧中继交换机的LMI类型
FR(config-if)#frame-relay lmi-type ?
cisco
ansi
q933a
总共有三种,常用cisco和ansi
可以通过show查看
FR#show frame-relay lmi
LMI Statistics for interface Serial0 (Frame Relay DTE) LMI TYPE = CISCO
在11.2以上版本的IOS中不需要设置,路由器可以自动感知。
4)强制将该端口设置为DCE.因为帧中继交换机一般为ISP端设备,为用户端设备提供时钟。
FR(config-if)#frame-relay intf-type ?
dce Configure a FR DCE
dte Configure a FR DTE
nni Configure a FR NNI
FR(config-if)#frame-relay intf-type dce
5)用DLCI标示网络中路由器的身份,配置DLCI的映射。
R1(config-if)#frame-relay ?
route frame relay route for pvc switching
FR(config-if)#frame-relay route ?
<16-1007> input dlci to be switched
DLCI值用10位表示,共有1024个值,但是只使用16-1007,其他为保留值。
FR(config-if)#frame-relay route ?
<16-1007> input dlci to be switched
FR(config-if)#frame-relay route 101 interface serial 1 ?
<16-1007> output dlci to use when switching
FR(config-if)#frame-relay route 101 interface serial 1 202
6)重复1-5步骤,对serial 1 进行配置
7)验证配置
FR#show frame-relay pvc
PVC Statistics for interface Serial0 (Frame Relay DCE)
DLCI = 101, DLCI USAGE = SWITCHED, PVC STATUS = INACTIVE, INTERFACE = Serial0
input pkts 0 output pkts 0 in bytes 0
out bytes 0 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
pvc create time 00:02:08, last time pvc status changed 00:02:08
Num Pkts Switched 0
PVC Statistics for interface Serial1 (Frame Relay DCE)
DLCI = 202, DLCI USAGE = SWITCHED, PVC STATUS = INACTIVE, INTERFACE = Serial1
input pkts 0 output pkts 0 in bytes 0
out bytes 0 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
pvc create time 00:01:41, last time pvc status changed 00:01:41
Num Pkts Switched 0
FR#show frame-relay route
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0 101 Serial1 202 inactive
Serial1 202 Serial0 101 inactive
3、在客户端进行配置
客户端配置相对简单
1)在该接口上封装帧中继协议
R1(config-if)#encapsulation frame-relay
2)配置LMI的类型
R1(config-if)#frame-relay lmi-type cisco
3)为该接口配置IP地址
R1(config-if)#ip address 192.168.1.101 255.255.255.0
4)为该接口配置DLCI值
R1(config-if)#frame-relay interface-dlci 101
默认情况下,IARP是开启的,只要在帧中继交换机为客户机指定了DLCI(步骤2中的第5)小步),则客户机会通过IARP自动获取DLCI值。使用这条命名不是必须的。
6)登陆另外一台作为客户端的路由器R2,重复步骤1-4.
7)查看配置
R2#show frame-relay pvc
PVC Statistics for interface Serial0 (Frame Relay DTE)
DLCI = 202, DLCI USAGE = UNUSED, PVC STATUS = ACTIVE, INTERFACE = Serial0
input pkts 0 output pkts 1 in bytes 0
out bytes 30 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 30 Num Pkts Switched 0
pvc create time 00:00:06, last time pvc status changed 00:00:06
R2#show frame-relay map
Serial0 (up): ip 192.168.1.101 dlci 202(0xCA,0x30A0), dynamic,
broadcast,, status defined, active
显示dlci值为动态分配。
4、测试实验连通性。
在R2上ping R1
R2#ping 192.168.1.101
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.101, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 60/60/60 ms