layer 2 WAN circuit technologies(PAP,CHAP)

邮差的信 提交于 2020-02-21 10:08:51

authentication(PAP,CHAP)
PAP password authentication protocol
在这里插入图片描述
两次握手,密码发送的是明文,验证两端是否相同

CHAP challenge authentication protocol
在这里插入图片描述
三次握手,密码是加密的

PAP单向认证
使用PAP单向认证:(验证方R1—被验证方R2)
Router(config)#hostname R1
R1(config)#username R2 password cisco
R1(config)#int s1/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp pap sent-username R2 password 0 cisco
使用ping命令验证连通性。(注意,这里在R2上发送的用户名和密码必须和在R1上建立的用户名密码一致)
PAP双向认证
Router(config)#hostname R1 //设置主机名为R1
R1(config)#username R2 password cisco //建立用户R2,密码cisco
R1(config)#int s1/0
R1(config-if)#encapsulation ppp //用PPP封装
R1(config-if)#ppp authentication pap //PPP验证方式为pap
R1(config-if)#ppp pap sent-username R1 password 0 cisco
//发送用户名R1,密码cisco

Router(config)#hostname R2
R2(config)#username R1 password cisco
R2(config)#int s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
R2(config-if)#ppp pap sent-username R2 password 0 cisco

使用ping命令验证连通性。(注意,这里在R1上发送的用户名和密码必须和在R2上建立的用户名密码一致)

CHAP单向认证
(验证方R1—被验证方R2)
Router(config)#hostname R1
R1(config)#username R2 password cisco
R1(config)#int s1/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap

Router(config)#hostname R2
R2(config)#int s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp chap hostname R2
R2(config-if)#ppp chap password 0 cisco
CHAP双向认证
Router(config)#hostname R1
R1(config)#username R2 password cisco
R1(config)#int s1/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#ppp chap hostname R1
R1(config-if)#ppp chap password 0 cisco

Router(config)#hostname R2
R2(config)#username R1 password cisco
R2(config)#int s1/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#ppp chap hostname R2
R2(config-if)#ppp chap password 0 cisco

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!