dhcp select

Use dhcp select to enable the DHCP server or DHCP relay agent on an interface.

Use undo dhcp select to disable the DHCP server or DHCP relay agent on an interface. The interface will discard incoming DHCP packets.

Syntax

dhcp select { relay [ proxy ] | server }

undo dhcp select { relay | server }

Default

The interface operates in the DHCP server mode and responds to DHCP requests with configuration parameters.

Views

Interface view

Predefined user roles

network-admin

mdc-admin

Parameters

relay: Enables the DHCP relay agent on the interface.

proxy: Enables the DHCP server proxy on the relay agent.

server: Enables the DHCP server on the interface.

Usage guidelines

Before enabling a DHCP server to operate as a DHCP relay agent, use the reset dhcp server ip-in-use command to clear address bindings and authorized ARP entries. These authorized ARP entries might conflict with ARP entries that are created after the DHCP relay agent is enabled.

When DHCP server proxy is enabled on the DHCP relay agent, the proxy forwards packets between the DHCP clients and DHCP server.

Examples

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

<Sysname> system-view
[Sysname] interface vlan-interface 2
[Sysname-Vlan-interface2] dhcp select relay

Related commands

dhcp relay server-address

dhcp relay source-address

dhcp smart-relay enable

reset dhcp server ip-in-use