广域网PPP协议封装的CHAP认证:
知识链接:
知识链接
1.CHAP简介
挑战握手认证协议(Challenge Handshake Authentication Protocol,CHAP)为3次握手协议,它只在网络上传用户名而不传口令,因此其安全性比PAP协议的安全性高。
2.CHAP认证过程
CHAP协议是在链路建立开始就完成的,在链路建立完成后的任何时间都可以进行再次认证。CHAP认证过程如下。
(1)认证方向被认证方发送一些随机报文,并加上自己的主机名。
(2)被认证方收到认证方的验证请求,通过收到的主机名和本端的用户数据库查找用户口令字(密钥),如果找到用户数据库中和认证方主机名相同的用户,就利用接收到的随机报文、此用户的密钥和报文ID用Md5加密算法生成应答,随后将应答和自己的主机名送回。
拓扑图:
实验步骤:
#RA
interface Serial1/0/0
link-protocol ppp
ppp authentication-mode chap
ip address 10.10.10.1 255.255.255.0
#
#
aaa
local-user admin password cipher huawei
local-user admin service-type ppp
#
#RB
interface Serial1/0/0
link-protocol ppp
ppp chap user admin
ppp chap password cipher huawei
ip address 10.10.10.2 255.255.255.0
#
#
结果:
RA ping RB
<RA>ping 10.10.10.2
PING 10.10.10.2: 56 data bytes, press CTRL_C to break
Reply from 10.10.10.2: bytes=56 Sequence=1 ttl=255 time=120 ms
Reply from 10.10.10.2: bytes=56 Sequence=2 ttl=255 time=20 ms
Reply from 10.10.10.2: bytes=56 Sequence=3 ttl=255 time=20 ms
Reply from 10.10.10.2: bytes=56 Sequence=4 ttl=255 time=10 ms
Reply from 10.10.10.2: bytes=56 Sequence=5 ttl=255 time=30 ms
--- 10.10.10.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 10/40/120 ms
<RA>