![H3C SR8800-F Configuration Manual Download Page 301](http://html2.mh-extra.com/html/h3c/sr8800-f/sr8800-f_configuration-manual_4025863301.webp)
285
Procedure
# Configure Virtual-Template 10 to use PAP for authentication and use a DHCP address pool to
allocate IP addresses and DNS server IP addresses for users.
<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 3/1/1, and bind the interface to Virtual-Template 10.
[Router] interface gigabitethernet 3/1/1
[Router-GigabitEthernet3/1/1] pppoe-server bind virtual-template 10
[Router-GigabitEthernet3/1/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] gateway-list 1.1.1.1 export-route
[Router-dhcp-pool-pool1] dns-list 8.8.8.8
# Exclude the IP address 1.1.1.1 from dynamic allocation in DHCP address pool
pool1
.
[Router-dhcp-pool-pool1] forbidden-ip 1.1.1.1
[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.
Example: Assigning the PPPoE server IP address through a
remote DHCP server
Network configuration
, configure the PPPoE server as a DHCP relay agent to relay an IP address
from the DHCP server to the host.