74
Specifying a gateway address for DHCP clients
By default, the DHCP relay agent fills the giaddr field of DHCP DISCOVER and REQUEST packets
with the primary IP address of the relay interface. You can specify a gateway address on the relay
agent for DHCP clients. The DHCP relay agent uses the specified gateway address to fill the giaddr
field of DHCP DISCOVER and REQUEST packets.
To specify a gateway address for DHCP clients:
Step Command Remarks
1. Enter system view.
system-view
N/A
2. Enter interface view.
interface
interface-type
interface-number
N/A
3. Specify a gateway address for
DHCP clients.
dhcp relay gateway
ip-address
By default, the DHCP relay
agent uses the primary IP
address of the relay interface as
the clients' gateway address.
Enabling client offline detection on the DHCP
relay agent
When an ARP entry ages out, the client offline detection feature deletes the relay entry for the IP
address and sends a RELEASE message to the DHCP server. The feature does not function if an
ARP entry is manually deleted.
To enable client offline detection on the 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 the DHCP relay agent.
dhcp select relay
By default, when DHCP is enabled,
an interface operates in the DHCP
server mode.
4. Enable the relay agent to
record relay entries.
dhcp relay
client-information record
By default, the relay agent does not
record relay entries.
Without relay entries, client offline
detection cannot function correctly.
5. Enable client offline detection.
dhcp client-detect
By default, client offline detection is
disabled on the DHCP relay agent.
Specifying the source address and gateway
address in DHCP requests
Perform this task to configure the relay agent to pad the source address and gateway address in
DHCP requests with the public IP address of the loopback interface. This configuration is required for
successful packet forwarding when the DHCP server is in the public network and the DHCP clients
are in a private network.