The force insert option command configures a DHCP server to forcibly insert an Option field specified in the global address pool or DHCP Option template to a DHCP Response packet that it sends to a DHCP client.
The undo force insert option command deletes the Option field forcibly inserted to a DHCP Response packet that a DHCP server sends to a DHCP client.
By default, a DHCP server does not forcibly insert an Option field to a DHCP Response packet that it sends to a DHCP client.
Parameter |
Description |
Value |
---|---|---|
code |
Specifies the code for a forcibly replied option. You can configure a DHCP server to forcibly reply one or more options. |
The value is an integer that ranges from 1 to 254. |
Usage Scenario
When a DHCP client applies for an IP address from a DHCP server, parameters contained in the DHCP Request packet specify the options the client requires. The DHCP server inserts the required options to a DHCP Response packet.
Sometimes, the DHCP server on the existing network receives a DHCP Request packet that contains no parameter specifying the options the client requires. However, the client still wants to obtain the options configured on the global address pool. You can run the force insert option code &<1-254> command to configure the DHCP server to forcibly insert an Option field to the DHCP Response packet.
Prerequisites
The Option field has been configured in the global address pool by running the option code [ sub-option sub-code ] { ascii ascii-string | hex hex-string | cipher cipher-string | ip-address ip-address &<1-8> } command in the global address pool view.
# Configure a DHCP server to forcibly insert Option 4 to a DHCP Response packet in the address pool pool1.
<HUAWEI> system-view [HUAWEI] ip pool pool1 [HUAWEI-ip-pool-pool1] option 4 hex 11 22 [HUAWEI-ip-pool-pool1] force insert option 4
<HUAWEI> system-view [HUAWEI] dhcp option template template1 [HUAWEI-dhcp-option-template-template1] option 4 hex 11 22 [HUAWEI-dhcp-option-template-template1] force insert option 4