配置部分PVC网状网络完全连接及帧中继映射(详细配置)
实验:配置部分PVC网状网络完全连接及帧中继映射,我所使用的Router是3640!
实验拓扑图,如下:
实验连线:
R1 S0/0 <----> R4 S0/0
R2 S0/1 <----> R4 S0/1
Rr3 S0/2 <----> R4 S0/2
实验IP地址表:
R1 S0/0 192.1.1.1/24
R2 S0/1 192.1.1.3/24
R3 S0/2 192.1.1.4/24
具体情况如下:
R1:
Router>en
Router#config t
Enter configuration commands, one 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模式
R1(config-if)#frame-relay lmi-type ansi //LMI信令类型为ANSI D附件
R1(config-if)#no shut //开启接口
R1(config-if)#end
R1#
Router#config t
Enter configuration commands, one 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模式
R1(config-if)#frame-relay lmi-type ansi //LMI信令类型为ANSI D附件
R1(config-if)#no shut //开启接口
R1(config-if)#end
R1#
R2:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#int s0/1
R2(config-if)#ip address 192.1.1.3 255.255.255.0
R2(config-if)#encapsulation frame-relay
R2(config-if)#frame-relay lmi-type ansi
R2(config-if)#no shut
R2(config-if)#end
R2#
R3:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#int s0/2
R3(config-if)#ip address 192.1.1.4 255.255.255.0
R3(config-if)#encapsulation frame-relay
R3(config-if)#frame-relay lmi-type ansi
R3(config-if)#no shut
R3(config-if)#end
R3#
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#int s0/2
R3(config-if)#ip address 192.1.1.4 255.255.255.0
R3(config-if)#encapsulation frame-relay
R3(config-if)#frame-relay lmi-type ansi
R3(config-if)#no shut
R3(config-if)#end
R3#
FrameSwitch:
Router>en
Router#config t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname FrameSwitch
FrameSwitch(config)#frame-relay switching //配置Router具备帧中继交换机功能
FrameSwitch(config)#int s0/0
FrameSwitch(config-if)#clock rate 64000 //提供64000bps时钟
FrameSwitch(config-if)#encapsulation frame-relay
FrameSwitch(config-if)#frame-relay lmi-type ansi
FrameSwitch(config-if)#frame-relay intf-type dce //设置接口类型为DCE
FrameSwitch(config-if)#frame-relay route 200 int s0/1 200 //定义一条PVC,在S0/0和S0/1之间。
FrameSwitch(config-if)#frame-relay route 201 int s0/2 201
FrameSwitch(config-if)#no shut
FrameSwitch(config-if)#exit
FrameSwitch(config)#int s0/1
FrameSwitch(config-if)#clock rate 64000
FrameSwitch(config-if)#encapsulation frame-relay
FrameSwitch(config-if)#frame-relay lmi-type ansi
FrameSwitch(config-if)#frame-relay intf-type dce
FrameSwitch(config-if)#frame-relay route 200 int s0/0 200
FrameSwitch(config-if)#no shut
FrameSwitch(config-if)#exit
FrameSwitch(config)#int s0/2
FrameSwitch(config-if)#clock rate 64000
FrameSwitch(config-if)#encapsulation frame-relay
FrameSwitch(config-if)#frame-relay lmi-type ansi
FrameSwitch(config-if)#frame-relay intf-type dce
FrameSwitch(config-if)#frame-relay route 201 int s0/0 201
FrameSwitch(config-if)#no shut
FrameSwitch(config-if)#end
FrameSwitch#
以上为基本配置,下面我们先来验证上面的配置产生的结果:
FrameSwitch#show frame pvc
PVC Statistics for interface Serial0/0 (Frame Relay DCE)
Active Inactive Deleted Static
Local 0 0 0 0
Switched 2 0 0 0
Unused 0 0 0 0
Local 0 0 0 0
Switched 2 0 0 0
Unused 0 0 0 0
DLCI = 200, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
input pkts 1 output pkts 1 in bytes 34
out bytes 34 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 1 //显示Pkt交换的数目
out bytes 34 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 1 //显示Pkt交换的数目
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:05:29, last time pvc status changed 00:03:40
DLCI = 201, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
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:05:29, last time pvc status changed 00:03:40
DLCI = 201, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
input pkts 1 output pkts 1 in bytes 34
out bytes 34 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 1
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:05:06, last time pvc status changed 00:01:41
PVC Statistics for interface Serial0/1 (Frame Relay DCE)
out bytes 34 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 1
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:05:06, last time pvc status changed 00:01:41
PVC Statistics for interface Serial0/1 (Frame Relay DCE)
Active Inactive Deleted Static
Local 0 0 0 0
Switched 1 0 0 0
Unused 0 0 0 0
Local 0 0 0 0
Switched 1 0 0 0
Unused 0 0 0 0
DLCI = 200, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE = Serial0/1
input pkts 1 output pkts 1 in bytes 34
out bytes 34 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 1
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:03:53, last time pvc status changed 00:03:37
PVC Statistics for interface Serial0/2 (Frame Relay DCE)
out bytes 34 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 1
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:03:53, last time pvc status changed 00:03:37
PVC Statistics for interface Serial0/2 (Frame Relay DCE)
Active Inactive Deleted Static
Local 0 0 0 0
Switched 1 0 0 0
Unused 0 0 0 0
Local 0 0 0 0
Switched 1 0 0 0
Unused 0 0 0 0
DLCI = 201, DLCI USAGE = SWITCHED, PVC STATUS = ACTIVE, INTERFACE = Serial0/2
input pkts 1 output pkts 1 in bytes 34
out bytes 34 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 1
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:01:51, last time pvc status changed 00:01:37
out bytes 34 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 1
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:01:51, last time pvc status changed 00:01:37
注意:
show frame pvc显示所有通过该帧交换路由器的DLCI。数据表明有2条PVC。接口为帧中继的DCE的接口,PVC的状态为活动状态。
FrameSwitch#show frame route //显示所配置的PVC中处于活动状态的的pvc.
Input Intf Input Dlci Output Intf Output Dlci Status
Serial0/0 200 Serial0/1 200 active
Serial0/0 201 Serial0/2 201 active
Serial0/1 200 Serial0/0 200 active
Serial0/2 201 Serial0/0 201 active
Serial0/0 200 Serial0/1 200 active
Serial0/0 201 Serial0/2 201 active
Serial0/1 200 Serial0/0 200 active
Serial0/2 201 Serial0/0 201 active
注意:
在这里配置了4个DLCI,R1用做一个网络集线器,R2,R3做为Frame-relay的DTE存在,R2,R3都有一条PVC接在R1上。
FrameSwitch#show int s0/0 //显示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 121, LMI stat sent 121, 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:01, output 00:00:01, output hang never
Last clearing of "show interface" counters 00:21:14
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
123 packets input, 1762 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
123 packets output, 1992 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
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 121, LMI stat sent 121, 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:01, output 00:00:01, output hang never
Last clearing of "show interface" counters 00:21:14
Queueing strategy: fifo
Output queue 0/40, 0 drops; input queue 0/75, 0 drops
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
123 packets input, 1762 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
123 packets output, 1992 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
注意: 输出的一些重要参数包含:接口封装形式(帧中继),LMI状态,该端口用做帧中继DCE,LMI信令类型(ANSI 附件),以及LMI交换路由器。
下面我们看一下R3上的情况:
R3#show frame map
Serial0/2 (up): ip 192.1.1.1 dlci 201(0xC9,0x3090), dynamic, //动态解析
broadcast,, status defined, active
Serial0/2 (up): ip 192.1.1.1 dlci 201(0xC9,0x3090), dynamic, //动态解析
broadcast,, status defined, active
注意:
R3已用RARP解析到R1的IP地址(192.1.1.1),但是R3还没有解析到R2的IP地址,这是因为R2只有连接到R1的PVC,而没有连接到R3的PVC.
特注意:
通常,一个配置成帧中继的路由器会对集线路由器进行反向地址解析,但不会对另外的配置成帧中继的路由器进行反向地址解析。
特注意:
通常,一个配置成帧中继的路由器会对集线路由器进行反向地址解析,但不会对另外的配置成帧中继的路由器进行反向地址解析。
我们来测试一下连通性:
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 = 48/81/128 ms
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 = 48/81/128 ms
情况表明链路是**的。
R3#show frame pvc
PVC Statistics for interface Serial0/2 (Frame Relay DTE)
Active Inactive Deleted Static
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
Local 1 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 201, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/2
input pkts 16 output pkts 16 in bytes 1594
out bytes 1594 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 34
pvc create time 00:35:27, last time pvc status changed 00:34:27
out bytes 1594 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 34
pvc create time 00:35:27, last time pvc status changed 00:34:27
情况表明R3的接口S0/2上DLCI 201是**的。
R3#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 0 percent (0/5)
Sending 5, 100-byte ICMP Echos to 192.1.1.3, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
情况表明R2,R3链路没连通。
R2的情况验证(请参考R3的验证)
情况也表明,R2,R3之间没有连通。
R1的情况验证:
R1#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
Local 2 0 0 0
Switched 0 0 0 0
Unused 0 0 0 0
DLCI = 200, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
input pkts 11 output pkts 10 in bytes 1074
out bytes 1040 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:44:46, last time pvc status changed 00:43:26
DLCI = 201, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
out bytes 1040 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:44:46, last time pvc status changed 00:43:26
DLCI = 201, DLCI USAGE = LOCAL, PVC STATUS = ACTIVE, INTERFACE = Serial0/0
input pkts 16 output pkts 15 in bytes 1594
out bytes 1560 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
out bytes 1560 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
情况表明R1有两条PVC,分别为 R1-----R2,R1----R3.
R1#show frame map
Serial0/0 (up): ip 192.1.1.3 dlci 200(0xC8,0x3080), dynamic, //动态解析给IP 192.1.1.3
broadcast,, status defined, active
Serial0/0 (up): ip 192.1.1.4 dlci 201(0xC9,0x3090), dynamic, //动态解析给IP 192.1.1.4
broadcast,, status defined, active
pvc create time 00:44:47, last time pvc status changed 00:41:27
broadcast,, status defined, active
Serial0/0 (up): ip 192.1.1.4 dlci 201(0xC9,0x3090), dynamic, //动态解析给IP 192.1.1.4
broadcast,, status defined, active
pvc create time 00:44:47, last time pvc status changed 00:41:27
情况表明,R1已将它的两条DLCI解析给远端IP地址。
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 = 40/68/128 ms
R1#ping 192.1.1.4
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 = 40/68/128 ms
R1#ping 192.1.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/45/84 ms
Sending 5, 100-byte ICMP Echos to 192.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/45/84 ms
情况表明R1分别与R2,R3的连通正常。
好了,如果我们需要R2与R3之间能进行通行,该怎么办呢?
解决的方法是在R2路由上用一条帧中继映射语句告诉R2如何到达R3,同时在R3路由上用一条帧中继映射语句告诉R3如何到达R2,那么它们之间就可以连通了。
具体情况,如下:
R2:
R2(config)#int s0/1
R2(config-if)#frame-relay map ip 192.1.1.4 200 //映射语句,使 IP地址与DLCI关联起来
R2(config-if)#end
R2#
R2(config-if)#frame-relay map ip 192.1.1.4 200 //映射语句,使 IP地址与DLCI关联起来
R2(config-if)#end
R2#
R3:
R3(config)#int s0/2
R3(config-if)#frame-relay map ip 192.1.1.3 201
R3(config-if)#end
R3#
R3(config-if)#frame-relay map ip 192.1.1.3 201
R3(config-if)#end
R3#
我们可以使用show frame pvc 来验证一下:
R3#show frame map
Serial0/2 (up): ip 192.1.1.1 dlci 201(0xC9,0x3090), dynamic,
broadcast,, status defined, active
Serial0/2 (up): ip 192.1.1.3 dlci 201(0xC9,0x3090), static,
CISCO, status defined, active
Serial0/2 (up): ip 192.1.1.1 dlci 201(0xC9,0x3090), dynamic,
broadcast,, status defined, active
Serial0/2 (up): ip 192.1.1.3 dlci 201(0xC9,0x3090), static,
CISCO, status defined, active
情况表明:与R1的映射是动态的,与R2的解析是静态的。
R2#show frame map
Serial0/1 (up): ip 192.1.1.1 dlci 200(0xC8,0x3080), dynamic,
broadcast,, status defined, active
Serial0/1 (up): ip 192.1.1.4 dlci 200(0xC8,0x3080), static,
CISCO, status defined, active
Serial0/1 (up): ip 192.1.1.1 dlci 200(0xC8,0x3080), dynamic,
broadcast,, status defined, active
Serial0/1 (up): ip 192.1.1.4 dlci 200(0xC8,0x3080), static,
CISCO, status defined, active
情况表明:与R1的映射是动态的,与R3的解析是静态的。
验证连通性:
R2#ping 192.1.1.4
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 260/332/404 ms
Sending 5, 100-byte ICMP Echos to 192.1.1.4, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 260/332/404 ms
R3#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 = 276/408/656 ms
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 = 276/408/656 ms
以上情况表明R2,R3之间的通信正常。
文章不足之处,请大家多多指教。
转载于:https://blog.51cto.com/litclive/125234