实验05、路由器广域网HDLC封装配置
- 格式:pdf
- 大小:193.40 KB
- 文档页数:5
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 到此广域网协议封装与验证实验完成!。
路由器部分-实验04:路由器网络接口的IP地址设置及HDLC封装/PPP封装实验4:路由器网络接口的IP地址设置及HDLC封装/PPP封装实验线路连接图:网络拓扑结构图如下实验内容:(1)HDLC封装过程Ø 通过配置机配置DCR1702-1路由器,配置以下内容Router_config#interface serial 0/2Router_config_s0/2#encapsulation hdlcRouter_config_s0/2#ip address 192.168.10.1 255.255.255.0Router_config_s0/2#no shutdownRouter# show interface serial 0/2Ø 通过配置机配置DCR2611路由器,配置以下内容Router_config#interface serial 0/2Router_config_s0/3#encapsulation hdlcRouter_config_s0/3#ip address 192.168.10.2 255.255.255.0Router_config_s0/3#physical-layer speed 64000Router_config_s0/3#no shutdownRouter#show interface serial 0/2注意以上的show结果,只有serial和line protocol全都处于up状态,该接口才能正常工作。
在DCR2611和DCR1702-2上相互ping对方的接口IP,应该可以ping通。
(1)PPP封装过程Ø 通过配置机配置DCR1702-1路由器,配置以下内容Router_config#interface serial 0/2Router_config_s0/2#encapsulation pppRouter_config_s0/2#ip address 192.168.10.1 255.255.255.0Router_config_s0/2#no shutdownRouter# show interface serial 0/2Ø 通过配置机配置DCR2611路由器,配置以下内容Router_config#interface serial 0/3Router_config_s0/3#encapsulation pppRouter_config_s0/3#ip address 192.168.10.2 255.255.255.0Router_config_s0/3#physical-layer speed 64000Router_config_s0/3#no shutdownRouter#show interface serial 0/3注意ppp封装可以采用pap验证和chap验证,也可以不采用这两种验证方式,网络都可以通。
路由器广域网封装协议步骤说明实验四: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(设置发送给对方验证的账号)。
实验八 路由器广域网HDLC封装的配置 一、实验目的1.进一步理解串行接口的功能2.认识串行接口常用的接线种类及其对配置的影响3.熟练掌握串行接口配置的要素4.理解串行接口链路封装协议 PPP的层次5.掌握HDLC封装配置二、应用环境1.企业环境中异地的互连通常要经过第三方的网络,比如网通、电信等等,所以与局域网的配置不同。
2.广域网通常需要付费、带宽比较有限、可靠性相比局域网要低。
三、实验设备及材料1.DCR-1750路由器1台2.DCR-1702路由器1台3.PC机一台4.Console线揽一条5.网线一根6.CR-V35MT一条7.CR-V35FC一条四、实验拓扑图五、实验内容与要求1.先用带外配置对路由器进行初始化,并配置IP地址为:192.168.10.101/24 2.PC机的IP地址为:192.168.10.102/243.在 Router-A中使用 show running-config 命令察看设备串行接口的配置标识并记录4.在 Router-B中使用 show running-config 命令察看设备串行接口的配置标识并记录5.封装 HDLC 协议①.在 Router-A中使用 show interface serial */* 察看当前接口的状态并记录其封装协议类型和 UP/down 状态。
②.在 Router-B中使用 show interface serial */* 察看当前接口的状态并记录其封装协议类型和 UP/down 状态。
③.在 Router-A串行接口的配置模式下,配置时钟频率。
在 Router-A串行接口的配置模式下,配置时钟频率。
在 Router-A串行接口的配置模式下,配置时钟频率。
④.再次查看串行接口状态,直到端口状态稳定为 UP 状态六、实验步骤第一步:路由器恢复出厂默认值图8-1 路由器默认默认值第二步:设置Router-A接口地址及封装HDLC协议并设置时钟频率图8-2 Router-A的接口地址及封装HDLC协议第三步:查看Router-A的接口配置结果图8-3 查看Router-A的接口配置 第四步:设置Router-B接口地址及封装HDLC协议图8-4 Router-B的接口地址及封装HDLC协议 第五步:查看Router-B的接口配置结果图8-5 查看Router-B的接口配置第六步:测试两台路由器串口之间的连通性图8-6 测试连通性七、注意事项和排错1.注意查看接口状态,接口和协议都必须是UP2.CR-V35FC所连接的接口为DCE,CR-V35MT所连接的接口为DTE 3.协议是DOWN,通常是封装不匹配、DCE时钟没有配置4.接口是DOWN,通常是线缆故障5.在实际工作中,DCE设备通常由服务提供商配置,本实验是模拟环境八、共同思考1.如果没有指明封装协议,默认的是什么协议?2.为什么要配置DCE的时钟频率?九、本次实验总结1设置HDLC协议封装的配置(Router-A)Router-A_config#interface serial 1/1Router-A_config_s1/1#encapsulation hdlcRouter-A_config_s1/1#physical-layer speed 640002设置PPP协议封装CHAP验证的配置(Router-B)Router-B_config#interface serial 0/2Router-B_config_s1/1#encapsulation hdlc3. 查看路由器接口状态①、查看快速以太网口Router-A #show interface fastethernet 0/0②、查看串口Router-A # show interface serial 1/14.在路由器上测试串口连通性Router-A #ping 192.168.10.1025.路由器恢复出厂默认值Router#delete 删除所有配置文件Router#reboot重新启动路由器************************************************************注:每次做完实验之后要把路由器恢复出厂默认值。
实验五、路由器广域网HDLC封装配置一、实验目的1.掌握广域网HDLC封装配置2.理解DCE、DTE3.理解封装匹配二、应用环境1.企业环境中异地的互连通常要经过第三方的网络,比如网通、电信等等,所以与局域网的配置不同2.广域网通常需要付费、带宽比较有限、可靠性相比局域网要低三、实验设备1.DCR-1751 两台2.CR-V35MT 一条3.CR-V35FC 一条四、实验拓扑五、实验要求Router-A Router-B接口IP地址接口IP地址DCE 192.168.1.1 S1/0DTE 192.168.1.2 S1/1六、实验步骤第一步Router-A的配置Router>enable !进入特权模式Router #config !进入全局配置模式Router-A !修改机器名Router _config#hostnameRouter-A_config#interface s1/1 !进入接口模式Router-A_config_s1/0#ip address 192.168.1.1 255.255.255.0 !配置IP地址hdlc !封装HDLC协议Router-A_config_s1/1#encapsulationRouter-A_config_s1/0#physical-layer speed 64000 !配置DCE时钟频率shutdownRouter-A_config_s1/0#noRouter-A_config_s1/0#^Z !按ctrl + z进入特权模式第二步:查看配置interfaces1/1 !查看接口状态Router-A#showSerial1/0 is up, line protocol is down!对端没有配置,所以协议是DOWN Mode=Sync DCE Speed=64000 !查看DCEDTR=UP,DSR=UP,RTS=UP,CTS=DOWN,DCD=UPInterface address is 192.168.1.1/24!查看IP地址MTU 1500 bytes, BW 64 kbit, DLY 2000 usecEncapsulation prototol HDLC, link check interval is 10 sec !查看封装协议Octets Received0, Octets Sent 0Frames Received 0, Frames Sent 0, Link-check Frames Received0Link-check Frames Sent 89, LoopBack times 0Frames Discarded 0, Unknown Protocols Frames Received 0, Sent failuile 0Link-check Timeout 0, Queue Error 0, Link Error 0,60 second input rate 0 bits/sec, 0 packets/sec!60 second output rate 0 bits/sec, 0 packets/sec!0 packets input, 0 bytes, 8 unused_rx, 0 no buffer0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort8 packets output, 192 bytes, 0 unused_tx, 0 underrunserror:0 clock, 0 gracePowerQUICC SCC specific errors:0 recv allocb mblk fail 0 recv no buffer0 transmitter queue full 0 transmitter hwqueue_full第三步:Router-B的配置Router>enable !进入特权模式Router #config !进入全局配置模式Router-B !修改机器名Router _config#hostnameRouter-B_config#interface s1/0 !进入接口模式Router-B_config_s1/0#ip address 192.168.1.2 255.255.255.0 !配置IP地址hdlc !封装HDLC协议Router-B_config_s1/1#encapsulationshutdownRouter-B_config_s1/0#noRouter-B_config_s1/0#^Z !按ctrl + z进入特权模式第四步:查看配置s1/0 !查看接口状态Router-A#showinterfaceSerial1/0 is up, line protocol is up!接口和协议都是upMode=Sync DTE!查看DTEDTR=UP,DSR=UP,RTS=UP,CTS=DOWN,DCD=UPInterface address is 192.168.1.2/24!查看IP地址MTU 1500 bytes, BW 64 kbit, DLY 2000 usecEncapsulation prototol HDLC, link check interval is 10 sec !查看封装协议Octets Received0, Octets Sent 0Frames Received 0, Frames Sent 0, Link-check Frames Received0Link-check Frames Sent 89, LoopBack times 0Frames Discarded 0, Unknown Protocols Frames Received 0, Sent failuile 0Link-check Timeout 0, Queue Error 0, Link Error 0,60 second input rate 0 bits/sec, 0 packets/sec!60 second output rate 0 bits/sec, 0 packets/sec!0 packets input, 0 bytes, 8 unused_rx, 0 no buffer0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort8 packets output, 192 bytes, 0 unused_tx, 0 underrunserror:0 clock, 0 gracePowerQUICC SCC specific errors:0 recv allocb mblk fail 0 recv no buffer0 transmitter queue full 0 transmitter hwqueue_full第五步:测试连通性Router-A#ping 192.168.1.2PING 192.168.1.2 (192.168.1.2): 56 data bytes!!!!!--- 192.168.1.2 ping statistics ---5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 20/22/30 ms七、注意事项和排错1.注意查看接口状态,接口和协议都必须是UP2.CR-V35FC所连的接口为DCE,CR-V35MT所连的接口为DTE3.协议是DOWN,通常是封装不匹配、DCE时钟没有配置4.接口是DOWN,通常是线缆故障5.在实际工作中,DCE设备通常由服务提供商配置,本实验是模拟环境八、配置序列路由器A的序列Router-A#show running-configBuilding configuration...Current configuration:!!version 1.3.2Eservice timestamps log dateservice timestamps debug dateno service password-encryption!hostname Router-A !查看机器名!!interface FastEthernet0/0255.255.255.0 !查看IP地址ip address 192.168.2.1no ip directed-broadcast!< 省略….>interface Serial1/1255.255.255.0 !查看IP地址ip address 192.168.1.1no ip directed-broadcastphysical-layer speed 64000!interface Async0/0no ip addressno ip directed-broadcast九、共同思考1.如果没有指明封装协议,默认的是什么协议?2.为什么要配置DCE的时钟频率?十、课后练习请将A的封装改为PPP,观察PING的结果十一、相关命令详解encapsulation使用encapsulation接口配置命令设置接口使用的封装协议。
HDLC实验一、实验拓扑图二、本实验中的路由器的IP 地址规划如表所示三、实验目的通过HDLC 协议实现RTA 与RTB 广域网互通四、实验步骤1、运行超级终端并初始化路由器配置将 PC(或终端)的串口通过标准Console 电缆与交换机的Console 口连接。
电缆的RJ-45 头一端连接路由器的Console 口;9 针RS-232 接口一端连接计算机的串行口。
检查设备的软件版本及配置信息,确保各设备软件版本符合要求,所有配置为初始状态。
2、依据规划建立两台路由器之间的物理连接将两台路由器的 S1/0 接口通过V35 电缆连接,然后在RTA 上执行命令show interface serial1/0,根据其输出信息可以看到:R3#show inter s1/0Serial1/0 is administratively down, line protocol is downHardware is M4TMTU 1500 bytes, BW 1544 Kbit/sec, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation HDLC, crc 16, loopback not set在 RTB 上执行同样的命令并查看如上信息3、配置路由器广域网上封装 HDLC 协议在 RTA 上配置广域网接口S1/0 封装HDLC 协议R1>enableR1#conf terR1(config)#inter s1/0R1(config-if)#clock rate 56000R1(config-if)#ip add 10.1.1.1 255.255.255.0 R1(config-if)#no shutdownR1#show interfaces s1/0在 RTB 上完成广域网接口HDLC 协议封装的配置R2>enableR2#conf terR2(config)#inter s1/0R2(config-if)#ip add 10.1.1.2 255.255.255.0 R2(config-if)#no shutdownR2(config-if)#exitR2#show interfaces s1/0。
目录项目一路由器的命令行界面配置 (2)项目二路由器的全局配置 (4)项目三路由器端口的基本配置 (6)项目四查看路由器的系统和配置信息 (9)项目五静态路由 (12)项目六 RIP 路由协议 (18)项目一路由器的命令行界面配置【实验名称】使用命令行界面【实验目的】掌握路由器命令行各种操作模式的区别,以及模式之间的切换。
【背景描述】你是某公司新进的网管,公司要求你熟悉网络产品,公司采用全系列锐捷或CISCO网络产品,首先要求你登录路由器,了解、掌握路由器的命令行操作。
【技术原理】路由器的管理方式基本分为两种:带内管理和带外管理。
通过路由器的Console口管理交换机属于带外管理,不占用路由器的网络接口,但特点是线缆特殊,需要近距离配置。
第一次配置路由器时必须利用Console进行配置,使其支持telnet远程管理。
路由器的命令行操作模式,主要包括:用户模式、特权模式、全局配置模式、端口模式等等几种。
用户模式进入路由器后得到的第一个操作模式,该模式下可以简单查看路由器的软、硬件版本信息,并进行简单的测试。
用户模式提示符为Red-Giant>特权模式由用户模式进入的下一级模式,该模式下可以对路由器的配置文件进行管理,查看路由器的配置信息,进行网络的测试和调试等。
特权模式提示符为Red-Giant#全局配置模式属于特权模式的下一级模式,该模式下可以配置路由器的全局性参数(如主机名、登录信息等)。
在该模式下可以进入下一级的配置模式,对路由器具体的功能进行配置。
全局模式提示符为Red-Giant (config)#端口模式属于全局模式的下一级模式,该模式下可以对路由器的端口进行参数配置。
Exit命令是退回到上一级操作模式,end命令是直接退回到特权模式交换机命令行支持获取帮助信息、命令的简写、命令的自动补齐、快捷键功能。
【实现功能】熟练掌握路由器的命令行操作模式【实验设备】路由器(1台)【实验拓扑】RouterAPC Com Console【实验步骤】步骤1.路由器命令行操作模式的进入。
路由器经常用于构建广域网,广域网链路的封装和以太网上的封装有着非常大的差别。
常见的广域网封装有HDLC、PPP、Frame-relay 等,本章介绍HDLC 和PPP。
相对而言,PPP比起HDLC 有较多的功能。
HDLC 和PPP 简介HDLC 介绍HDLC 是点到点串行线路上(同步电路)的帧封装格式,其帧格式和以太网帧格式有很大的差别,HDLC 帧没有源MAC 地址和目的MAC 地址。
Cisco 公司对HDLC 进行了专有化,Cisco的HDLC 封装和标准的HDLC 不兼容。
如果链路的两端都是Cisco 设备,使用HDLC 封装没有问题,但如果Cisco 设备与非Cisco 设备进行连接,应使用PPP 协议。
HDLC 不能提供验证,缺少了对链路的安全保护。
默认时,Cisco 路由器的串口是采用Cisco HDLC 封装的。
如果串口的封装不是HDLC,要把封装改为HDLC 使用命令“encapsulation hdlc”。
PPP 介绍1. PPP 概述和HDLC 一样,PPP 也是串行线路上(同步电路或者异步电路)的一种帧封装格式,但是PPP 可以提供对多种网络层协议的支持。
PPP 支持认证、多链路捆绑、回拨、压缩等功能。
PPP 经过4 个过程在一个点到点的链路上建立通信连接:•链路的建立和配置协调:通信的发起方发送LCP 帧来配置和检测数据链路•链路质量检测:在链路已经建立、协调之后进行,这一阶段是可选的•网络层协议配置协调:通信的发起方发送NCP 帧以选择并配置网络层协议•关闭链路:通信链路将一直保持到LCP 或NCP 帧关闭链路或发生一些外部事件2. PPP 认证:PAP 和CHAP(1)PAP——密码验证协议PAP(Password Authentication Protocol)利用2 次握手的简单方法进行认证。
在PPP 链路建立完毕后,源节点不停地在链路上反复发送用户名和密码,直到验证通过。
广域网协议的封装【实验名称】广域网协议的封装【实验目的】掌握广域网协议的封装类型和封装方法【背景描述】你是公司的网络管理员,两个分公司之间希望能够申请一条广域网专线进行连接。
公司现有锐捷路由器两台,希望你了解该设备的广域网接口所支持的协议,以确定选择哪一种广域网链路。
【技术原理】常见广域网专线技术有,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线缆的两个端口封装协议一致,否则无法建立链路。
路由器动态路由配置和⼴域⽹链路层协议的配置实验报告实验四路由器动态路由配置和⼴域⽹链路层协议的配置【实验类型】验证性实验【实验时间】2学时。
可以将实验三和实验四同时完成。
【背景描述】学校两个校区各是⼀个独⽴的局域⽹,为了能共享资源,每个校区出⼝利⽤⼀台路由器进⾏连接,两台路由器间申请了⼀条2M的DDN专线进⾏相连。
【实验⽬的】进⼀步熟悉路由器的基本配置;掌握路由器动态路由(OSPF、RIP)的配置,选作RIP动态路由的配置;掌握路由器⼴域⽹协议的封装类型和封装⽅法,掌握的⼴域⽹PPP协议的配置。
【实验内容】⼀、路由器动态路由配置⼆、⽤PPP协议封装路由器⼴域⽹上IP包的配置【实验原理】动态路由:通过在路由器上配置运⾏动态路由协议,路由器之间通过交换路由信息互相学习,产⽣不直接连接的⽹段的路由信息。
⽤于⼤规模⽹络。
OSPF协议,属于内部⽹关路由协议,能够适应各种规模的⽹络环境,是链路状态(link-state)协议。
OSPF协议通过向全⽹扩散本设备的链路状态信息,使⽹络中每台设备最终同步⼀个具有全⽹链路状态的数据库(LSDB),然后路由器采⽤SPF算法,以⾃⼰为根,计算到其他⽹络的最短路径,形成路由信息。
在⼤模型的⽹络环境中,OSPF⽀持区域的划分。
划分区域时必须存在area0(⾻⼲区域)。
其他区域和⾻⼲区域直接相连,或通过虚链路的⽅式连接。
RIP是应⽤较早的内部⽹关协议,适⽤于⼩型同类⽹络,是典型的距离⽮量协议。
RIP协议以跳数衡量路径开销,规定最⼤跳数为15。
RIP协议有两个版本RIPv1和RIPv2。
RIPv1属于有类路由协议,不⽀持VLSM (变长⼦⽹掩码),以⼴播的形式进⾏路由信息的更新的;更新周期为30秒。
RIPv2属于⽆类路由协议,⽀持VLSM,以组播的形式进⾏路由信息的更新的,组播地址是224.0.0.9。
RIPv2还⽀持基于端⼝的认证,提⾼⽹络的安全性。
在互连⽹络的实通信中,IP包的传送需要物理⽹络的传送协议(称为⼴域⽹封装)实现。