资源描述
广域网协议封装
【试验名称】
广域网协议封装
【试验目】
掌握广域网协议封装类型和封装方法
【背景描述】
你是企业网络管理员, 两个分企业之间期望能够申请一条广域网专线进行连接。企业现有锐捷路由器两台, 期望你了解该设备广域网接口所支持协议, 以确定选择哪一个广域网链路。
【技术原理】
常见广域网专线技术有, DDN专线、 PSTN/ISDN专线、 帧中继专线、 X.25专线等。数据链路层提供多种专线技术协议, 关键有PPP、 HDLC、 X.25、 Frame-relay以及ATM等。
【实现功效】
查看路由器广域网接口支持数据链路层协议, 并进行正确封装。
【试验设备】
R1762路由器(1台)
【试验拓扑】
【试验步骤】
步骤一
查看广域网接口默认封装类型:
Router1# show interface serial 1/2
serial 1/2 is UP , line protocol is UP //查看接口状态, 是否为UP
Hardware is PQ2 SCC HDLC CONTROLLER serial
Interface address is: 1.1.1.2/24 //查看接口IP地址配置
MTU 1500 bytes, BW 512 Kbit //查看接口带宽为512K
Encapsulation protocol is HDLC, loopback not set//默认封装协议是HDLC
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
Queueing strategy: WFQ
5 minutes input rate 17 bits/sec, 0 packets/sec
5 minutes output rate 17 bits/sec, 0 packets/sec
511 packets input, 11242 bytes, 0 no buffer
Received 511 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
511 packets output, 11242 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
1 carrier transitions
V35 DTE cable //该接口为DTE端
DCD=up DSR=up DTR=up RTS=up CTS=up
步骤二
查看广域网接口支持封装类型:
RouterA(config)#interface serial 1/2
RouterA(config-if)#encapsulation ?
//encapsulation是封装数据链路层协议命令
frame-relay Frame Relay networks //帧中继协议
hdlc serial HDLC synchronous //高级数据链路控制协议
lapb LAPB(X.25 Level 2) //X.25二层协议
ppp Point-to-Point protocol //PPP点到点协议
x25 X.25 //X.25协议
步骤三
更改广域网接口封装类型:
PPP封装R
RouterA(config)#interface serial 1/2 //进行serial 1/2
RouterA(config-if)#encapsulation ppp //将接口协议封装为PPP
RouterA(config-if)#end
RouterA#show interface serial 1/2 //查看接口封装协议
serial 1/2 is UP , line protocol is DOWN
Hardware is PQ2 SCC HDLC CONTROLLER serial
Interface address is: 192.168.1.1/24
MTU 1500 bytes, BW Kbit
Encapsulation protocol is PPP, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
LCP Reqsent //PPP协议相关参数
Closed: ipcp
Queueing strategy: FIFO
Output queue 0/40, 0 drops;
Input queue 0/75, 0 drops
5 minutes input rate 14 bits/sec, 0 packets/sec
5 minutes output rate 36 bits/sec, 0 packets/sec
403 packets input, 8866 bytes, 0 no buffer
Received 246 broadcasts, 0 runts, 0 giants
15 input errors, 0 CRC, 15 frame, 0 overrun, 0 abort
1011 packets output, 29156 bytes, 0 underruns
0 output errors, 0 collisions, 59 interface resets
1 carrier transitions
V35 DCE cable
DCD=up DSR=up DTR=up RTS=up CTS=up
R Frame-Relay封装
RouterA(config)#interface serial 1/2 //进行serial 1/2
RouterA(config-if)#encapsulation frame-relay//将接口协议封装为帧中继
RouterA(config-if)#end
RouterA#show interface serial 1/2 //查看接口封装协议
serial 1/2 is UP , line protocol is UP
Hardware is PQ2 SCC HDLC CONTROLLER serial
Interface address is: 192.168.1.1/24
MTU 1500 bytes, BW Kbit
Encapsulation protocol is FRAME RELAY, loopback not set//封装协议
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
LMI enq sent 1, LMI status recvd 0, LMI update recvd 0, DTE LMI up
LMI enq recvd 0, LMI status sent 0, LMI update sent 0
LMI DLCI 0 LMI type is CCITT, frame relay DTE interface broadcasts 0
//帧中继协议相关参数
Queueing strategy: FIFO
Output queue 0/40, 0 drops;
Input queue 0/75, 0 drops
5 minutes input rate 15 bits/sec, 0 packets/sec
5 minutes output rate 36 bits/sec, 0 packets/sec
405 packets input, 8910 bytes, 0 no buffer
Received 246 broadcasts, 0 runts, 0 giants
15 input errors, 0 CRC, 15 frame, 0 overrun, 0 abort
1017 packets output, 29239 bytes, 0 underruns
0 output errors, 0 collisions, 61 interface resets
1 carrier transitions
V35 DCE cable
DCD=up DSR=up DTR=up RTS=up CTS=up
R X.25封装
RouterA(config)#interface serial 1/2 //进行serial 1/2
RouterA(config-if)#encapsulation X25 //将接口协议封装为X.25
RouterA(config-if)#end
RouterA#show interface serial 1/2 //查看接口封装协议
serial 1/2 is UP , line protocol is DOWN
Hardware is PQ2 SCC HDLC CONTROLLER serial
Interface address is: 192.168.1.1/24
MTU 1500 bytes, BW Kbit
Encapsulation protocol is X.25, loopback not set //查看封装协议
Keepalive interval is 0 sec , no set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
LAPB DTE, modulo 8, k 7, N1 12056, N2 20
T1 3000, interface outage (partial T3) 0, T4 0
State SABMSENT, VS 0, VR 0, Remote VR 0, Retransmissions 2
Queues: U/S frames 0, I frames 0, unack. 0, reTx 0
IFRAMEs 0/0 RNRs 0/0 REJs 0/0 SABM/Es 2/0 FRMRs 0/0 DISCs 0/0
X25 DTE, address , state R1, modulo 8
Defaults: DEF encapsulation, idle 0, nvc 3
input/output window sizes 2/2, packet sizes 128/128
Timers: T20 180, T21 200, T22 180, T23 180, TH 0
Channels: Incoming-only none, Two-way 1-1024, Outgoing-only none
RESTARTs 0/0 CALLs 0+0/0+0/0+0 DIAGs 0/0//X.25协议相关参数
Queueing strategy: FIFO
Output queue 0/40, 0 drops;
Input queue 0/75, 0 drops
5 minutes input rate 16 bits/sec, 0 packets/sec
5 minutes output rate 32 bits/sec, 0 packets/sec
407 packets input, 8954 bytes, 0 no buffer
Received 246 broadcasts, 0 runts, 0 giants
15 input errors, 0 CRC, 15 frame, 0 overrun, 0 abort
1021 packets output, 29269 bytes, 0 underruns
0 output errors, 0 collisions, 61 interface resets
1 carrier transitions
V35 DCE cable
DCD=up DSR=up DTR=up RTS=up CTS=up
【注意事项】
封装广域网协议时, 要求V.35线缆两个端口封装协议一致, 不然无法建立链路。
展开阅读全文