beautypg.com

H3C Technologies H3C SR8800 User Manual

Page 45

background image

37

2.

Configure Router B:
# Create a user account for Router A on Router B.

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

[RouterB] interface Serial 4/1/9/1:0

# Enable PPP encapsulation on interface Serial 4/1/9/1:0.

[RouterB-Serial4/1/9/1:0] link-protocol ppp

# Configure the username for Router B when Router B is authenticated by using CHAP.

[RouterB-Serial4/1/9/1:0] ppp chap user userb

# Assign an IP address to Serial 4/1/9/1:0.

[RouterB-Serial4/1/9/1:0] ip address 200.1.1.2 16

Approach II: The authenticator with no username configured authenticates the remote end using CHAP.

3.

Configure Router A:
# Create a user account for Router B.

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

[RouterA] interface Serial 4/1/9/1:0

# Set the authentication mode to CHAP.

[RouterA-Serial4/1/9/1:0] ppp authentication-mode chap domain system

# Assign an IP address to Serial 4/1/9/1:0.

[RouterA-Serial4/1/9/1:0] ip address 200.1.1.1 16

[RouterA-Serial4/1/9/1:0] quit

# Configure local authentication for the PPP users in the default ISP domain system.

[RouterA] domain system

[RouterA-isp-system] authentication ppp local

4.

Configure Router B:
# Configure the username of Router B when Router B is authenticated by using CHAP.

system-view

[RouterB] interface Serial 4/1/9/1:0

[RouterB-Serial4/1/9/1:0] ppp chap user userb

# Set the default CHAP password.

[RouterB-Serial4/1/9/1:0] ppp chap password simple hello

# Assign an IP address to Serial 4/1/9/1:0.

[RouterB-Serial4/1/9/1:0] ip address 200.1.1.2 16