广域网协议封装实验报告
广域网协议的封装

广域网协议的封装协议名称:广域网协议的封装一、目的和范围本协议旨在规定广域网(Wide Area Network,简称WAN)协议的封装方式,以实现数据在广域网中的传输和交换。
本协议适用于广域网设备之间的通信。
二、术语定义1. 广域网(Wide Area Network,WAN):指覆盖广范围的网络,由多个局域网(Local Area Network,LAN)相互连接而成。
2. 协议封装(Protocol Encapsulation):指在数据传输过程中,将上层协议的数据包封装到下层协议的数据包中,以实现数据在不同网络之间的传输。
三、协议封装方式1. 数据链路层封装广域网协议的封装在数据链路层进行,主要包括以下步骤:a. 帧封装:将上层协议的数据包封装到数据链路层的帧中,添加帧头和帧尾等必要字段。
b. MAC地址封装:在帧头中添加源MAC地址和目的MAC地址,以标识数据包的发送和接收方。
c. 网络类型封装:在帧头中添加网络类型字段,指明数据包所属的网络类型(如以太网、ATM等)。
d. CRC校验封装:在帧尾中添加CRC校验字段,用于检测数据传输过程中的错误。
2. 网络层封装广域网协议的封装在网络层进行,主要包括以下步骤:a. IP封装:将数据链路层的帧中的数据包提取出来,封装到网络层的IP数据包中。
b. 源IP地址和目的IP地址封装:在IP数据包头部添加源IP地址和目的IP 地址,以标识数据包的发送和接收方。
c. TTL封装:在IP数据包头部添加TTL(Time to Live)字段,用于限制数据包在网络中的生存时间。
d. IP选项封装:根据需要,可以在IP数据包头部添加一些可选字段,如记录路由信息等。
3. 传输层封装广域网协议的封装在传输层进行,主要包括以下步骤:a. TCP/UDP封装:将网络层的IP数据包提取出来,封装到传输层的TCP或UDP数据包中。
b. 源端口号和目的端口号封装:在TCP或UDP数据包头部添加源端口号和目的端口号,以标识数据包的发送和接收方。
广域网协议的封装

广域网协议的封装协议名称:广域网协议的封装一、引言本协议旨在规范广域网协议的封装方式,确保数据在广域网传输过程中的安全性、可靠性和高效性。
本协议适用于广域网通信设备和系统的设计、开发和运维过程中。
二、术语定义1. 广域网(Wide Area Network,简称WAN):指覆盖范围广、跨越较大地理区域的计算机网络。
2. 协议封装(Protocol Encapsulation):指将数据包按照特定的协议格式进行封装和解封装的过程。
3. 数据链路层(Data Link Layer):指OSI模型中的第二层,负责将网络层传输的数据分组封装成帧,并进行错误检测和纠正。
4. 网络层(Network Layer):指OSI模型中的第三层,负责将数据分组从源主机发送到目标主机。
三、协议封装的基本原则1. 封装格式:协议封装应采用标准的封装格式,如以太网帧格式、PPP封装格式等,以确保与其他设备和系统的兼容性。
2. 封装字段:协议封装应包含必要的字段,如源地址、目标地址、协议类型等,以便接收方正确解析和处理数据包。
3. 封装协议:协议封装应选择适合广域网传输的协议,如IP协议、MPLS协议等,以提供可靠的数据传输和路由功能。
4. 封装效率:协议封装应考虑广域网传输的带宽和延迟特性,尽量减少封装开销,提高数据传输效率。
5. 封装安全:协议封装应支持数据加密和身份认证等安全机制,以保护数据在广域网传输过程中的机密性和完整性。
四、常用的广域网协议封装方式1. IP封装:将数据包封装为IP数据报的格式,包括源IP地址、目标IP地址、协议类型和数据等字段。
IP封装适用于基于IP网络的广域网通信。
2. MPLS封装:将数据包封装为MPLS标签的格式,包括标签头、标签值和数据等字段。
MPLS封装适用于基于MPLS网络的广域网通信,可提供更好的路由和负载均衡能力。
3. PPP封装:将数据包封装为PPP帧的格式,包括起始标志、地址、控制、协议和数据等字段。
广域网协议封装与验证实验

10级计网贺建广域网协议封装与验证实验实验背景:你是公司的网络管理员,两个分公司之间希望能够申请一条广域网专线进行连接。
现有思科路由器设备,希望你了解该设备的广域网接口所支持的协议,以确定选择哪种广域网链路。
公司为了满足不断增长的业务需求,申请了专线接入,你的客户端与ISP进行链路协商时要验证身份,配置路由器保证链路建立,并考虑其安全性。
实验步骤:串行链路均采用PPP封装;路由器之间的链路采用CHAP验证和PAP验证;路由协议均采用动态RIP协议。
任务1:配置路由器接口网关地址,设置串行链路的时钟频率。
任务2:配置动态路由协议。
任务3:验证连通性。
任务4:配置链路之间的安全验证。
任务5:测试安全验证的有效性。
实验拓扑:IP地址规划:实验配置过程:1.路由器R0、R1、R2基本配置Router>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host R0R0(config)#int f0/0R0(config-if)#ip add 192.168.1.1 255.255.255.0R0(config-if)#no shutR0(config-if)#exitR0(config)#int s0/0R0(config-if)#ip add 192.168.3.1 255.255.255.252R0(config-if)#clock rate 64000R0(config-if)#no shutR0(config-if)#exitRouter>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host R1R1(config)#int s0/0R1(config-if)#ip add 192.168.3.2 255.255.255.252R1(config-if)#no shutR1(config-if)#exitR1(config)#int s0/1R1(config-if)#ip add 192.168.3.5 255.255.255.252R1(config-if)#no shutR1(config-if)#exitRouter>enRouter#conf tEnter configuration commands, one per line. End with CNTL/Z. Router(config)#host R2R2(config)#int s0/0R2(config-if)#ip add 192.168.3.6 255.255.255.252R2(config-if)#clock rate 64000R2(config-if)#no shutR2(config-if)#exitR2(config)#int f0/0R2(config-if)#ip add 192.168.2.1 255.255.255.0 R2(config-if)#no shutR2(config-if)#exit2.配置路由协议RIP2R0>enR0#conf tR0(config)#router ripR0(config-router)#ver 2R0(config-router)#net 192.168.1.0R0(config-router)#net 192.168.3.0R0(config-router)#exitR1(config)#router ripR1(config-router)#ver 2R1(config-router)#net 192.168.3.0R1(config-router)#net 192.168.3.4R1(config-router)#exitR2(config)#router ripR2(config-router)#ver 2R2(config-router)#net 192.168.3.4R2(config-router)#net 192.168.2.0R2(config-router)#exit3.测试连通性PC0 ping PC1成功!ok4.配置链路安全性R0(config)#int s0/0R0(config-if)#encapsulation pppR0(config-if)#ppp authentication chapR0(config-if)#exitR0(config)#username R1 password ciscoR1(config)#int s0/0R1(config-if)#encapsulation pppR1(config-if)#ppp authentication chapR1(config-if)#exitR1(config)#username R0 password ciscoR1(config)#R1(config)#int s0/1R1(config-if)#encapsulation pppR1(config-if)#ppp auth papR1(config-if)#exitR1(config)#username cisco password 123R2(config)#int s0/0R2(config-if)#encapsulation pppR2(config-if)#ppp pap sent-username cisco password 123 R2(config-if)#exit5.测试安全验证的有效性PC0 ping PC1关闭路由器R1中接口s0/0之后R1#debug ppp authenticationPPP authentication debugging is onR1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int s0/0R1(config-if)#shutR1(config-if)#R1(config-if)#no shut%LINK-5-CHANGED: Interface Serial0/0, changed state to upR1(config-if)#Serial0/0 IPCP: O CONFREQ [Closed] id 1 len 10Serial0/0 IPCP: I CONFACK [Closed] id 1 len 10Serial0/0 IPCP: O CONFREQ [Closed] id 1 len 10%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up R1(config-if)#exit关闭路由器R1中接口s0/1之后R1#debug ppp authPPP authentication debugging is onR1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int s0/1R1(config-if)#shutR1(config-if)#no shutR1(config-if)#%LINK-5-CHANGED: Interface Serial0/1, changed state to upR1(config-if)#Serial0/1 PAP: I AUTH-REQ id 17 len 15Serial0/1 PAP: Authenticating peerSerial0/1 PAP: Phase is FORWARDING, Attempting Forward%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/1, changed state to up 到此广域网协议封装与验证实验完成!。
路由器广域网封装协议步骤说明

路由器广域网封装协议步骤说明实验四:DCR-2626设备telnet密码//路由器设置telnetusername abcd password 0 abcdaaa authentication login default localaaa authentication enable default none实验五:路由器串口PPP协议认证方式。
CHAP方式:R1_config#aaa authentication ppp default local (定义名为shenzhou,本地数据验证的aaa验证方法)R1_config#username R2 password 0 shenzhou(设置账号密码)R1_config#int s0/1R1_config_s0/1#ip add 192.168.1.1 255.255.255.252R1_config_s0/1#physical-layer speed 2048000R1_config_s0/1#encapsulation ppp(封装PPP协议)R1_config_s0/1#ppp authentication chap (设置验证方式)R1_config_s0/1#ppp chap hostname R1(设置发送给对方验证的账号)R2_config#aaa authentication ppp default local(定义名为shenzhou,本地数据验证的aaa验证方法)R2_config#username R1 password 0 shenzhou(设置账号密码)R2_config#int s0/1R2_config_s0/1#ip add 192.168.1.1 255.255.255.252R2_config_s0/1#encapsulation ppp(封装PPP协议)R2_config_s0/1#ppp authentication chap shenzhou(设置验证方式)R2_config_s0/1#ppp chap hostname R2(设置发送给对方验证的账号)实验六:PAP方式:R1_config#aaa authentication ppp shenzhou local(定义名为shenzhou,本地数据验证的aaa验证方法)R1_config#username R2 password 0 shenzhou(设置账号密码)R1_config#int s0/1R1_config_s0/1#ip add 192.168.1.1 255.255.255.252R1_config_s0/1#physical-layer speed 2048000R1_config_s0/1#encapsulation ppp(封装PPP协议)R1_config_s0/1#ppp authentication pap shenzhou(设置验证方式)R1_config_s0/1#ppp pap sent-username R1 password shenzhou(设置发送给对方验证的账号)R2_config#aaa authentication ppp shenzhou local(定义名为shenzhou,本地数据验证的aaa验证方法)R2_config#username R1 password 0 shenzhou(设置账号密码)R2_config#int s0/1R2_config_s0/1#ip add 192.168.1.1 255.255.255.252R2_config_s0/1#encapsulation ppp(封装PPP协议)R2_config_s0/1#ppp authentication pap shenzhou(设置验证方式)R2_config_s0/1# ppp pap sent-username R2 password shenzhou(设置发送给对方验证的账号)。
实验六 广域网协议封装与验证配置

实验六 广域网协议封装与验证配置一、实验目的1.理解广域网协议的类型及工作原理。
2.掌握PPP 协议配置方法。
二、实验设备路由器两台,PC 机两台,直连线两条,V35电缆两条。
三、实验步骤1.按图6-1将实验设备连接好。
图6-12.为路由器Router1各接口封装PPP 协议及分配IP 地址。
Router1>enableRouter1#configure terminalRouter1(config)#interface fastethernet 1/0Router1(config-if)#ip address 192.168.1.1 255.255.255.0 Router1(config-if)#no shutdownRouter1(config-if)#exitRouter1(config)#interface serial 1/2Router1(config-if)#encapsulation pppRouter1(config-if)#ip address 192.168.12.1 255.255.255.0 Router1(config-if)#clock rate 64000Router1(config-if)#no shutdownRouter1(config-if)#endRouter1#show ip interface brief !显示路由器接口的配置 Router1#show interface serial 1/23.在路由器Router1上配置静态路由。
Router1# configure terminalRouter1(config)#ip route 192.168.2.0 255.255.255.0 192.168.12.2 Router1(config)#exitRouter1#show ip route !显示Router1上的静态路由信息4. 为路由器Router2各接口封装PPP 协议及分配IP 地址。
广域网协议的封装

广域网协议的封装协议名称:广域网协议的封装一、引言广域网(Wide Area Network,简称WAN)是指连接不同地理位置的计算机网络,它可以覆盖较大的地理范围,通常通过公共或专用的电信线路进行连接。
为了在广域网中实现数据的传输和通信,需要对数据进行封装,以确保数据的可靠性、安全性和有效性。
本协议旨在规定广域网协议的封装标准,以确保各种网络设备的兼容性和互操作性。
二、范围本协议适用于广域网协议的封装,包括但不限于以下方面:1. 广域网协议的封装格式;2. 广域网协议的封装过程;3. 广域网协议的封装参数;4. 广域网协议的封装算法。
三、术语和定义1. 广域网(Wide Area Network,WAN):连接不同地理位置的计算机网络,通过公共或专用的电信线路进行连接。
2. 封装(Encapsulation):将数据包装成特定格式以便在网络中传输的过程。
3. 封装格式(Encapsulation Format):广域网协议在传输过程中的数据包封装格式。
4. 封装过程(Encapsulation Process):将数据进行封装的具体步骤和流程。
5. 封装参数(Encapsulation Parameters):影响封装过程的配置参数。
6. 封装算法(Encapsulation Algorithm):用于对数据进行封装的算法。
四、封装格式1. 数据包格式广域网协议的封装格式应包括以下字段:1.1 头部字段:包含源地址、目标地址、协议类型等信息;1.2 负载字段:包含待传输的数据。
2. 头部字段格式头部字段应包含以下信息:2.1 源地址:指示数据包的源设备地址,使用IP地址格式;2.2 目标地址:指示数据包的目标设备地址,使用IP地址格式;2.3 协议类型:指示数据包中封装的协议类型,使用数字或代号表示;2.4 长度:指示数据包的总长度,以字节为单位;2.5 校验和:用于验证数据包的完整性和准确性。
封装测试实践报告总结与反思

封装测试实践报告总结与反思1.引言1.1 概述概述:封装测试作为软件测试中的一种重要手段,在软件开发过程中具有极其重要的作用。
它通过对程序进行模块化封装和测试,保证了程序的功能性、可靠性和稳定性。
本报告将对封装测试的定义、作用以及实践过程进行详细的探讨和总结,并对封装测试的优缺点进行分析。
同时,通过总结实践经验和反思封装测试的局限性,展望封装测试的未来发展,希望能够为软件测试领域的同行们提供一些启发和借鉴。
文章结构部分内容如下:1.2 文章结构本文分为引言、正文和结论三部分。
在引言部分,将会对封装测试进行概述,说明文章的结构和目的。
正文部分分为封装测试的定义与作用、封装测试的实践过程以及封装测试的优缺点分析三个小节,将详细介绍封装测试的相关知识和实践经验。
在结论部分,将对封装测试实践的经验进行总结,反思封装测试的局限性,并展望封装测试的未来发展。
1.3 目的目的部分内容:本报告的目的是对封装测试实践进行全面总结与反思,旨在通过对封装测试定义与作用、实践过程、优缺点分析以及经验总结和反思局限性的归纳分析,为读者提供关于封装测试的全面了解与思考。
同时,也通过展望封装测试的未来发展,为相关领域的研究和实践提供参考和启示。
容2.正文2.1 封装测试的定义与作用封装测试是指在软件开发过程中,通过封装的方式对代码进行测试的一种方法。
封装测试的作用主要包括两个方面:一方面是保证代码质量,另一方面是提高开发效率。
首先,封装测试可以确保代码的质量。
通过封装测试,可以对代码进行全面的测试覆盖,包括单元测试、集成测试、系统测试等,从而保证代码的健壮性和稳定性。
封装测试还可以帮助发现潜在的bug和问题,及时修复,减少因为代码质量问题而导致的软件故障和安全风险。
其次,封装测试可以提高开发效率。
在软件开发过程中,封装测试可以帮助开发人员快速定位和解决问题,减少因为代码修改而引入新bug 的风险,提高代码的可维护性和可拓展性。
广域网协议的封装

广域网协议的封装【实验名称】广域网协议的封装【实验目的】掌握广域网协议的封装类型和封装方法【背景描述】你是公司的网络管理员,两个分公司之间希望能够申请一条广域网专线进行连接。
公司现有锐捷路由器两台,希望你了解该设备的广域网接口所支持的协议,以确定选择哪一种广域网链路。
【技术原理】常见广域网专线技术有,DDN专线、PSTN/ISDN专线、帧中继专线、X.25专线等。
数据链路层提供各种专线技术的协议,主要有PPP、HDLC、X.25、Frame-relay以及ATM等。
【实现功能】查看路由器广域网接口支持的数据链路层协议,并进行正确的封装。
【实验设备】R1762路由器(1台)【实验拓扑】【实验步骤】步骤一查看广域网接口默认的封装类型:Router1# show interface serial 1/2serial 1/2 is UP , line protocol is UP //查看接口的状态,是否为UP Hardware is PQ2 SCC HDLC CONTROLLER serialInterface 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 , 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 giants0 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步骤二查看广域网接口支持的封装类型:RouterA(config)#interface serial 1/2RouterA(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封装RouterA(config)#interface serial 1/2 //进行serial 1/2RouterA(config-if)#encapsulation ppp //将接口协议封装为PPP RouterA(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 setKeepalive 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 input, 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=upFrame-Relay封装RouterA(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 bytes, 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 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, 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=upX.25封装RouterA(config)#interface serial 1/2 //进行serial 1/2 RouterA(config-if)#encapsulation X25 //将接口协议封装为X.25 RouterA(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 //查看封装协议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 REJs 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/128 Timers: T20 180, T21 200, T22 180, T23 180, TH 0Channels: Incoming-only none, Two-way 1-1024, Outgoing-only noneRESTARTs 0/0 CALLs 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线缆的两个端口封装协议一致,否则无法建立链路。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
网络实验资源库实验报告
实验编号:
NE 24
实验名称:
广域网协议的封装
所属课程:
网络工程
知识类别:
路由选择
难度系数:
1级【容易】
实验来源:
锐捷公司
关键词:
HDLC封装PPP封装
所属TCP/IP层次:
网络层
实验目的:
掌握广域网协议的封装类型和封装方法
背景描述:
你是公司的网络管理员,两个分公司之间希望能够申请一条广域网专线进行连接。
公司现有锐捷路由器两台,希望你了解该设备的广域网接口所支持的协议,以确定选择哪一种广域网链路。
预备知识:
路由器基本配置知识、广域网知识
实验设备:
路由器2台
实验拓扑:
实验原理:
常见广域网专线技术有,DDN专线、PSTN/ISDN专线、帧中继专线、X.25专线等。
数据链路层提供各种专线技术的协议,主要有PPP、HDLC、X.25、Frame-relay以及ATM 等。
实验步骤:
第一步:路由器基本配置
Router A(config)#interface serial 4/0
Router A(config-if)#ip address 172.16.2.1 255.255.255.0
Router B(config)#interface serial 4/0
Router B(config-if)#ip address 172.16.2.2 255.255.255.0
路由器B配置如下:(路由器A配置见图二)
图一
第二步:封装HDLC
Router A(config)#interface serial 4/0
Router A (config-if)#encapsulation hdlc
Router B(config)#interface serial 4/0
Router B(config-if)#encapsulation hdlc
验证广域网接口的封装类型:
Router A#show interfaces serial 4/0
Index(dec):1 (hex):1
serial 4/0 is UP , line protocol is UP
Hardware is Infineon DSCC4 PEB20534 H-10 serial
Interface address is: 172.16.2.2/24
MTU 1500 bytes, BW 2000 Kbit
Encapsulation protocol is HDLC, loopback not set
Keepalive interval is 10 sec , set
Carrier delay is 2 sec
RXload is 1 ,Txload is 1
Queueing strategy: WFQ
11421118 carrier transitions
V35 DTE cable
DCD=up DSR=up DTR=up RTS=up CTS=up
5 minutes input rate 17 bits/sec, 0 packets/sec
5 minutes output rate 17 bits/sec, 0 packets/sec
57 packets input, 1664 bytes, 0 no buffer, 0 dropped
Received 52 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
68 packets output, 2726 bytes, 0 underruns , 0 dropped
0 output errors, 0 collisions, 0 interface resets
注意:锐捷路由器广域网接口默认封装的就是HDLC。
HDLC封装结果如下:
serial 4/0 is UP , line protocol is UP 状态为UP
V35 DCE cable 接口为DCE
第三步:封装PPP
Router A#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router A (config)#interface serial 4/0
Router A (config-if)#encapsulation ppp
Router B#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router B (config)#interface serial 4/0
Router B (config-if)#encapsulation ppp
验证广域网接口的封装类型:
Router A#show interfaces serial 4/0
Index(dec):1 (hex):1
serial 4/0 is UP , line protocol is UP
Hardware is Infineon DSCC4 PEB20534 H-10 serial
Interface address is: 172.16.2.1/24
MTU 1500 bytes, BW 2000 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 Open
Open: ipcp
Queueing strategy: WFQ
11421118 carrier transitions
V35 DCE cable
DCD=up DSR=up DTR=up RTS=up CTS=up
5 minutes input rate 30 bits/sec, 0 packets/sec
5 minutes output rate 19 bits/sec, 0 packets/sec
123 packets input, 3638 bytes, 0 no buffer, 28 dropped
Received 68 broadcasts, 0 runts, 0 giants
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort
89 packets output, 2312 bytes, 0 underruns , 0 dropped
0 output errors, 0 collisions, 7 interface resets
PPP封装结果如下:
serial 4/0 is UP , line protocol is DOWN 接口状态分别为UP、DOWN V35 DCE cable 接口为DCE
注意事项:
封装广域网协议时,要求V.35线缆的两个端口封装协议一致,否则无法建立链路。
参考资料:
《计算机网络协议实验原理教程》
编写时间:2015年1月7日
201211010231 朱建春2012级计算机科学与技术2班。