《广域网链路层协议配置实验.docx》由会员分享,可在线阅读,更多相关《广域网链路层协议配置实验.docx(7页珍藏版)》请在三一办公上搜索。
1、实验 3 广域网链路层协议配置实验实验目的掌握HDLC、PPP、FR的配置实验设备Cisco 2621, Quidway 28系列路由器实验概述1. 实验环境路由器各个接口的IP地址设置如下:RARBF0/0202.0.0.1/24202.0.1.1/24S0/0192.0.0.1/24192.0.0.2/24PC机的IP地址和缺省网关的IP地址如下:PCAPCBIP地址202.0.0.2/24202.0.1.2/24Gateway202.0.0.1/24202.0.1.1/24为了保证配置不受影响,请在实验前清除路由器的所有配置有重新启动(Cisco的路由器删除startup-config
2、文件,Quidway的路由器删除 saved-config文件)。2. 实验步骤1)配置路由器的接口IP地址和主机地址,修改路由器名称为RA和RB;2)在路由器的串口上配置HDLC协议,查看路由器的配置文件,并测试PCA和PCB之间的连通性;3)在路由器的串口上配置无验证的PPP协议,查看路由器的配置文件,并测试PCA和PCB之间的连通性;4)在路由器的串口上配置PAP认证的PPP协议,查看路由器的配置文件,并测试PCA和PCB之间的连通性;5)在路由器的串口上配置CHAP认证的PPP协议,查看路由器的配置文件,并测试PCA和PCB之间的连通性;6)在路由器的串口上配置帧中继协议,查看路由器的
3、配置文件,并测试PCA和PCB之间的连通性。实验内容1 配置HDLC协议,测试PCA和PCB之间的连通性,填写表1。在端口状态下命令:link-protocol hdlc (Quidway命令) encapsulation hdlc (Cisco命令)表1实验步骤观察内容显示路由器的串口状态Command: show interface s0/0或:display interface s0/0Serial0/0 is up, line protocol is down Hardware is PowerQUICC Serial Internet address is 192.0.0.1/24
4、MTU 1500 bytes, BW 2000000 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation HDLC, loopback not set测试PC1/PC2连通状态Command: pingPinging 202.0.1.2 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 202.0.1.2
5、:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), 2 配置无验证的PPP协议,测试PCA和PCB之间的连通性,填写表2。在端口状态下命令:link-protocol ppp(Quidway命令)encapsulation ppp (Cisco命令)表2实验步骤观察内容显示路由器的串口状态Command: show interface s0/0或:display interface s0/0 Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial Inter
6、net address is 192.0.0.1/24 MTU 1500 bytes, BW 2000000 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation PPP, loopback not set测试PC1/PC2连通状态Command: pingPinging 202.0.1.2 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Pi
7、ng statistics for 202.0.1.2: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),3 配置采用PAP验证的PPP协议,PAP验证是单向验证,RA作为主验证方,RB作为被验证方,是明文验证,配置中要注意双方的密码必须一致且区分大小写。配置完成后在串口上要shutdown接口后再no shutdown(Cisco命令)/ undo shutdown(Quidway命令)使之生效后才能检测是否配置正确。验证方配置a) 配置验证方式ppp authentication-mode papb) 配置用户列表RAlocal-
8、user user-BRApassword simple sharepassRAservice-type ppp被验证方配置c) 配置PAP用户名ppp pap local-user username password simple|cipher password在Cisco路由器中用到的命令格式如下:Router(config)#hostname name要验证方的用户名和口令Router(config)#username name password passwordEnables PAP / CHAP 认证Router(config-if)#ppp authentication chap
9、| chap pap | pap chap | pap 测试PCA和PCB之间的连通性,填写表3。表3实验步骤观察内容显示路由器的串口状态Command: show interface s0/0或:display interface s0/0Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial Internet address is 192.0.0.1/24 MTU 1500 bytes, BW 2000000 Kbit, DLY 20000 usec, reliability 255/255, txload 1/
10、255, rxload 1/255 Encapsulation PPP, loopback not set测试PC1/PC2连通状态Command: pingPinging 202.0.1.2 with 32 bytes of data:Request timed out.Request timed out.Request timed out.Request timed out.Ping statistics for 202.0.1.2:Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),4 配置采用CHAP验证的PPP协议,CHAP验证
11、是双向验证,是密文验证。配置完成后在串口上要shutdown接口后再no shutdown(Cisco命令)/ undo shutdown(Quidway命令)使之生效后才能检测是否配置正确。主验证方配置:a) 配置本地验证对端(方式为CHAP)ppp authentication-mode chapb) 配置本地名称ppp chap user RAc) 将对端用户名和共享密码加入本地用户列表RAlocal-user RBRA-luser-RBpassword simple sharepassRA-luser-RBservice-type ppp被验证方配置:a) 本地名称/密码:RB-Ser
12、ial0/0 ppp chap user RBb) 对端用户名和共享密码(和主验证方配置的密码要一样才能通信)RBlocal-user RARB-luser-RApassword simple sharepassRB-luser-RAservice-type ppp测试PCA和PCB之间的连通性,填写表3。表4实验步骤观察内容显示路由器的串口状态Command: show interface s0/0或:display interface s0/0Serial0/0 is up, line protocol is up Hardware is PowerQUICC Serial Interne
13、t address is 192.0.0.1/24 MTU 1500 bytes, BW 2000000 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation PPP, loopback not set Keepalive set (10 sec) LCP Open Open: IPCP, CDPCP测试PC1/PC2连通状态Command: pingype escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192
14、.0.0.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms5在路由器的串口上配置帧中继协议,查看路由器的配置文件,并测试PCA和PCB之间的连通性。1) 封装接口 interface serial 0/0ip address 202.38.163.251 255.255.255.0Quidway命令:link-protocol fr Cisco命令:encap fr2)配置帧中继接口的终端类型fr interface-type dce (一端配DCE,另一端
15、配DTE)3)选择LMI类型fr lmi type ansi|nonstandard|q933a默认LMI协议类型为q933a。4)在DCE上分配DLCIfr dlci 1005)启动inverse-arp逆向地址解析协议fr inarp(也可以用静态映射协议 fr map ip 202.38.163.252 dlci 100)表5实验步骤观察内容显示路由器的串口状态Command: show interface s0/0或:display interface s0/0Serial0/0 is up, line protocol is up Hardware is PowerQUICC Ser
16、ial Internet address is 192.0.0.2/24 MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec, reliability 255/255, txload 1/255, rxload 1/255 Encapsulation FRAME-RELAY, loopback not set Keepalive set (10 sec) LMI enq sent 44, LMI stat recvd 0, LMI upd recvd 0 LMI enq recvd 88, LMI stat sent 20, LMI upd sent 0,
17、 DCE LMI up LMI DLCI 0 LMI type is CCITT frame relay DCE Broadcast queue 0/64, broadcasts sent/dropped 1/0, interface broadcasts 0 Last input 00:00:07, output 00:00:07, output hang never Last clearing of show interface counters 00:11:58 Input queue: 0/75/0/0 (size/max/drops/flushes); Total output dr
18、ops: 0 Queueing strategy: weighted fair Output queue: 0/1000/64/0 (size/max total/threshold/drops) Conversations 0/5/256 (active/max active/max total) Reserved Conversations 0/0 (allocated/max allocated) Available Bandwidth 1158 kilobits/sec 5 minute input rate 0 bits/sec, 0 packets/sec 5 minute output rate 0 bits/sec, 0 packets/sec 112 packets input, 2228 bytes, 0 no buffer测试PC1/PC2连通状态Command: pingRB#ping 202.0.0.2Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 202.0.0.2, timeout is 2 seconds:!Success rate is 100 percent (5/5), round-trip min/avg/max = 180/183/184 ms