PAP is an authentication protocol that can be used with PPP. When PAP is used, the user name and the password of the originating router are sent over the link in plain text.
CHAP is an authentication protocol that can be used with PPP. When CHAP is used, a hash is sent to the authentication router; the user name and password are not sent across the link. Thus CHAP is more secure than PAP for authentication.
For this example ill use RouterA and RouterB both connected with ser 0/0 .
On each Router configure a Username with the Neigbor Router Name and a password .
Then enable the desired encapsulation .
And Finally choose the authentication method .
Example Configuration
RouterA(config)#username RouterB password itss
RouterA(config)#interface serial 0/0
RouterA(config-if)#ip address x.x.x.1 x.x.x.x
RouterA(config-if)#no shutdown
RouterA(config)#interface serial 0/0
RouterA(config-if)#encapsulation ppp
RouterA(config-if)#ppp authentication chap
RouterB(config)#username RouterB password itss
RouterB(config)#interface serial 0/0
RouterB(config-if)#ip address x.x.x.2 x.x.x.x
RouterB(config-if)#no shutdown
RouterB(config)#interface serial 0/0
RouterB(config-if)#encapsulation ppp
RouterB(config-if)#ppp authentication chap
for PAP configuration don’t forget to add the command :
(config-if)#ppp pap sent-username (username of other router) password (password of other router)