Configuration example for connecting a LAN to the Internet using an ADSL modem
Network requirements
As shown in Figure 14:
Router A provides Internet access for Host A, Host B, and Host C. It connects to DSLAM through an ADSL modem and a permanent PPPoE session.
The username and password of the ADSL account are user1 and 123456.
Router A operates as a PPPoE client, allowing the hosts in the LAN to access the Internet without PPPoE client software.
Router B operates as the PPPoE server. It is connected to the DSLAM through interface ATM 1/0 and performs RADIUS authentication and accounting.
Figure 14: Network diagram
![](images/image12.png)
Configuration procedure
Configure Router A as a PPPoE client:
# Configure a dialer interface.
<RouterA> system-view [RouterA] dialer-rule 1 ip permit [RouterA] interface dialer 1 [RouterA-Dialer1] dialer-group 1 [RouterA-Dialer1] dialer bundle 1 [RouterA-Dialer1] ip address ppp-negotiate [RouterA-Dialer1] ppp pap local-user user1 password cipher 123456 [RouterA-Dialer1] quit
# Configure a PPPoE session.
[RouterA] interface ethernet 1/1 [RouterA-Ethernet1/1] pppoe-client dial-bundle-number 1 [RouterA-Ethernet1/1] quit
# Configure an Internet interface for the LAN and configure the default route.
[RouterA] interface ethernet 1/2 [RouterA-Ethernet1/2] ip address 192.168.1.1 255.255.255.0 [RouterA-Ethernet1/2] quit [RouterA] ip route-static 0.0.0.0 0 dialer 1
If the IP addresses of the hosts in the LAN are private addresses, configure NAT on Router A. For more information about NAT, see HPE FlexNetwork MSR Router Series Comware 5 Layer 3—IP Services Configuration Guide.
Configure Router B as the PPPoE server:
# Add a PPPoE user.
<RouterB> system-view [RouterB] local-user user1 [RouterB-luser-user1] password simple 123456 [RouterB-luser-user1] service-type ppp [RouterB-luser-user1] quit
# Configure ATM 1/0 interface.
[RouterB] interface atm 1/0 [RouterB-Atm1/0] pvc 0/32 [RouterB-atm-pvc-Atm1/0-0/32] map bridge virtual-ethernet 1 [RouterB-atm-pvc-Atm1/0-0/32] quit [RouterB-Atm1/0] quit
# Enable PPPoE server on the virtual Ethernet interface.
[RouterB] interface virtual-ethernet 1 [RouterB-Virtual-Ethernet1] pppoe-server bind virtual-template 1 [RouterB-Virtual-Ethernet1] quit
# Configure virtual template 1.
[RouterB] interface virtual-template 1 [RouterB-Virtual-Template1] ppp authentication-mode pap domain system [RouterB-Virtual-Template1] remote address pool 1 [RouterB-Virtual-Template1] ip address 1.1.1.1 255.0.0.0 [RouterB-Virtual-Template1] quit
# Configure local authentication for the users in the default ISP domain system.
[RouterB] domain system [RouterB-isp-system] authentication ppp radius-scheme cams
# Add a local IP address pool that contains nine IP addresses.
[RouterB-isp-system] ip pool 1 1.1.1.2 1.1.1.10 [RouterB-isp-system] quit
# Configure RADIUS scheme.
[RouterB] radius scheme cams [RouterB-radius-cams] primary authentication 10.110.91.146 1812 [RouterB-radius-cams] primary accounting 10.110.91.146 1813 [RouterB-radius-cams] key authentication expert [RouterB-radius-cams] key accounting expert [RouterB-radius-cams] server-type extended [RouterB-radius-cams] user-name-format with-domain [RouterB-radius-cams] quit
For more information about RADIUS, see HPE FlexNetwork MSR Router Series Comware 5 Security Configuration Guide.