PAP 单向认证(注意也可以做成双向的)
PAP(口令验证协议)
The unilateralism authentication
r1(config)#username r2 password cisco建立数据库
r1(config)#int s1/1
r1(config-if)#encapsulation ppp /进行PPP封装
r1(config-if)#ppp authentication pap /使用PAP实现PPP的验证
r2(config)#int s1/0
r2(config-if)#encapsulation ppp
r2(config-if)#ppp pap sent-username r2 password cisco/发送验证信息
The Bidirectional authentcation
r1(config)#username r2 password cisco
r1(config)#int s1/1
r1(config-if)#encapsulation ppp
r1(config-if)#ppp authentication pap
r1(config-if)#ppp pap sent-username r1 password cisco 注意此时发送的password
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 cisco 注意此时发送的password
CHAP ppp双向认证 支持MD5
PPP Session (chap ,质询握手验证协议)
R1 ----------R2
The unilateralism authentication
r1(config)#username r2 password cisco
r1(config)#int s1/1
r1(config-if)#encapsulation ppp
r1(config-if)#ppp authentication chap
r2(config)#int s1/0
r2(config-if)# encapsulation ppp
r2(config-if)#ppp chap hostname r2
r2(config-if)#ppp chap password cisco
ps,the r2 don't need comman "ppp authentcaion chap" if you conmmand the interface will shutdown and up
The Bidirectional authentcation
r1(config)#username r2 password cisco
r1(config)#int s1/1
r1(config-if)# encapsulation ppp
r1(config-if)# ppp authentication chap
r2(config-if)#username r1 password cisco
r2(config)#int s1/0
r2(config-if)# encapsulation ppp
r2(config-if)# ppp authentication chap
转载于:https://blog.51cto.com/xsong/159146