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.