实验14.3 PPP之CHAP认证
PPP的CHAP认证和PAP认证

PPP的CHAP认证和PAP认证Chap 和pap 认证有很多种,有单项的,有双向的。
单项chap认证。
(R1作为服务器端)R1(config)#interface s4/0R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config-if)#encapsulation ppp \\封装PPP协议R1(config-if)#ppp authentication chap \\开启认证,认证方式为chap认证R1(config-if)#exitR1(config)#username R2 password 0 123456 \\创建用户R2 ,用于识别认证客户端R2(config)#interface s4/0R2(config-if)#ip address 192.168.1.2 255.255.255.0R2(config-if)#encapsulation ppp \\封装PPP协议R2(config-if)#exitR2(config)#username R1 password 0 123456 \\创建用户R1,用于识别想服务器端单项pap 认证。
(R1作为服务器端)R1(config)#interface s4/0R1(config-if)#ip address 192.168.1.1 255.255.255.0R1(config-if)#encapsulation ppp \\封装PPP协议R1(config-if)#ppp authentication pap \\开启认证,认证方式为pap (服务器断开启)R1(config-if)#exitR1(config)#username R2 password 0 123456 \\创建的用户为客户端的主机名R2(config)#interface s4/0R2(config-if)#ip address 192.168.1.2 255.255.255.0R2(config-if)#encapsulation pppR2(config-if)#ppp pap sent-username R2 password 0 123456 \\定义客户端所要发送的用户名和密码,一般是发送跟自己主机名一样的的用户。
实训名称:PPP之chap认证的配置

实训名称:PPP之CHAP认证的配置一、实训原理1、点对点协议(PPP)二、实训目的1、掌握PPP协议与CHAP的基本配置三、实训内容对于同步串行接口,我们采用PPP协议和CHAP认证,安全可靠,chap认证只传输用户名,不传输密码四、实训步骤:1、RA路由器配置2、RB路由器配置3、PC机IP地址拓扑图具体步骤:1、RA路由器EnConfhostname RA //更改本地主机名称username RB password 123 //配置对端的用户名和密码Int f0/0Ip add 172.16.0.1 255.255.255.0No shutInt s0/0/0Ip add 172.16.2.1 255.255.255.252encapsulation ppp //封装PPP协议ppp authentication CHAP //启用chap认证exitip route 172.16.1.0 255.255.255.0 172.16.2.22、RB路由器EnConfhostname RB //更改本地主机名称username RA password 123 //配置对端的用户名和密码Int f0/0Ip add 172.16.1.1 255.255.255.0No shutInt s0/0/0Ip add 172.16.2.2 255.255.255.252clock rate 9600encapsulation ppp //封装PPP协议ppp authentication CHAP //启用chap认证exitip route 172.16.0.0 255.255.255.0 172.16.2.13、给PC机配置IP地址PC0:172.16.0.2/24,172.16.0.1PC1:172.16.1.2/24,172.16.1.1五、实训结果PC0 ping PC1,可以ping通。
PPP协议CHAP单向认证

RT2(config)#line console 0
RT2(config-line)#logging synchronous //配置console信息显示自动换行
RT2(config-line)# no login
RT2(config-line)#exit
RT1(config-line)# no login
RT1(config-line)#exit
Router>enable
Router#config terminal
Router(config)#hostname RT2 //配置主机名
RT2(config)#no ip domain-lookup //禁止域名查找
配置PPP协议及CHAP认证
RT1(config)#username rt1 password zhu
//配置用户名和密码,格式为username用户名password密码
RT1(config)#interface s0/1
RT1(config-if)#clock rate 64000 //在DCE端配置时钟频率,格式为clock rate速率
RT2#debug ppp authentication
PPP authentication debugging is on
可以看到两台路由器的PPP协议都是开启状态。
测试网络连通性
RT1#ping1.1.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to1.1.1.2, timeout is 2 seconds:
PPP身份验证(CHAP)的配置

PPP 身份验证(CHAP )的配置【实验名称】PPP 身份验证(CHAP )的配置【实验目的】掌握CHAP 身份验证的配置方法【实验所模拟的环境】假设某集团公司因业务需要租用了电信运营商的专线,现需要对公司路由器与电信路由器进行链路协商,使用CHAP 方式配置身份验证,实现相互通信。
Router1为集团公司路由器,Router2为电信路由器。
【实现小结】通过CHAP 身份验证方式,协商建立链路,确保专线安全顺畅连通。
【实验拓扑】【实验设备】(1)路由器 2台(2)V.35线缆1条【IP 地址规划】分别在Router1和Router2的串口上设置IP 地址及子网掩码。
Router1 serial 1/2: IP .1Router2 serial 1/2: IP .2【实验步骤】 第一步:对路由器1进行配置Router#config terminal //进入Router1全局配置模式 Router(config)#hostname R1 //将路由器命名为R1 R1(config)#username R2 password 0 psd //建立密码数据库 R1(config)#interface serial 1/2 //配置串口s1/2 R1(config-if)#ip address //设置ip 地址及子网掩码R1(config-if)#encapsulation ppp //将端口的封装类型设置为PPP R1(config-if)#ppp authentication chap //设置CHAP 认证方式 Router2 S1/2 S1/2Router1R1(config-if)#no shutdown //激活端口第二步:对路由器2进行配置Router#config terminal //进入Router2全局配置模式Router(config)#hostname R2//将路由器命名为R2R2(config)#username R1 password 0 psd //建立用户名及密码数据库R2(config)#interface s1/2//配置串口s1/2R2(config-if)#ip address //配置ip地址及子网掩码R2(config-if)#encapsulation ppp //将端口的封装类型设置为PPP R2(config-if)#ppp authentication chap //设置CHAP认证方式R2(config-if)#clock rate 64000//为串口配置时钟频率,DCE端必须配置时钟频率,DTE端无需配置R2(config-if)#no shutdown //激活端口【验证测试】1、配置完成之后,登陆R1,输入“ping 1.1.1.2”,如出现下图所示即表示链路协商通过,配置成功2、在上一节的实验中,我们学会了使用debug命令来获取设备间是如何协商的信息。
ppp认证方式apchap认证

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。
PPP中的pap和chap认证

PPP中的pap和chap认证写在前面:今天看了victoryan兄弟的chap认证实验,想起来以前帮忙同学解决了一个关于pap和chap认证的问题,现在就把ppp中的pap和chap认证做一个总结。
实验等级:Aassistant实验拓扑:实验说明:PPP中的认证方式有pap和chap两种,这两种认证既可以单独使用也可以结合使用。
并且既可以进行单向认证也可以进行双向认证。
pap是通过验证远端的用户名和密码是否匹配来进行验证chap则是发送一个挑战包,然后远端通过自己的数据库的用户名和密码利用md5进行计算后返还一个数值,然后在发送方验证这个数值是否和自己计算出来的数值是否一致进行验证基本配置:R1:!hostname R1----------------------------------------------------------设置主机名为“R1”!interface Serial1/0ip address 1.1.1.1 255.255.255.0encapsulation ppp-------------------------------------------------设置封装为pppR2:hostname R2!interface Serial1/0ip address 1.1.1.2 255.255.255.0encapsulation ppp通过上面的配置,在没有启用任何认证的情况下,链路是通的。
配置步骤:1.在两台路由器上进行pap认证:如果我们进行单项认证的话配置应该如下R1为认证的服务器端,需要建立本地口令数据库,并且开始pap认证。
R1(config)#username R2 password gairuhe------------------------建立本地口令数据库R1(config)#int s1/0R1(config-if)#ppp authentication pap--------------------------------要求进行PAP认证在这样的配置下,我们可以看到链路已经down了:R1(config-if)#*Aug 23 16:45:12.639: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ser ial1/0, changed state to downR2为认证的客户端,需要发送用户名和密码来匹配服务器端的口令数据库此时我们在R2上加上如下的配置:R2(config)#int s1/0R2(config-if)#ppp pap sent-username R2 password gairuhe------发送用户名和密码R2(config-if)#*Aug 23 16:47:48.635: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ser ial1/0, changed state to up此时链路已经起来,我们仅在R1上做了认证,而在R2上没有进行认证。
实验14.3PPP之CHAP认证

实验14.3PPP之CHAP认证实验14.3 PPP之CHAP认证⼀、实验需求(1)路由器串⼝通过PPP进⾏地址协商获取IP地址;(2)路由器之间改成CHAP认证,以建⽴PPP链路。
⼆、实验拓扑图1 配置CHAP单向认证实验三、实验步骤(1)请根据实验拓扑图,配置各个路由器的主机名(主机名格式:如R1-zhangsan)和接⼝IP地址,R2的接⼝IP采⽤PPP协商获取,请给出R1、R2的配置截图。
与实验14.2配置相同,图略(2)在R2上查看接⼝是否获取到IP地址,并观察接⼝状态,再截图。
与实验14.2配置相同,图略(3)在当前未做认证的情况下,通过R1 ping R2,检验PPP链路是否能正常通信,请给出ping结果的截图。
与实验14.2配置相同,图略//能通则正常,反之则不正常。
(4)在R1上配置论证数据库,并在R1的串⼝启⽤chap认证,然后在R2的串⼝配置⽤于验证的⽤户名和需要发送的密码,请给出R1和R2的配置截图。
(5)在R1上对PPP链路进⾏抓包,启动wireshark后,shutdown R1的串⼝,然后执⾏undo shutdown命令启⽤R1的串⼝,再到wireshark上查看抓到的CHAP包,找出并标识出⽤于CHAP认证的⽤户名和密码,最后对包含CHAP认证账号信息的包进⾏截图。
(6)在当前已做CHAP认证的情况下,通过R1 ping R2,检验PPP链路是否能正常通信,请给出ping结果的截图。
//能通则说明CHAP认证成功,反之则说明PPP链路认证失败。
说明:本实验是CHAP单向认证,如果要作CHAP双向认证,则每个路由器既作为主认证⽅,⼜作为被认证⽅。
在本实验的基础上对R2配置AAA认证账户,并在串⼝下启⽤CHAP认证;在R1的串⼝下配置⽤于认证的账号信息即可。
17【工程实验室】【PPP CHAP认证】

实验PPP CHAP认证【实验名称】PPP CHAP认证【实验目的】掌握PPP CHAP认证的过程及配置【背景描述】你是公司的网络管理员,公司为了满足不断增长的业务需求,申请了专线接入,你的客户端路由器与ISP进行链路协商时要验证身份,配置路由器保证链路建立并考虑其安全性。
【需求分析】在链路协商时保证安全验证。
链路协商时MD5密文的方式传输。
【实验拓扑】图9-3实验拓扑图【预备知识】路由器基本配置知识、PPP CHAP知识【实验设备】路由器(带串口)2台V.35线缆(DTE/DCE)1对【实验原理】PPP协议位于OSI七层模型的数据链路层,PPP协议按照功能划分为两个子层:LCP、NCP。
LCP主要负责链路的协商、建立、回拨、认证、数据的压缩、多链路捆绑等功能。
NCP主要负责和上层的协议进行协商,为网络层协议提供服务。
PPP的认证功能是指在建立PPP链路的过程中进行密码的验证,验证通过建立连接,验证不通过拆除链路。
CHAP(Challenge Handshake Authentication Protocol,挑战式握手验证协议)是指验证双方通过三次握手完成验证过程,比PAP更安全。
由验证方主动发出挑战报文,由被验证方应答。
在整个验证过程中,链路上传递的信息都进行了加密处理。
【实验步骤】第一步:路由器基本配置Router(config)#hostname Router ARouter A(config)#interface serial 4/0Router A(config-if)#ip address 172.16.2.1 255.255.255.0Router A(config-if)#encapsulation pppRouter(config)#hostname Router BRouter B(config)#interface serial 4/0Router B(config-if)#ip address 172.16.2.2 255.255.255.0Router B(config-if)#encapsulation ppp第二步:配置CHAP认证Router A(config)#username RouterB password 0 123Router B(config)#username RouterA password 0123Router B(config)#interface serial 4/0Router B(config-if)#ppp authentication chap第三步:验证CHAP认证Router A#show interfaces serial 4/0Index(dec):1 (hex):1serial 4/0 is UP , line protocol is UPHardware is Infineon DSCC4 PEB20534 H-10 serialInterface address is: 172.16.2.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 OpenOpen: ipcpQueueing strategy: WFQ11421118 carrier transitionsV35 DCE cableDCD=up DSR=up DTR=up RTS=up CTS=up5 minutes input rate 45 bits/sec, 0 packets/sec5 minutes output rate 44 bits/sec, 0 packets/sec889 packets input, 18810 bytes, 0 no buffer, 28 droppedReceived 68 broadcasts, 0 runts, 0 giants0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort848 packets output, 15203 bytes, 0 underruns , 5 dropped0 output errors, 0 collisions, 28 interface resets使用debug ppp authentication 命令验证配置。
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
实验14.3 PPP之CHAP认证
一、实验需求
(1)路由器串口通过PPP进行地址协商获取IP地址;
(2)路由器之间改成CHAP认证,以建立PPP链路。
二、实验拓扑
图1 配置CHAP单向认证实验
三、实验步骤
(1)请根据实验拓扑图,配置各个路由器的主机名(主机名格式:如R1-zhangsan)和接口IP地址,R2的接口IP采用PPP协商获取,请给出R1、R2的配置截图。
与实验14.2配置相同,图略
(2)在R2上查看接口是否获取到IP地址,并观察接口状态,再截图。
与实验14.2配置相同,图略
(3)在当前未做认证的情况下,通过R1 ping R2,检验PPP链路是否能正常通信,请给出ping结果的截图。
与实验14.2配置相同,图略
//能通则正常,反之则不正常。
(4)在R1上配置论证数据库,并在R1的串口启用chap认证,然后在R2的串口配置用于验证的用户名和需要发送的密码,请给出R1和R2的配置截图。
(5)在R1上对PPP链路进行抓包,启动wireshark后,shutdown R1的串口,然后执行undo shutdown命令启用R1的串口,再到wireshark上查看抓到的CHAP包,找出并标识出用于CHAP认证的用户名和密码,最后对包含CHAP认证账号信息的包进行截图。
(6)在当前已做CHAP认证的情况下,通过R1 ping R2,检验PPP链路是否能正常通信,请给出ping结果的截图。
//能通则说明CHAP认证成功,反之则说明PPP链路认证失败。
说明:本实验是CHAP单向认证,如果要作CHAP双向认证,则每个路由器既作为主认证方,又作为被认证方。
在本实验的基础上对R2配置AAA认证账户,并在串口下启用CHAP认证;在R1的串口下配置用于认证的账号信息即可。