dhcp server (interface view)

Function

The dhcp server command enables or disables the DHCP server function on an interface.

The undo dhcp server command restores the default configuration.

By default, the DHCP server function configuration on an interface is the same as that in the system view.

Format

dhcp server disable

dhcp server enable

undo dhcp server disable

undo dhcp server enable

Parameters

Parameter Description Value
enable

Enables the DHCP server function on an interface.

-

disable

Disables the DHCP server function on an interface.

-

Views

100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, GMPLS-UNI interface view, Global VE sub-interface view, LMP interface view, Loopback interface view, PW-VE sub-interface view, PW-VE interface view, Tunnel interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view, XGE interface view, Management interface view, Virtual template view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

By default, the DHCP server function configuration on an interface is the same as that in the system view. If the DHCP server function is enabled in the system view, an interface may be attacked. To prevent this issue, run the dhcp server disable command on the interface to disable the DHCP server function. If the DHCP server function is disabled in the system view but an interface needs to act as a DHCP server, run the dhcp server enable command on the interface to enable the DHCP server function.

Example

# Enable DHCP server on GigabitEthernet0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[*HUAWEI-GigabitEthernet0/1/1] dhcp server enable
# Disable the DHCP server function on GE 0/1/1.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/1
[*HUAWEI-GigabitEthernet0/1/1] dhcp server disable
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >