PPPoE client configuration example
Network requirements
As shown in Figure 13, configure the routers to make Router A authenticate Router B using PAP or CHAP.
Figure 13: Network diagram
![](images/image11.png)
Configuring PAP authentication
Configure Router A as the PPPoE server:
# Add a PPPoE user.
<RouterA> system-view [RouterA] local-user user2 [RouterA-luser-user2] password simple hello [RouterA-luser-user2] service-type ppp [RouterA-luser-user2] quit
# Configure virtual template 1.
[RouterA] interface virtual-template 1 [RouterA-Virtual-Template1] ppp authentication-mode pap [RouterA-Virtual-Template1] ip address 1.1.1.1 255.0.0.0 [RouterA-Virtual-Template1] remote address 1.1.1.2 [RouterA-Virtual-Template1] quit
# Configure the PPPoE server.
[RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] pppoe-server bind virtual-template 1
Configure Router B as the PPPoE client:
<RouterB> system-view [RouterB] dialer-rule 1 ip permit [RouterB] interface dialer 1 [RouterB-Dialer1] dialer user user2 [RouterB-Dialer1] dialer-group 1 [RouterB-Dialer1] dialer bundle 1 [RouterB-Dialer1] ip address ppp-negotiate [RouterB-Dialer1] ppp pap local-user user2 password simple hello [RouterB-Dialer1] quit
# Configure the PPPoE session.
[RouterB] interface ethernet 1/1 [RouterB-Ethernet1/1] pppoe-client dial-bundle-number 1
Configuring CHAP authentication
Configure Router A as the PPPoE server:
# Add a PPPoE user.
<RouterA> system-view [RouterA] local-user user2 [RouterA-luser-user2] password simple hello [RouterA-luser-user2] service-type ppp [RouterA-luser-user2] quit
# Configure virtual template 1.
[RouterA] interface virtual-template 1 [RouterA-Virtual-Template1] ppp authentication-mode chap [RouterA-Virtual-Template1] ppp chap user user1 [RouterA-Virtual-Template1] ip address 1.1.1.1 255.0.0.0 [RouterA-Virtual-Template1] remote address 1.1.1.2 [RouterA-Virtual-Template1] quit
# Configure the PPPoE server.
[RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] pppoe-server bind virtual-template 1
Configure Router B as the PPPoE client:
<RouterB> system-view [RouterB] dialer-rule 1 ip permit [RouterB] interface dialer 1 [RouterB-Dialer1] dialer user user2 [RouterB-Dialer1] dialer-group 1 [RouterB-Dialer1] dialer bundle 1 [RouterB-Dialer1] ip address ppp-negotiate [RouterB-Dialer1] ppp chap user user2 [RouterB-Dialer1] quit [RouterB] local-user user1 [RouterB-luser-user1] password simple hello [RouterB-luser-user1] quit
# Configure the PPPoE session.
[RouterB] interface ethernet 1/1 [RouterB-Ethernet1/1] pppoe-client dial-bundle-number 1