1、实验十 广域网协议的封装【实验名称】广域网协议的封装【实验目的】掌握广域网协议的封装类型和封装方法【背景描述】你是公司的网络管理员,两个分公司之间希望能够申请一条广域网专线进行连接。公司现有锐捷路由器两台,希望你了解该设备的广域网接口所支持的协议,以确定选择哪一种广域网链路。【技术原理】常见广域网专线技术有,DDN 专线、PSTN/ISDN 专线、帧中继专线、X.25 专线等。数据链路层提供各种专线技术的协议,主要有 PPP、HDLC、X.25、Frame-relay 以及 ATM 等。【实现功能】查看路由器广域网接口支持的数据链路层协议,并进行正确的封装。【实验设备】R1762 路由器(1
2、台)【实验拓扑】图 22【实验步骤】步骤 6. 查看广域网接口默认的封装类型。Router1# show interface serial 1/2serial 1/2 is UP , line protocol is UP !查看接口的状态,是否为 UPHardware is PQ2 SCC HDLC CONTROLLER serialInterface address is: 1.1.1.2/24 !查看接口 IP 地址的配置MTU 1500 bytes, BW 512 Kbit !查看接口的带宽为 512KEncapsulation protocol is HDLC, loopback n
3、ot set !默认的封装协议是 HDLCKeepalive interval is 10 sec , setCarrier delay is 2 secRXload is 1 ,Txload is 1Queueing strategy: WFQ5 minutes input rate 17 bits/sec, 0 packets/sec5 minutes output rate 17 bits/sec, 0 packets/sec511 packets input, 11242 bytes, 0 no bufferReceived 511 broadcasts, 0 runts, 0 gia
4、nts0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort511 packets output, 11242 bytes, 0 underruns0 output errors, 0 collisions, 1 interface resets1 carrier transitionsV35 DTE cable !该接口为 DTE 端DCD=up DSR=up DTR=up RTS=up CTS=up步骤 7. 查看广域网接口支持的封装类型。RouterA(config)#interface serial 1/2RouterA(config-if
5、)#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 协议步骤 8. 更改广域网接口的封装类型。PPP 封装RouterA(config)#interface serial 1/2 !进行 serial 1/2RouterA(c
6、onfig-if)#encapsulation ppp !将接口协议封装为 PPPRouterA(config-if)#endRouterA#show interface serial 1/2 !查看接口的封装协议serial 1/2 is UP , line protocol is DOWNHardware is PQ2 SCC HDLC CONTROLLER serialInterface address is: 192.168.1.1/24MTU 1500 bytes, BW 2000 KbitEncapsulation protocol is PPP, loopback not set
7、Keepalive interval is 10 sec , setCarrier delay is 2 secRXload is 1 ,Txload is 1LCP Reqsent !PPP 协议相关参数Closed: ipcpQueueing strategy: FIFOOutput queue 0/40, 0 drops;Input queue 0/75, 0 drops5 minutes input rate 14 bits/sec, 0 packets/sec5 minutes output rate 36 bits/sec, 0 packets/sec403 packets inp
8、ut, 8866 bytes, 0 no bufferReceived 246 broadcasts, 0 runts, 0 giants15 input errors, 0 CRC, 15 frame, 0 overrun, 0 abort1011 packets output, 29156 bytes, 0 underruns0 output errors, 0 collisions, 59 interface resets1 carrier transitionsV35 DCE cableDCD=up DSR=up DTR=up RTS=up CTS=up Frame-Relay 封装R
9、outerA(config)#interface serial 1/2 !进行 serial 1/2RouterA(config-if)#encapsulation frame-relay !将接口协议封装为帧中继RouterA(config-if)#endRouterA#show interface serial 1/2 !查看接口的封装协议serial 1/2 is UP , line protocol is UPHardware is PQ2 SCC HDLC CONTROLLER serialInterface address is: 192.168.1.1/24MTU 1500 by
10、tes, BW 2000 KbitEncapsulation protocol is FRAME RELAY, loopback not set !封装协议Keepalive interval is 10 sec , setCarrier delay is 2 secRXload is 1 ,Txload is 1LMI enq sent 1, LMI status recvd 0, LMI update recvd 0, DTE LMI upLMI enq recvd 0, LMI status sent 0, LMI update sent 0LMI DLCI 0 LMI type is
11、CCITT, frame relay DTE interface broadcasts 0!帧中继协议相关参数Queueing strategy: FIFOOutput queue 0/40, 0 drops;Input queue 0/75, 0 drops5 minutes input rate 15 bits/sec, 0 packets/sec5 minutes output rate 36 bits/sec, 0 packets/sec405 packets input, 8910 bytes, 0 no bufferReceived 246 broadcasts, 0 runts,
12、 0 giants15 input errors, 0 CRC, 15 frame, 0 overrun, 0 abort1017 packets output, 29239 bytes, 0 underruns0 output errors, 0 collisions, 61 interface resets1 carrier transitionsV35 DCE cableDCD=up DSR=up DTR=up RTS=up CTS=up X.25 封装RouterA(config)#interface serial 1/2 !进行 serial 1/2RouterA(config-if
13、)#encapsulation X25 !将接口协议封装为 X.25RouterA(config-if)#endRouterA#show interface serial 1/2 !查看接口的封装协议serial 1/2 is UP , line protocol is DOWNHardware is PQ2 SCC HDLC CONTROLLER serialInterface address is: 192.168.1.1/24MTU 1500 bytes, BW 2000 KbitEncapsulation protocol is X.25, loopback not set !查看封装
14、协议Keepalive interval is 0 sec , no setCarrier delay is 2 secRXload is 1 ,Txload is 1LAPB DTE, modulo 8, k 7, N1 12056, N2 20T1 3000, interface outage (partial T3) 0, T4 0State SABMSENT, VS 0, VR 0, Remote VR 0, Retransmissions 2Queues: U/S frames 0, I frames 0, unack. 0, reTx 0IFRAMEs 0/0 RNRs 0/0 R
15、EJs 0/0 SABM/Es 2/0 FRMRs 0/0 DISCs 0/0X25 DTE, address , state R1, modulo 8Defaults: DEF encapsulation, idle 0, nvc 3input/output window sizes 2/2, packet sizes 128/128Timers: T20 180, T21 200, T22 180, T23 180, TH 0Channels: Incoming-only none, Two-way 1-1024, Outgoing-only noneRESTARTs 0/0 CALLs
16、0+0/0+0/0+0 DIAGs 0/0 !X.25 协议相关参数Queueing strategy: FIFOOutput queue 0/40, 0 drops;Input queue 0/75, 0 drops5 minutes input rate 16 bits/sec, 0 packets/sec5 minutes output rate 32 bits/sec, 0 packets/sec407 packets input, 8954 bytes, 0 no bufferReceived 246 broadcasts, 0 runts, 0 giants15 input errors, 0 CRC, 15 frame, 0 overrun, 0 abort1021 packets output, 29269 bytes, 0 underruns0 output errors, 0 collisions, 61 interface resets1 carrier transitionsV35 DCE cableDCD=up DSR=up DTR=up RTS=up CTS=up【注意事项】封装广域网协议时,要求 V.35 线缆的两个端口封装协议一致,否则无法建立链路。