79
Enabling DHCP server proxy on a DHCP relay
agent
The DHCP server proxy feature isolates DHCP servers from DHCP clients and protects DHCP
servers against attacks.
Upon receiving a response from the server, the DHCP server proxy modifies the server's IP address
as the relay interface's IP address before sending out the response. The DHCP client takes the
DHCP relay agent as the DHCP server.
To configure DHCP server proxy on a DHCP relay agent:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter interface view.
interface
interface-type
interface-number
N/A
3. Enable DHCP relay agent and
DHCP server proxy on the
interface.
dhcp select relay proxy
By default, the interface
operates in DHCP server mode.
Configuring a DHCP relay address pool
This feature allows DHCP clients of the same type to obtain IP addresses and other configuration
parameters from the DHCP servers specified in the matching relay address pool.
It applies to scenarios where the DHCP relay agent connects to clients of the same access type but
classified into different types by their locations. In this case, the relay interface typically has no IP
address configured. You can use the gateway-list command to specify the gateway address for
clients matching the same relay address pool and bind the gateway address to the device's MAC
address. Example network is the IPoE network.
Upon receiving a DHCP DISCOVER or REQUEST from a client that matches a relay address pool,
the relay agent processes the packet as follows:
• Fills the giaddr field of the packet with the specified gateway address.
• Forwards the packet to all DHCP servers in the matching relay address pool.
The DHCP servers select an address pool according to the gateway address.
If PPPoE users are in the network, follow these restrictions and guidelines when you configure the
relay address pool:
• Enable the DHCP relay agent to record DHCP relay entries by using the dhcp relay
client-information record command. When a PPPoE user goes offline, the DHCP relay agent
can find a matching relay entry and send a DHCP-RELEASE message to the DHCP server.
This mechanism ensures the DHCP server to be aware of the releasing of the IP address in a
timely manner.
• The remote-server command also configures the device as a DHCP relay agent. You do not
need to enable the DHCP relay agent by using the dhcp select relay command.
To configure a DHCP relay address pool:
Step Command Remarks
1. Enter system view.
system-view
N/A