PPPoE server IP address assignment through the local DHCP server configuration example

Network requirements

As shown in Figure 13, configure the PPPoE server as a DHCP server to assign an IP address to the host.

Figure 13: Network diagram

Configuration procedure

# Configure Virtual-Template 10 to use PAP for authentication and use a DHCP address pool for IP address assignment.

<Router> system-view
[Router] interface virtual-template 10
[Router-Virtual-Template10] ppp authentication-mode pap
[Router-Virtual-Template10] remote address pool pool1
[Router-Virtual-Template10] quit

# Enable the PPPoE server on GigabitEthernet 1/0/1, and bind the interface to Virtual-Template 10.

[Router] interface gigabitethernet 1/0/1
[Router-GigabitEthernet1/0/1] pppoe-server bind virtual-template 10
[Router-GigabitEthernet1/0/1] quit

# Enable DHCP.

[Router] dhcp enable

# Configure DHCP address pool pool1.

[Router] dhcp server ip-pool pool1
[Router-dhcp-pool-pool1] network 1.1.1.0 24
[Router-dhcp-pool-pool1] quit

# Create a PPPoE user.

[Router] local-user user1 class network
[Router-luser-network-user1] password simple pass1
[Router-luser-network-user1] service-type ppp
[Router-luser-network-user1] quit

Verifying the configuration

# Log in to the router by using username user1 and password pass1.

# Display information about IP addresses assigned by the DHCP server.

[Router] display dhcp server ip-in-use
IP address       Client identifier/    Lease expiration      Type
                 Hardware address
1.1.1.2          3030-3030-2e30-3030-  Unlimited             Auto(C)
                 662e-3030-3033-2d45-
                 7468-6572-6e65-74

The output shows that the router has assigned an IP address to the host.