dhcp reply

Function

The dhcp reply command configures the broadcast or unicast type of response packets sent by the DHCP server.

The undo dhcp reply command restores the default configuration.

By default, the DHCP server replies with broadcast or unicast packets based on the broadcast flag carried in request packets.

Format

dhcp reply { unicast-always | broadcast-always }

undo dhcp reply [ unicast-always | broadcast-always ]

Parameters

Parameter Description Value
unicast-always

Indicates that the DHCP server replies with unicast packets.

-

broadcast-always

Indicates that the DHCP server replies with broadcast packets.

-

Views

IP address pool view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

According to standard protocols, when the DHCP relay and a DHCP client are on the same network segment, the DHCP server checks whether client requests carry the broadcast flag. If so, the DHCP server replies with broadcast packets. If not, the DHCP server replies with unicast packets.

  • A DHCP client sends Discover packets, which are broadcast packets, when submitting an online request. The DHCP server replies with Offer packets. Whether the Offer packets are unicast or broadcast depends on the broadcast flag in the Discover packets.
  • The DHCP client sends Request packets, which are also broadcast packets, upon receipt of Offer packets. The DHCP server then replies with Ack or Nak packets.
    • In the case of Ack packets, the DHCP server determines whether to broadcast or unicast packets based on the broadcast flag in the Request packets.
    • In the case of Nak packets, the DHCP server replies with broadcast packets to the DHCP client.

      In either of the preceding conditions, if the dhcp reply has been run on the DHCP server, the DHCP server ignores the broadcast flag in client requests and simply broadcasts or unicasts packets based on parameter settings.

Example

# Configure the DHCP server to send broadcast packets in response to client requests in the address pool named huawei.
<HUAWEI> system-view
[~HUAWEI] ip pool huawei server
[~HUAWEI-ip-pool-huawei] dhcp reply unicast-always
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >