HCIA学习笔记四十八:CHAP认证配置

一、PAP认证和CHAP认证

• PAP(PasswordAuthenticationProtocol 密码认证协议)

  • PAP是简单认证,明文传送,客户端直接发送包含用户名/口令的认证请求,服务器端处理并回应,常见于PPPOE拨号环境中。

• CHAP (ChallengeHandshakeAuthenticationProtocol 质询握手认证协议)

  • CHAP是加密认证,先由服务器端给客户端发送一个随机码challenge,客户端根据challenge对口令进行加密,算法是md5(password,challenge,ppp_id) 。然后把这个结果发送给服务器端,服务器端从数据库中取出口令password2,同样进行加密处理 md5(password2,challenge,ppp_id),最后比较加密的结果是否相同。如果相同,则认证通过,向客户端发送认可消息。

二、PPP认证模式-CHAP

三、IPCP

3.1、IPCP静态地址协商

3.2、IPCP动态地址协商

 

四、PPP-CHAP配置

4.1、CHAP认证

4.2、配置验证

五、PPP-CHAP实验

5.1、拓扑图

• 分别在路由器中拖出2台AR2220。

• 分别对着路由器AR1和AR2右键,点击设置,在eNSP支持的接口卡中找到2SA,并将其拖至第1个接口插槽中。

• 选择设备连线,点击Serial进行设备接线,接口都选择Serial 1/0/0,完成后开启设备。

5.2、配置

 AR1:

<Huawei>system-view
[Huawei]sysname AR1
[AR1]int s1/0/0
[AR1-Serial1/0/0]ip add 12.1.1.1 24
[AR1-Serial1/0/0]q
[AR1]aaa
[AR1-aaa]local-user huawei password cipher huawei
[AR1-aaa]local-user huawei service-type ppp
[AR1-aaa]int s1/0/0
[AR1-Serial1/0/0]ppp authentication-mode chap

[AR1-Serial1/0/0]display this
[AR1-Serial1/0/0]shutdown
[AR1-Serial1/0/0]undo shutdown
[AR1]display ip interface brief

AR2:

<Huawei>system-view
[Huawei]sysname AR2
[AR2]int s1/0/0
[AR2-Serial1/0/0]ip add 12.1.1.2 24
[AR2-Serial1/0/0]ppp chap user huawei
[AR2-Serial1/0/0]ppp chap password cipher huawei
[AR2-Serial1/0/0]display this
[AR2-Serial1/0/0]q

[AR2]display ip interface brief
[AR2]ping 12.1.1.1

 

posted @ 2022-12-05 01:06  缥缈的尘埃  阅读(593)  评论(0编辑  收藏  举报