Computer Network | Password authentication protocol (PAP)

There are simply two methods to authenticate PPP links namely Password Authentication Protocol (PAP) and Challenge Handshake Authentication Protocol (CHAP).

From these two authentication protocols, PAP is less secured as the password is sent in clear text and is performed only at the initial link establishment.

Password Authentication Protocol (PAP) –
PAP is a password Authentication Protocol used by PPP links to validate users. PAP authentication requires the calling device to enter the username and password. If the credentials match with the local database of the called device or in the remote AAA database then it is allowed to access otherwise denied.

Features –
Some of the features of PAP are:

  1. The password is sent in clear text.
  2. All network operating system support PAP.
  3. It uses two-way Handshake Protocol.
  4. It is non-interactive.
  5. PAP supports both one-way authentication (unidirectional) and two-way authentication (bidirectional).

Configuration –

There is a small topology in which there are 2 routers namely R1 and R2. R1 having ip address 10.1.1.1/30 on s0/0 and R2 have ip address 10.1.1.2/30 on s0/0.

First, we will create local database on R1 by providing username and password:

R1(config)#username Router1 password GeeksforGeeks 

Configuring local database on R2:

R2(config)#username Router2 password GeeksforGeeks 

Remember, by default HDLC is configured on Cisco routers therefore first we have to change the encapsulation to PPP and enable PAP.

R1(config)# int s0/0
R1(config-if)#encapsulation ppp
R1(config-if)#ppp authentication pap 
R1(config-if)#ppp pap sent-username Router2 password GeeksforGeeks 

Enabling PAP on R2:

R2(config)# int s0/0
R2(config-if)#encapsulation ppp
R2(config-if)#ppp authentication pap
R2(config-if)#ppp pap sent-username Router1 password GeeksforGeeks 

Here, notice that username and password are case-sensitive. Also, on router R1 we have to give a username and password.

Note –
This command can also be used on the router which wants to authenticate (calling router) in case of one-way authentication i.e only calling router will authenticate.
If two-way authentication, i.e both client and remote device are going to authenticate to each other, is operating then we have to make a local database and use this command on both devices.

In addition if we want to use CHAP first and PAP as backup when CHAP fails, we can configure it by the command.

R1(config)#int s0/0 
R2(config-if)#ppp authentication chap pap

Also, if we want as CHAP as backup then use the command.

R1(config)#int s0/0 
R2(config-if)#ppp authentication pap chap

When to use PAP –
PAP is usually used in following scenarios:

  1. When the application doesn’t support CHAP.
  2. Circumstances where it is necessary to sent a plain text password to stimulate a login at the called device (remote host).
  3. When there is occurrence of incompatibilities between different vendors of CHAP.

Advantage of CHAP over PAP –
Some of the advantages are:

  1. CHAP is more secured than PAP.
  2. CHAP can provide authentication periodically to recognise that the user accessing the PPP link is same or not.
  3. In CHAP, the real passwords are never shared on the link instead a hash value of it is calculated and transferred.

Advantage of PAP over CHAP –
The only advantage PAP holds over CHAP is that it is supported by the all the network operating system vendors therefore it can be said that PAP is used where CHAP is not supported. But if CHAP is supported then it is recommended to use CHAP as it is more secured.



My Personal Notes arrow_drop_up

Check out this Author's contributed articles.

If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.

Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.




Article Tags :
Practice Tags :


Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.