1.PAP的单向认证
【R1】
<RouterA> system-view[RouterA] local-user userb class network
[RouterA-luser-network-userb] password simple passb
[RouterA-luser-network-userb] service-type ppp
[RouterA-luser-network-userb] quit[RouterA] interface serial 1/0
[RouterA-Serial2/1/0] link-protocol ppp
[RouterA-Serial2/1/0] ppp authentication-mode pap
[RouterA-Serial2/1/0] ip address 10.1.1.1 24
[RouterA-Serial2/1/0] quit
【R2】
<RouterB> system-view[RouterB] interface serial 1/0
[RouterB-Serial2/1/0] link-protocol ppp
[RouterB-Serial2/1/0] ppp pap local-user userb password simple passb
[RouterB-Serial2/1/0] ip address 10.1.1.2 24
[RouterB-Serial2/1/0] quit
2.PAP的双向认证
【R1】
<RouterA> system-view[RouterA] local-user userb class network
[RouterA-luser-network-userb] password simple passb
[RouterA-luser-network-userb] service-type ppp
[RouterA-luser-network-userb] quit[RouterA] interface serial 1/0
[RouterA-Serial2/1/0] link-protocol ppp
[RouterA-Serial2/1/0] ppp authentication-mode pap
[RouterA-Serial2/1/0] ppp pap local-user usera password simple passa
[RouterA-Serial2/1/0] ip address 10.1.1.1 24
[RouterA-Serial2/1/0] quit
【R2】
<RouterB> system-view[RouterB] local-user usera class network
[RouterB-luser-network-usera] password simple passa
[RouterB-luser-network-usera] service-type ppp
[RouterB-luser-network-usera] quit[RouterB] interface serial 1/0
[RouterB-Serial2/1/0] link-protocol ppp
[RouterB-Serial2/1/0] ppp authentication-mode pap
[RouterB-Serial2/1/0] ppp pap local-user userb password simple passb
[RouterB-Serial2/1/0] ip address 10.1.1.2 24
[RouterB-Serial2/1/0] quit
3.CHAP的单向认证
【R1】
<RouterA> system-view[RouterA] local-user userb class network
[RouterA-luser-network-userb] password simple hello
[RouterA-luser-network-userb] service-type ppp
[RouterA-luser-network-userb] quit[RouterA] interface serial 1/0
[RouterA-Serial2/1/0] ppp authentication-mode chap
[RouterA-Serial2/1/0] ip address 10.1.1.1 24
[RouterA-Serial2/1/0] quit
【R2】
<RouterB> system-view[RouterB] interface serial 1/0
[RouterB-Serial2/1/0] ppp chap user userb
[RouterB-Serial2/1/0] ppp chap password simple hello
[RouterB-Serial2/1/0] ip address 10.1.1.2 24
[RouterB-Serial2/1/0] quit