The dhcp policy-vlan generic command configures the generic DHCP policy VLAN.
The undo dhcp policy-vlan generic command deletes the generic DHCP policy VLAN.
By default, the function of generic DHCP policy VLAN is disabled on the device.
Parameter |
Description |
Value |
---|---|---|
priority priority |
Specifies the 802.1p priority of DHCP messages. |
The value is an integer that ranges from 0 to 7. The default value is 0. |
Usage Scenario
On a network supporting VLAN assignment based on IP subnets, upon receiving an untagged packet from a host, a switch adds a VLAN ID to the packet based on the source IP address of the packet. A host that accesses the network for the first time does not have a valid IP address. Therefore, the switch cannot add the host to the VLAN and the host cannot obtain a valid IP address or network settings. To make the host obtain a valid IP address from the DHCP server, run the dhcp policy-vlan generic command to configure the generic policy VLAN.
Hosts that access the network for the first time apply the generic DHCP policy VLAN only when they cannot apply DHCP policy VLAN based on MAC addresses or interfaces.
Prerequisites
DHCP has been enabled globally using the dhcp enable command in the system view.
Precautions
If you run this command in multiple VLAN views, only the latest configuration takes effect.