dhcp relay server-ip
Function
The dhcp relay server-ip command configures a DHCP server address on an interface enabled with DHCP relay.
The undo dhcp relay server-ip command deletes the configured DHCP server addresses on an interface enabled with DHCP relay.
By default, no DHCP server address on an interface enabled with DHCP relay is configured.
Usage Guidelines
Usage Scenario
This command applies to DHCP relay agents. When a DHCP client needs to send a DHCP Discover message to a DHCP server on a different network segment through a DHCP relay agent, you must configure the DHCP server address on the DHCP relay agent.
- The DHCP relay agent forwards the message to all DHCP servers by default, and changes the forwarding order each time it forwards a DHCP Discover message.
- You can configure the ip relay address cycle command to reduce the number of packets received by a DHCP server and lessen the load of a DHCP server. After this command is configured, the DHCP relay agent forwards a received DHCP Discover message to one DHCP server at a time, and forwards the DHCP Discover message to a different DHCP server each time it receives the message.
Prerequisites
DHCP relay has been enabled on the interface using the dhcp select relay command.
Precautions
If you run the dhcp relay server-ip command for multiple times, multiple DHCP server addresses are configured.
Each interface that is enabled with DHCP relay can be configured with a maximum of 8 DHCP server addresses.
Example
<Huawei> system-view [Huawei] dhcp enable [Huawei] vlan 100 [Huawei-vlan100] quit [Huawei] interface vlanif 100 [Huawei-Vlanif100] dhcp select relay [Huawei-Vlanif100] dhcp relay server-ip 10.1.1.2 [Huawei-Vlanif100] dhcp relay server-ip 10.1.1.3