dhcp select relay

Syntax

dhcp select relay

undo dhcp select relay

View

Interface view

Default level

2: System level

Parameters

None

Description

Use dhcp select relay to enable the relay agent on the current interface. Upon receiving requests from an enabled interface, the relay agent will forward these requests to outside DHCP servers for IP address allocation.

Use undo dhcp select relay to restore the default.

After DHCP is enabled, the DHCP server is enabled on an interface by default. Upon receiving a client’s request from the interface, the DHCP server allocates an IP address from the DHCP address pool to the client.

When the operating mode of the interface is changed from DHCP server to DHCP relay agent, the IP address leases will not be deleted. To avoid this, delete the existing IP address leases when changing the interface operating mode to DHCP relay agent.

Examples

# Enable the DHCP relay agent on VLAN-interface 1.

<Sysname> system-view
[Sysname] interface vlan-interface 1
[Sysname-Vlan-interface1] dhcp select relay