option force-reply

Function

The option force-reply command configures a DHCP server to forcibly reply a specified DHCP option to a client.

The undo option force-reply command deletes the configuration.

By default, the DHCP option forcibly replied to a DHCP client by a DHCP server is not configured in an address pool.

Format

option force-reply { option-code } &<1-16>

undo option force-reply [ { option-code } &<1-16> ]

Parameters

Parameter Description Value
option-code

Specifies a DHCP option code.

The value is an integer ranging from 2 to 254.

Views

IP address pool view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

The DHCP server does not respond if the DHCP packets received from a DHCP client do not contain some DHCP option information. However, if such option information as option 6 (carrying the DNS server address) is not contained in DHCP packets, the DHCP client fails to be connected. To address the problem, run the option force-reply command to configure the DHCP server to forcibly reply a specified DHCP option to a client.

Configuration Impact

After the option force-reply command is executed, the DHCP server sends the DHCP option specified in the command to a client no matter whether this client is requested or not.

Precautions

If you run the option force-reply command on a DHCP server several times, all the configured DHCP options take effect. A maximum of 16 forcibly replied DHCP options can be configured in an IP address pool.

Information about the configured DHCP option code must be supported by the DHCP server. Otherwise, the server cannot forcibly reply the DHCP option to the client.

If the option router disable command is used to disable the sending of Option 3 (gateway address) in addition to the option force-reply, the configuration of the option router disable command takes effect preferentially due to a higher priority.

Example

# Configure a DHCP server to forcibly reply Option 3 to a client in an address pool named huawei.
<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[~HUAWEI-ip-pool-huawei] option force-reply 3
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >