Client/Server authentication
!
interface Serial1/0ip address 192.168.12.1 255.255.255.0
encapsulation ppp
ppp chap hostname ROUTER1
ppp chap password 0 CISCO
!
Server side:
!
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
encapsulation ppp
ppp authentication chap callin
!
ip address 192.168.12.2 255.255.255.0
encapsulation ppp
ppp authentication chap callin
!
username ROUTER1 password CISCO
!
Same kind of configuration for pap:
"Client" side:
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp chap password 0 CISCO
ppp pap sent-username ROUTER1 password 0 CISCO
!
Server side:
!
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp authentication pap callin
end
Mutual Authentication (PAP & CHAP):
On r1:
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp authentication pap chap
ppp pap sent-username ROUTER1 password 0 CISCO
!
username ROUTER2 password CISCO
!
On r2:
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.0
encapsulation ppp
serial restart-delay 0
ppp authentication pap chap
ppp pap sent-username ROUTER2 password 0 CISCO
!
username ROUTER1 password CISCO
!
Don't forget ppp authentication pap chap cmd.
Debug with: debug ppp negotiation.