pap and chap authentication configuration of ppp

Keywords: network less

1, Network topology

Two, PAP

2.1 PAP single authentication: R1 is the server, R2 is the client

R1 To configure:
R1>enable
R1#configure terminal
R1(config)#username jsxjs password adminjsxjs
R1(config)#interface s0/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap
R2 To configure:
R2>enable
R2#configure terminal
R2(config)#interface s0/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp pap sent-username jsxjs password adminjsxjs

2.2 PAP two-way authentication: (the user name and password configured by both parties are different, of course, the user name and password of both parties can also be set)

R1 To configure:
R1>enable
R1#configure terminal
R1(config)#username jsxjs password adminjsxjs
R1(config)#interface s0/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp pap sent-username jlzz password adminjlzz
R1(config-if)#ppp authentication pap
R2 To configure:
R2>enable
R2#configure terminal
R2(config)#username jlzz password adminjlzz
R2(config)#interface s0/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp pap sent-username jsxjs password adminjsxjs
R2(config-if)#ppp authentication pap

Three, CHAP

3.1 CHAP one-way authentication: (R1 is the server, R2 is the client)

R1 To configure:
R1(config)#username jsxjs password adminjsxjs
R1(config)#interface s0/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R2 To configure:
R2(config)#interface s0/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp chap hostname jsxjs
R2(config-if)#ppp chap password adminjsxjs

3.2 CHAP two-way authentication: (the user names and passwords of both parties are different here to show the difference between two-way authentication. You can also set the same user name and password)

R1 To configure:
R1(config)#username jsxjs password adminjsxjs
R1(config)#interface s0/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication chap
R1(config-if)#ppp chap hostname jlzz
R1(config-if)#ppp chap password adminjlzz
R2 To configure:
R2(config)#username jlzz password adminjlzz
R2(config)#interface s0/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication chap
R2(config-if)#ppp chap hostname jsxjs
R2(config-if)#ppp chap password adminjsxjs

3.3 mutual authentication of chap: (both parties set the user name of authentication as the hostname of the opposite device, and set the same password)

R1 To configure:
RTA(config)#username RTB password netscene.net
RTA(config)#interface s1/1
RTA(config-if)#encapsulation ppp
RTA(config-if)#ppp authentication chap 
R2 To configure:
RTB(config)#username RTA password netscene.net
RTB(config-if)#encapsulation ppp
RTB(config-if)#ppp authentication chap

Four, explain

PAP authentication uses plaintext to transmit user name and password in the network, which is less secure than CHAP authentication.

Posted by B0b on Sun, 05 Jan 2020 06:33:19 -0800