ppp的封装:
1.不采用任何验证时两边的配置相同
[router]int serial 0
[router-serial]link-protocol ppp//封装ppp
[router-serial]ip address 10.0.0.1 255.255.255.0
2.采用pap单向认证
router A:

int serial 0
[router-serial]link-protocol ppp
[router-serial]ppp pap local-user A password simple A//用pap进行封装,本地用户名为A,密码为A
[router-serial]ip address 10.0.0.1 255.255.255.0
router B:

[router]local-user A server-type ppp password simple A//本地建立对方的用户名和密码
[router]int serial 0
[router-serial]link-protocal ppp
[router-serial]ppp authentication-mode pap
[router-serial]ip address 12.0.0.1 255.255.255.0
3.采用pap双向验证两端的配置相同:
router A:

[router]local-user A server-type ppp password simple A//本地建立对方的用户名和密码
[router]int serial 0
[router-serial]link-protocal ppp
[router-serial]ppp pap local-user A password simple A//本地用户名为A密码为A
[router-serial]ppp authentication-mode pap//开启认证
[router-serial]ip address 12.0.0.1 255.255.255.0
4.采用chap单向认证
router A:

[router]int serial 0
[router-serial 0]link-protocal ppp
[router-serial 0]ppp chap user a
[router-serial 0]ppp chap password simple hello
[router-serial 0]ip address 12.0.0.1 255.255.255.0
router B:

[router]local-user a service-type ppp password simple hello
[router]int serial 0
[router-serial 0]link-protocal ppp
[router-serial 0]ppp authentication-mode chap
[router-serial 0]ppp chap user 
[router-serial 0]ppp chap password simple hello
[router-serial 0]ip address 12.0.0.1 255.255.255.0
5.采用chap双向认证两端的配置相同,只不过用户名不同但是密码必须要一致
[router]local-user A service-type ppp password simple hello//本地对端的用户名和密码
[router]int serial 0
[router-serial 0]link-protocal ppp
[router-serial 0]ppp authentication-mode chap//认证模式为chap
[router-serial 0]ppp chap user b//本端的用户名为b
[router-serial 0]ip address 12.0.0.1 255.255.255.0
注:采用chap双向认证时,对端的密码必须一致

注:在实验过程中,我使用的是ENSP模拟器创建用户名/密码。

[R2]aaa	
[R2-aaa]local-user a service-type ppp 
[R2-aaa]local-user a password cipher hello