The dhcp select interface command enables an interface to use the interface address pool.
The undo dhcp select interface command disables an interface from using the interface address pool.
By default, the DHCP server function using the interface address pool is disabled on an interface.
Usage Scenario
The dhcp select interface command applies to DHCP servers. After receiving a DHCP Request message from a DHCP client, a DHCP server assigns an IP address from the local address pool to the client. Run the dhcp select interface command to configure a DHCP server to assign IP addresses from the interface address pool to clients.
The device can also assign IP addresses from a global address pool using the dhcp select global command.
Prerequisites
DHCP has been enabled globally using the dhcp enable command in the system view.
An IP address has been configured for an interface using the ip address command. The IP addresses assigned by the address pool and configured on the interface are on the same network segment.
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] interface vlanif 100 [HUAWEI-Vlanif100] ip address 10.1.1.2 24 [HUAWEI-Vlanif100] dhcp select interface
<HUAWEI> system-view [HUAWEI] dhcp enable [HUAWEI] interface gigabitethernet 0/0/1 [HUAWEI-GigabitEthernet0/0/1] undo portswitch [HUAWEI-GigabitEthernet0/0/1] ip address 10.1.1.2 24 [HUAWEI-GigabitEthernet0/0/1] dhcp select interface