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#
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