实验三PAP、chap认证
- 格式:ppt
- 大小:40.50 KB
- 文档页数:12
信息学院网络系统集成课程实践 实验报告实验名称 PPP 的PAP 和CHAP 认证 实验日期:2015年04月15日一、实验目的:掌握PPP PAP 认证和PPP CHAP 认证的过程及配置。
二、实验内容(1)在路由器上配置PPP PAP 认证; (2)在路由器上配置PPP CHAP 认证。
三、实验要求(1)写出在路由器上配置PPP PAP 认证的过程; (2)写出在路由器上配置PPP CHAP 认证的过程四、实验设备(1)路由器Router-2811两台; (2)DCE 串口线五、实验步骤(一)PPP PAP 认证(本实验要求配置路由器R1和路由器R2双向PAP 验证)实验网络拓补结构设计1、配置路由器R1姓名: 班级: 学号:年级: 12级 指导教师:成绩:Serial0/3/0 Using hostname from interface PAPSerial0/3/0 Using password from interface PAPSerial0/3/0 PAP: O AUTH-REQ id 17 len 15Serial0/3/0 PAP: Phase is FORWARDING, Attempting ForwardSerial0/3/0 PAP: I AUTH-REQ id 17 len 15Serial0/3/0 PAP: Authenticating peerSerial0/3/0 PAP: Phase is FORWARDING, Attempting ForwardSerial0/3/0 Using hostname from interface PAPSerial0/3/0 Using password from interface PAPSerial0/3/0 PAP: O AUTH-REQ id 17 len 15Serial0/3/0 PAP: Phase is FORWARDING, Attempting Forward%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0, changed state to upR1(config)#int s 0/3/0R1(config-if)#no ppp pap sent-username R1 password cisco//修改路由器R1上的密码,是路由器R1和R2的密码不一致,可以看到,认证将失败R1#debug ppp authenticationPPP authentication debugging is onR1#conf tEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int s 0/3/0R1(config-if)#shutdownR1(config-if)#%LINK-5-CHANGED: Interface Serial0/3/0, changed state to administratively down%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/3/0, changed state to down R1(config-if)#no shutdown当发出no shutdown命令时,出现了死循环,用Ctrl+c强制退出并用end结束。
PPP协议的PAP和CHAP认证实验人:实验名称:PPP协议的PAP和CHAP认证实验目的:掌握PPP协议的PAP和CHAP认证的配置方法实验原理:PAP认证:用小凡搭建如图实验环境,然后配置各路由器的S0/0端口IP和PPP封装协议,再配置PAP认证,当只配置R1PAP认证时,不能ping通对方(192.168.1.2),再配置R2的发送PAP认证信息时,即可ping通(单向);在R1和R2上,分别配置PAP认证和发送PAP认证信息,此时,即可ping通R2(192.168.1.2),即实验成功!(双向)CHAP认证:用小凡搭建如图实验环境,然后配置各路由器的S0/0端口IP和PPP封装协议,再配置CHAP认证,当只配置R1 CHAP认证时,不能ping通对方(192.168.1.2),再配置R2的发送CHAP 认证信息时,即可ping通(单向);在R1和R2上,分别配置CHAP认证和发送CHAP认证信息,此时,即可ping通R2(192.168.1.2),即实验成功(双向认证)自动协商IP地址:在R1上,配置分配IP地址(端口下,命令peer default ip address 192.168.1.100),然后在R2上,配置自动协商IP地址(在端口下,命令ip add negotiated),此时在R2可以获得192.168.1.100的IP地址,即实验成功!头部压缩:在R1和R2上,配置头部压缩功能,再ping 192.168.1.2,使其用数据流,用show compress 命令查看压缩情况,即实验成功!实验过程:PAP单向认证:⑴用小凡搭建如图实验环境,如图示:⑵在R1的S0/0上,配置IP,如图示:⑶在R2的S0/0上,配置IP,如图示:⑷此时,即可ping通192.168.1.2 如图示:⑸在R1上,配置PPP协议,如图示:⑹在R2上,配置PPP协议,如图示:⑺此时,又可ping通192.168.1.2 如图示:⑻在R1上,配置PAP认证,如图示:⑼在R2上,配置发送PAP认证信息,如图示:⑽此时,又可以ping通192.168.1.2 如图示:PAP双向认证:⒈在R1上,配置PAP认证,如图示:⒉在R2上,配置发送PAP认证信息,如图示:⒊配置完后,即可ping通192.168.1.2,即单向认证,如图示:⒋在R2上,配置PAP认证,如图示:⒌此时,不能ping 通192.168.1.2 如图示:⒍在R1上,配置发送PAP认证信息,此时,可以又ping通192.168.1.2 如图示:CHAP单向认证:Ⅰ在R1上,配置CHAP认证,如图示:Ⅱ在R2上,配置发送CHAP认证信息,如图示:Ⅲ此时,即可ping通192.168.1.2 ,即CHAP 的单向认证成功!如图示:CHAP双向认证:①在R1上,配置CHAP认证,如图示:②在R2上,配置发送CHAP认证信息,如图示:③在R2上,配置CHAP认证,如图示:④此时,不能ping通192.168.1.2 原因为没有在R1上,配置发送CHAP认证信息,如图示:⑤在R1上,配置发送CHAP认证信息,此时,可以ping通192.168.1.2 ,即配置CHAP双向认证成功!如图示:自动协商IP地址:㈠在原有的实验环境下,去掉R2上的S0/0端口的IP地址,如图示:㈡在R1上的S0/0端口下,配置分配的IP地址为192.168.1.100 如图示:㈢在R2上的S0/0 端口上,配置自动协商IP地址,如图示:㈣此时,在R2上,分配到192.168.1.100的IP地址,即实验成功,如图示:头部压缩:①在R1上,开启头部压缩功能,如图示:②在R2上,开启头部压缩功能,如图示:③此时,ping 192.168.1.100 ,使其有数据通过,用命令即可查看到压缩的情况,(命令show compress)如图示:总结:在实验中,CHAP认证的步骤:处理CHAP挑战数据包(1、将序列号放入MD5散列生成器2、将随机数放入MD5散列生成器3、用访问服务器的认证名和数据库进行比较4、将密码放入MD5散列生成器);当显示串行接口时,常见以下状态: 1、Serial0/0 is up, line protocol is up //链路正常2、Serial0/0 is administratively down, line protocol is down //没有打开该接口,执行no sh 打开即可3、Serial0/0 is up, line protocol is down //物理层正常,数据链路层有问题,通常是没有配置时钟,两端封装不匹配或PPP认证错误4、Serial0/0 is down, line protocol is down //物理层故障,通常是连线问题;PAP 不支持密码的加密,压缩,link绑定,设定最大传输单元等,CHAP 支持以上内容;PAP和CHAP验证发送的信息内容为验证路由器数据库中的用户名和密码;在CHAP中,被验证方不明确定义发送主机名来验证时,默认发送该路由器的主机名;配置PAP双向认证时,用户名和密码都可以不一样,但配置CHAP双向认证时,要保证两台路由器的密码一致;。
PAP认证和CHAP认证概述一、PAP认证协议(PasswordAuthenticationProtocol,口令认证协议):PAP认证过程非常简单,二次握手机制。
使用明文格式发送用户名和密码。
发起方为被认证方,可以做无限次的尝试(暴力破解)。
只在链路建立的阶段进行PAP认证,一旦链路建立成功将不再进行认证检测。
目前在PPPOE拨号环境中用的比较常见。
PAP认证过程:PAP认证过程图首先被认证方向主认证方发送认证请求(包含用户名和密码),主认证方接到认证请求,再根据被认证方发送来的用户名去到自己的数据库认证用户名密码是否正确,如果密码正确,PAP认证通过,如果用户名密码错误,PAP认证未通过。
二、CHAP认证协议(ChallengeHandshakeAuthenticationProtocol,质询握手认证协议)CHAP认证过程比较复杂,三次握手机制。
使用密文格式发送CHAP认证信息。
由认证方发起CHAP认证,有效避免暴力破解。
在链路建立成功后具有再次认证检测机制。
目前在企业网的远程接入环境中用的比较常见。
CHAP认证过程:CHAP认证第一步:主认证方发送挑战信息【01(此报文为认证请求)、id(此认证的序列号)、随机数据、主认证方认证用户名】,被认证方接收到挑战信息,根据接收到主认证方的认证用户名到自己本地的数据库中查找对应的密码(如果没有设密码就用默认的密码),查到密码再结合主认证方发来的id和随机数据根据MD5算法算出一个Hash值。
CHAP认证过程图:CHAP认证第二步:被认证方回复认证请求,认证请求里面包括【02(此报文为CHAP认证响应报文)、id(与认证请求中的id相同)、Hash值、被认证方的认证用户名】,主认证方处理挑战的响应信息,根据被认证方发来的认证用户名,主认证方在本地数据库中查找被认证方对应的密码(口令)结合id找到先前保存的随机数据和id根据MD5算法算出一个Hash值,与被认证方得到的Hash值做比较,如果一致,则认证通过,如果不一致,则认证不通过。
福建工程学院国脉信息学院实验指导书实验一抓PPP(PAP/CHAP)包及协议分析基础一、实验目的1、掌握抓包软件Wireshark的应用2、掌握交换机路由器仿真环境中抓包工具的应用3、掌握抓PPP包并能进行分析4、理解PAP、CHAP协议原理二、实验环境Internet协议分析仿真实验平台(Dynamips、SecureCRT等)三、实验任务1、Wireshark在Windows中的安装与应用2、Dynamips的安装与应用2、路由器串口间的PPP包并进行分析3、通过抓获的数据包分析PAP、CHAP协议的原理四、实验步骤1、Wireshark在Windows中的安装与应用打开wireshark-win32-1..4.9中文版,进行安装。
点击“next”,进行下一步。
点击“I Agree”,进行下一步。
点击“next”,进行下一步。
点击“Install”,进行安装。
点击“next”,进行下一步。
完成安装,运行程序。
3、Dynamips的安装与应用点击dynamic安装包,进入安装界面。
点击next,进入下一步。
同意安装协议,点击I Agree 进入下一步。
使用默认安装名Dynagen,点击instal选项进行安装。
安装已完成,点击Finish完成安装。
安装完成后可以在桌面上看到以下程序。
4.添加硬件1)打开“控制面板”,双击:添加硬件点击next,进入下一步。
点击next,进入下一步。
选择“添加新的硬件设备”,点击“下一步”。
选择手动安装,点击“下一步”。
选择“网络适配器”进行安装,点击“下一步”点击“完成”,添加硬件成功。
打开本地连接2,先“停用”,再“启用”以记事本方式打开1).将路由器的运行目录定位:按上图的标记1,2在D:\创建文件夹sikeVlab;在文件夹sikeVlab中创建两个文件夹temp,IOS;在文件夹temp中创建文件夹PPP;2).把放进文件夹PPP中。
打开Network device list,将“3”部分替代为下面内容。
PAP、CHAP实验一、实验拓扑图二、本实验中的路由器的IP 地址规划如表所示三、实验目的通过PAP、CHAP实现在PPP广域网中的认证四、实验步骤1、运行超级终端并初始化路由器配置将 PC(或终端)的串口通过标准Console 电缆与交换机的Console 口连接。
电缆的RJ-45 头一端连接路由器的Console 口;9 针RS-232 接口一端连接计算机的串行口。
检查设备的软件版本及配置信息,确保各设备软件版本符合要求,所有配置为初始状态。
2、依据规划建立两台路由器之间的物理连接3、PAP认证配置1)配置PPP,实现广域网互通R1>enableR1#conf terEnter configuration commands, one per line. End with CNTL/Z.R1(config)#int s1/0R1(config-if)#clock rate 56000R1(config-if)#encapsulation pppR1(config-if)#ip add 192.168.3.1 255.255.255.0R1(config-if)#no shutdownR2>enableR2#conf terEnter configuration commands, one per line. End with CNTL/Z.R2(config)#inter s1/0R2(config-if)#encapsulation pppR2(config-if)#ip add 192.168.3.2 255.255.255.0R2(config-if)#no shutdownR2#ping 192.168.3.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.3.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 28/46/68ms2)PAP单向认证通过在R2上设置R1的用户名和密码来实现PAP的单向认证R2#conf terEnter configuration commands, one per line. End with CNTL/Z.R2(config)#username r1 password ccnaR2(config)#inter s1/0R2(config-if)#ppp authentication papR1#conf terEnter configuration commands, one per line. End with CNTL/Z.R1(config)#inter s1/0R1(config-if)#ppp pap sent-username r1 password ccna在R1上关闭并开启S1/0端口,在R2上debug这个过程R1(config)#inter s1/0R1(config-if)#shutdownR2#debug ppp authenticationPPP authentication debugging is onR1(config-if)#no shutdownR2#*May 16 11:22:08.507: Se1/0 PAP: I AUTH-REQ id 1 len 12 from "r 1"*May 16 11:22:08.507: Se1/0 PAP: Authenticating peer r1*May 16 11:22:08.523: Se1/0 PPP: Sent PAP LOGIN Request*May 16 11:22:08.527: Se1/0 PPP: Received LOGIN Response PASS*May 16 11:22:08.603: Se1/0 PAP: O AUTH-ACK id 1 len 5R2#*May 16 11:22:08.619: %LINEPROTO-5-UPDOWN: Line protocol on Int erface Serial1/0, changed state to upR2#no debug all2)PAP双向认证通过在R1和R2上分别设置对方的用户名和密码来实现PAP的双向认证R1#conf terEnter configuration commands, one per line. End witR1(config)#username r2 password ccieR1(config)#inter s1/0R1(config-if)#ppp authentication papR1(config-if)#*May 16 11:29:46.075: %LINEPROTO-5-UPDOWN: Line prot changed state to downR2#conf terEnter configuration commands, one per line. End with CNTL/Z.R2(config)#inter s1/0R2(config-if)#ppp pap sent-username r2 password ccieR2(config-if)#*May 16 11:30:57.223: %LINEPROTO-5-UPDOWN: Line protocol onInterface Serial1/0, changed state to upR1#show runusername r2 password 0 ccieR2#show runusername r1 password 0 ccna4、CHAP认证配置R2(config)#username r1 password ccieR2(config)#inter s1/0R2(config-if)#ppp authentication chapR2(config-if)#ppp chap hostname r2R2(config-if)#ppp chap password ccieR1(config)#username r2 password ccieR1(config)#inter s1/0R1(config-if)#ppp authentication chapR1(config-if)#ppp chap hostname r1 R1(config-if)#ppp chap password ccie。
cisco ppp认证方式(pap、chap认证)一、实验拓扑二、实验要求:1、要求配置ppp协议2、分别用pap、chap认证3、配置总部的路由器给分部的路由器分配ip地址,并且从地址池中分配,4、pc1最终能ping铜pc2三、实验步骤:1、配置各路由器接口的ip地址如图---2、封装ppp协议R1(config)#interface s1/0R1(config-if)#encapsulation pppR1(config-if)#clock rate 64000R1(config-if)#ip address 192.168.2.1 255.255.255.0R1(config-if)#no shutR2(config)#interface s1/0R2(config-if)#encapsulation pppR2(config-if)#no shutR2(config-if)#clock rate 64000 配置DCE端时钟频率3、配置IP地址池协商,并从地址池中获取R1(config)#interface s1/0R1(config-if)#peer default ip address pool aaaR1(config-if)#ip local pool aaa 192.168.2.2 192.168.2.10R2(config)#interface s1/0R2(config-if)#ip address negotiated查看 s1/0接口的地址R2#show interface s1/0Serial1/0 is up, line protocol is upHardware is M4TInternet address is 192.168.2.2/32 如果获取不到地址将接shutdown 然后再 no shudownMTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation PPP, LCP OpenOpen: CDPCP, IPCP, crc 16, loopback not setKeepalive set (10 sec)4、启用rip协议并查看路由表R1(config)#router ripR1(config-router)#network 192.168.2.0R1(config-router)#network 192.168.1.0查看路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - m obile, B - BGPD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter arN1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-Iia - IS-IS inter area, * - candidate default, U - per-user so - ODR, P - periodic downloaded stati c routeGateway of last resort is not setC 192.168.1.0/24 is directly connected, FastEthernet0/0192.168.2.0/24 is variably subnetted, 2 subnets, 2 m asksC 192.168.2.2/32 is directly connected, Serial1/0C 192.168.2.0/24 is directly connected, Serial1/0R 192.168.3.0/24 [120/1] via 192.168.2.2, 00:00:47, Serial1/0R2(config)#router ripR2(config-router)#network 192.168.2.0R2(config-router)#network 192.168.3.0R2(config-router)#exit查看路由表R2#show ip routeCodes: C - connected, S - static, R - RIP, M - m obile, B - BGD - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inN1 - OSPF NSSA external type 1, N2 - OSPF NSSA externaE1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2ia - IS-IS inter area, * - candidate default, U - per-o - ODR, P - periodic downloaded stati c routeGateway of last resort is not set192.168.2.0/32 is subnetted, 2 subnetsC 192.168.2.2 is directly connected, Serial1/0C 192.168.2.1 is directly connected, Serial1/0C 192.168.3.0/24 is directly connected, FastEthernet0/05、配置PAP认证R1(config)#username abc password 0 123R1(config)#interface s1/0R1(config-if)#ppp authentication papR2(config)#interface s1/0R2(config-if)#ppp pap sentR2(config-if)#ppp pap sent-usernam e abc password 0 123查看show runinterface Serial1/0ip address negotiatedencapsulation pppserial restart-delay 0clockrate 64000ppp pap sent-username abc password 0 1236、配置chap认证R1(config)#username abc password 0 123 以对方的主机名作为用户名,密码要和对方的路由器一致R1(config)#interface s1/0R1(config-if)#ppp authentication papR1(config-if)#exitR1(config)#username R2 password 0 123R1(config)#interface s1/0R1(config-if)#encapsulation pppR1(config-if)#ppp authentication chap chap 认证R2(config)#username R1 password 0 123R2(config)#interface s1/0R2(config-if)#encapsulation pppR2#debug ppp authenticationPPP authentication debugging is on 验证chap过程7、show run查看验证8、测试结果pc1 ping通pc2。
实验13 PAP 认证与CHAP 认证
一、实验目的:
1、掌握P A P 认证的配置与应用
2、掌握C H A P 认证的配置与应用
二、实验要求:
按照实验指导书完成实验
三、实验环境:
P C +P a c k e t T r a c e r 5.3
四、实验项目性质 验证性实验 五、实验要点
1、P A P 认证
2、C H A P 认证
六、实验内容
实验一、PAP 认证
实验拓扑图如下:
实验步骤:
说明:本实验在实验12的基础上完成。
首先配置路由器R1(远程路由器、被认证方)
在路由器R2(中心路由器,认证方)取得认证:
网
络
设备配置与维护-精
品课程
测试:
网
络
设备
配
置
与
维
护
-精
品
课
程
实验二、CHAP 认证
实验拓扑图如下:
实验过程:
说明:本实验在实验12的基础上完成。
网络设备配置与维护-精
品
课程
七、实验说明
1、思考题
2、实验报告要求:实验完毕后请按照要求填写实验报告
网络
设备配置与维护-精品课程。
路由器配置——PAP与CHAP认证⼀、实验⽬的:掌握PAP与CHAP认证配置⼆、拓扑图:三、具体步骤配置:(1)R1路由器配置:Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R1 --修改路由器名为R1R1(config)#interface l0 --进⼊回环端⼝R1(config-if)#ip address 192.168.1.254 255.255.255.0 --配置ip地址R1(config-if)#no shutdown --激活端⼝R1(config-if)#exit --返回上⼀级R1(config)#interface s0/0/0 --进⼊端⼝R1(config-if)#ip address 192.168.12.1 255.255.255.0 --为端⼝配置ip地址R1(config-if)#clock rate 64000 --设置时钟同步速率R1(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/0, changed state to downR1(config-if)#exit --返回上⼀级R1(config)#route rip --开启rip服务R1(config-router)#version 2 --版本2R1(config-router)#no auto-summary --关闭路由⾃动汇总R1(config-router)#network 192.168.1.0 --添加直连⽹段到ripR1(config-router)#network 192.168.12.0R1(config-router)#exit --返回上⼀级R1(config)#username abc1 password 456 --在中⼼路由器R1上为远程路由器R2设置⽤户名和密码R1(config)#interface s0/0/0 --进⼊端⼝R1(config-if)#encapsulation ppp --封装端⼝为pppR1(config-if)#ppp authentication pap --在R1上,配置PAP 验证R1(config-if)#ppp pap sent-username abc password 123 --在中⼼路由器R1上为远程路由器R2设置⽤户名和密码R1(config-if)#end --返回特权模式%LINK-5-CHANGED: Interface Loopback0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to upR1#%SYS-5-CONFIG_I: Configured from console by console%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up(2)R2路由器配置:Router>enable --进⼊特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R2 --修改路由器名为R2R2(config)#interface l0 --进⼊回环端⼝R2(config-if)#ip address 192.168.2.254 255.255.255.0 --配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#exit --返回上⼀级R2(config)#interface s0/0/0 --进⼊端⼝R2(config-if)#ip address 192.168.12.2 255.255.255.0 --为端⼝配置ip地址R2(config-if)#no shutdown --激活端⼝R2(config-if)#interface s0/0/1 --进⼊端⼝R2(config-if)#ip address 192.168.24.2 255.255.255.0 --为端⼝配置ip地址R2(config-if)#clock rate 64000 --设置时钟同步速率R2(config-if)#no shutdown --激活端⼝%LINK-5-CHANGED: Interface Serial0/0/1, changed state to downR2(config-if)#exit --返回上⼀级R2(config)#route rip --开启rip协议R2(config-router)#version 2 --版本2R2(config-router)#no auto-summary --关闭路由⾃动汇总R2(config-router)#network 192.168.2.0 --添加直连⽹段到ripR2(config-router)#network 192.168.12.0R2(config-router)#network 192.168.24.0R2(config-router)#exit --返回上⼀级R2(config)#username abc password 123 --在R2上为R1设置⽤户名和密码R2(config)#username R3 password cisco --在R2上为R3设置⽤户名和密码(注意两端密码要相同)R2(config)#interface s0/0/0 --进⼊端⼝R2(config-if)#encapsulation ppp --封装端⼝为PPP协议R2(config-if)#ppp authentication pap --配置PAP验证R2(config-if)#ppp pap sent-username abc1 password 456 --在R2上为R1设置⽤户名和密码R2(config-if)#interface s0/0/1 --进⼊端⼝R2(config-if)#encapsulation ppp --封装端⼝为ppp协议R2(config-if)#ppp authentication chap --配置chap验证R2(config-if)#end --返回特权模式R2#%LINK-5-CHANGED: Interface Loopback0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up%LINK-5-CHANGED: Interface Serial0/0/0, changed state to up%SYS-5-CONFIG_I: Configured from console by console%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up R2#%LINK-5-CHANGED: Interface Serial0/0/1, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/1, changed state to up(3)R3路由器配置:Router>enable --进特权模式Router#configure terminal --进⼊全局配置模式Enter configuration commands, one per line. End with CNTL/Z.Router(config)#hostname R3 --修改路由器名为R3R3(config)#interface l0 --进⼊回环端⼝R3(config-if)#ip address 192.168.3.254 255.255.255.0 --为端⼝配置ip地址R3(config-if)#no shutdown --激活端⼝R3(config-if)#exit --返回上⼀级R3(config)#interface S0/0/0 --进⼊端⼝R3(config-if)#ip address 192.168.24.1 255.255.255.0 --为端⼝配置ip地址R3(config-if)#no shutdown --激活端⼝R3(config-if)#exit --返回上⼀级R3(config)#route rip --开启rip协议R3(config-router)#version 2 --版本2R3(config-router)#no auto-summary --关闭路由⾃动汇总R3(config-router)#network 192.168.3.0 --添加直连⽹段到ripR3(config-router)#network 192.168.24.0R3(config-router)#exit --返回上⼀级R3(config)#username R2 password cisco --在R3上为R2设置⽤户名和密码R3(config)#interface s0/0/0 --进⼊端⼝R3(config-if)#encapsulation ppp --封装端⼝为ppp协议R3(config-if)#ppp authentication chap --配置chap验证R3(config-if)#end --返回特权模式%LINK-5-CHANGED: Interface Loopback0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up %LINK-5-CHANGED: Interface Serial0/0/0, changed state to up%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to up R3#%SYS-5-CONFIG_I: Configured from console by console四、验证测试:1、测试是否开启ppp认证(1)R1:(2)R2:(3)R3:2、查看R1的S0/0/0端⼝信息如图,红⾊标记处表⽰是PPP认证3、测试全⽹是否互通:(1)R1与R2(2)R2与R3(3)R3与R1结果:全⽹互通成功。
p p p认证方式a p c h a p认证文件排版存档编号:[UYTR-OUPT28-KBNTL98-UYNN208]cisco ppp认证方式(pap、chap认证)一、实验拓扑二、实验要求:1、要求配置ppp协议2、分别用pap、chap认证3、配置总部的路由器给分部的路由器分配ip地址,并且从地址池中分配,4、pc1最终能ping铜pc2三、实验步骤:1、配置各路由器接口的ip地址如图---2、封装ppp协议R1(config)#interface s1/0R1(config-if)#encapsulation pppR1(config-if)#clock rate 64000R1(config-if)#ip addressR1(config-if)#no shutR2(config)#interface s1/0R2(config-if)#encapsulation pppR2(config-if)#no shutR2(config-if)#clock rate 64000 配置DCE端时钟频率3、配置IP地址池协商,并从地址池中获取R1(config)#interface s1/0R1(config-if)#peer default ip address pool aaaR1(config-if)#ip local pool aaaR2(config)#interface s1/0R2(config-if)#ip address negotiated?查看?s1/0接口的地址R2#show interface s1/0Serial1/0 is up, line protocol is upHardware is M4TInternet address is /32 如果获取不到地址将接 shutdown 然后再no shudownMTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,reliability 255/255, txload 1/255, rxload 1/255Encapsulation PPP, LCP OpenOpen: CDPCP, IPCP, crc 16, loopback not setKeepalive set (10 sec)4、启用rip协议并查看路由表R1(config)#router ripR1(config-router)#networkR1(config-router)#network查看路由表R1#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter ar N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type E1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-I ia - IS-IS inter area, * - candidate default, U - per-user s o - ODR, P - periodic downloaded static routeGateway of last resort is not setC /24 is directly connected, FastEthernet0/0/24 is variably subnetted, 2 subnets, 2 masksC/32 is directly connected, Serial1/0C/24 is directly connected, Serial1/0R/24 [120/1] via , 00:00:47, Serial1/0R2(config)#router ripR2(config-router)#networkR2(config-router)#networkR2(config-router)#exit?查看路由表?R2#show ip routeCodes: C - connected, S - static, R - RIP, M - mobile, B - BG D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inN1 - OSPF NSSA external type 1, N2 - OSPF NSSA externaE1 - OSPF external type 1, E2 - OSPF external type 2i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2ia - IS-IS inter area, * - candidate default, U - per-o - ODR, P - periodic downloaded static routeGateway of last resort is not set/32 is subnetted, 2 subnetsCis directly connected, Serial1/0Cis directly connected, Serial1/0C/24 is directly connected, FastEthernet0/05、配置PAP认证R1(config)#username abc password 0 123R1(config)#interface s1/0R1(config-if)#ppp authentication papR2(config)#interface s1/0R2(config-if)#ppp pap sentR2(config-if)#ppp pap sent-username abc password 0 123查看show runinterface Serial1/0ip address negotiatedencapsulation pppserial restart-delay 0clockrate 64000ppp pap sent-username abc password 0 1236、配置chap认证R1(config)#username abc password 0 123 以对方的主机名作为用户名,密码要和对方的路由器一致R1(config)#interface s1/0R1(config-if)#ppp authentication papR1(config-if)#exitR1(config)#username R2 password 0 123R1(config)#interface s1/0R1(config-if)#encapsulation pppR1(config-if)#ppp authentication chap chap 认证R2(config)#username R1 password 0 123 R2(config)#interface s1/0R2(config-if)#encapsulation pppR2#debug pppauthenticationPPP authentication debugging is on验证chap过程?7、 show run查看验证?8、测试结果 pc1 ping通pc2。