31
0.00% packet loss
round-trip min/avg/max = 1/23/103 ms
One-way CHAP authentication configuration example
Network requirements
As shown in Figure 6, configure Router A to authenticate Router B by using CHAP.
Figure 6 Network diagram
Configuration procedure
(Method 1) The authenticator configured with a username authenticates the supplicant by
using CHAP.
1. Configure Router A:
# Create a user account for Router B.
<RouterA> system-view
[RouterA] local-user userb
# Set a password for the user account.
[RouterA-luser-userb] password simple hello
# Set the service type of the user account to PPP.
[RouterA-luser-userb] service-type ppp
[RouterA-luser-userb] quit
# Enable PPP encapsulation on Serial 2/0.
[RouterA] interface serial 2/0
[RouterA-Serial2/0] link-protocol ppp
# Configure the username for Router A when Router A authenticates Router B.
[RouterA-Serial2/0] ppp chap user usera
# Set the authentication mode to CHAP.
[RouterA-Serial2/0] ppp authentication-mode chap domain system
# Assign an IP address to Serial 2/0.
[RouterA-Serial2/0] ip address 200.1.1.1 16
[RouterA-Serial2/0] quit
# Configure local authentication for the PPP users in the default ISP domain system.
[RouterA] domain system
[RouterA-isp-system] authentication ppp local
2. Configure Router B:
# Create a user account for Router A on Router B.
<RouterB> system-view
[RouterB] local-user usera
# Set a password for the user account.
[RouterB-luser-usera] password simple hello
# Set the service type of the user account to PPP.
[RouterB-luser-usera] service-type ppp
[RouterB-luser-usera] quit