PPP CHAP认证_pppchap认证
PPP CHAP认证由刀豆文库小编整理,希望给你工作、学习、生活带来方便,猜你可能喜欢“pppchap认证”。
【实验名称】 PPP CHAP认证。【实验目的】
掌握PPP CHAP认证的过程及配置。 【背景描述】
你是公司的网络管理员,公司为了满足不断增长的业务需求,申请了专线接入,你的客户端路由器与ISP进行链路协商时要验证身份,配置路由器保证链路建立并考虑其安全性。【技术原理】
PPP协议位于OSI七层模型的数据链路层,PPP协议按照功能划分为两个子层:LCP、NCP。LCP主要负责链路的协商、建立、回拨、认证、数据的压缩、多链路捆绑等功能。NCP主要负责和上层的协议进行协商,为网络层协议提供服务。
PPP的认证功能是指在建立PPP链路的过程中进行密码的验证,验证通过建立连接,验证不通过拆除链路。
CHAP(Challenge Handshake Authentication Protocol,挑战式握手验证协议)是指验证双方通过三次握手完成验证过程,比PAP更安全。由验证方主动发出挑战报文,由被验证方应答。在整个验证过程中,链路上传递的信息都进行了加密处理。【实现功能】
在链路协商时保证安全验证。链路协商时密码以密文的方式传输,更安全。【实验设备】
R1762(两台)、V.35线缆(1条)【实验拓扑】
图 24 【实验步骤】
步骤1.基本配置。
Red-Giant(config)#hostname Ra Ra(config)# interface serial 1/2 Ra(config-if)#ip addre 1.1.1.1 255.255.255.0 Ra(config-if)#no shutdown Red-Giant(config)#hostname Rb Rb(config)# interface serial 1/2 Rb(config-if)#ip addre 1.1.1.2 255.255.255.0 Rb(config-if)#clock rate 64000 Rb(config-if)#no shutdown 验证测试:(以Ra为例)Ra#show interface serial 1/2 serial 1/2 is UP , line protocol is UP Hardware is PQ2 SCC HDLC CONTROLLER serial Interface addre is: 1.1.1.1/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 5 minutes input rate 11 bits/sec, 0 packets/sec 5 minutes output rate 11 bits/sec, 0 packets/sec 33 packets input, 726 bytes, 0 no buffer Received 33 broadcasts, 0 runts, 0 giants 0 input errors, 0 CRC, 0 frame, 0 overrun, 0 abort 32 packets output, 704 bytes, 0 underruns 0 output errors, 0 collisions, 6 interface resets 3 carrier transitions V35 DTE cable DCD=up DSR=up DTR=up RTS=up CTS=up 步骤2.配置PPP CHAP认证。
Ra(config)#username Rb paword 0 star!以对方的主机名作为用户名,密码和对方的路由器一致 Ra(config)#interface serial 1/2 Ra(config-if)#encapsulation ppp Ra(config-if)#ppp authentication chap!PPP启用CHAP方式验证 Rb(config)#username Ra paword 0 star!以对方的主机名作为用户名,密码和对方的路由器一致 Rb(config)#interface serial 1/2 Rb(config-if)# encapsulation ppp 验证测试:
Ra#debug ppp authentication!观察CHAP验证过程 %LINK CHANGED: Interface serial 1/2, changed state to down %LINE PROTOCOL CHANGE: Interface serial 1/2, changed state to DOWN PPP: ppp_clear_author(), protocol = TYPE_LCP %LINK CHANGED: Interface serial 1/2, changed state to up PPP: serial 1/2 Send CHAP challenge id=29 to remote host PPP: serial 1/2 authentication event enqueue ,meage type = [RECV_CHAP_RESPONSE] PPP: dispose authentication meage [RECV_CHAP_RESPONSE] PPP: serial 1/2 CHAP response id=29 ,received from Rb PPP: serial 1/2 Send CHAP succe id=29 to remote PPP: serial 1/2 remote router paed CHAP authentication.PPP: serial 1/2 lcp authentication OK!PPP: ppp_clear_author(), protocol = TYPE_IPCP %LINE PROTOCOL CHANGE: Interface serial 1/2, changed state to UP 【注意事项】
1、在DCE端要配置时钟;
2、Ra(config)#username Rb paword 0 star!username后面的参数是对方的主机名;
3、Rb(config)#username Ra paword 0 star!username后面的参数是对方的主机名;
4、在接口下封装ppp;
5、debug ppp authentication 在路由器物理层up,链路尚未建立的情况下打开才有信息输出,本实验的实质是链路层协商建立的安全性,该信息出现在链路协商的过程中。【参考配置】
Ra#show running-config!路由器Ra配置 Building configuration...Current configuration : 489 bytes!version 8.32(building 53)hostname Ra!username Rb paword 0 star!interface serial 1/2 encapsulation PPP ppp authentication chap ip addre 1.1.1.1 255.255.255.0 clock rate 64000!interface serial 1/3 clock rate 64000!interface FastEthernet 1/0 duplex auto speed auto!interface FastEthernet 1/1 duplex auto speed auto!interface Null 0!line con 0 line aux 0 line vty 0 4 login!end Rb#show running-config!路由器Rb配置 Building configuration...Current configuration : 444 bytes!version 8.32(building 53)hostname Rb!username Ra paword 0 star!interface serial 1/2 encapsulation PPP ip addre 1.1.1.2 255.255.255.0!interface serial 1/3 clock rate 64000!interface FastEthernet 1/0 duplex auto speed auto!interface FastEthernet 1/1 duplex auto speed auto!interface Null 0!line con 0 line aux 0 line vty 0 4 login!end