CHAP (Challenge Handshake Authentication Protocol) and PAP (Password Authentication Protocol) are generally used to provide security Authentication on PPP encapsulated serial lines. With CHAP and PAP authentication, each Cisco router is identified by a name to prevent unauthorized access.
Task commands
Set the PPP encapsulation ppp1
Set the authentication method ppp authentication {chap | chap pap | pap chap | pap} [if-needed] [list-name | default] [callin]
Specify the password username password secret
Set the DCE line speed to clockrate speed
Example
The S0 ports of Cisco router Router1 and Router2 both encapsulate the PPP protocol and adopt CHAP for authentication. In Router1, a user should be created with the peer Cisco router host name as the user name, that is, the user name should be router2. At the same time, a user should be created in Router2, with the peer Cisco router host name as the user name, that is, the user name should be router1. The password of the user must be the same.
The settings are as follows:
Router1:
Hostname router1
Username router2 password xxx
Interface Serial0
Ip address 192.200.10.1 255.255.255.0
Clockrate 1000000
Ppp authentication chap
!
Router2:
Hostname router2
Username router1 password xxx
Interface Serial0
Ip address 192.200.10.2 255.255.255.0
Ppp authentication chap
!
ISDN