拓扑图
1、PPP认证
R2为认证方:
R1:
R1(config)#username R2 password cisco
R1(config)#int s0/2/0
R1(config-if)#encapsulation ppp
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0, changed state to down
R1(config-if)#exit
R1(config)#
R2:
R2>enable
R2#configure terminal
R2(config)#int s0/2/0
R2(config-if)#encapsulation ppp
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0, changed state to down
R2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/2/0, changed state to up
验证:
2、双向CHAP认证
拓扑图:
R1:
Router(config)#hostname R1
R1(config)#username R2 password cisco
R1(config)#int s0/2/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#exit
R2:
Router(config)#hostname R2
R2(config)#username R1 password cisco
R2(config)#int s0/2/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#exit
结果:
3、PAP认证:
拓扑图:
R1:
R1(config)#int s0/2/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp pap sent-username R1 password cisco
R2:
R2(config)#username R1 password cisco
R2(config)#int s0/2/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
结果: