dhcp client expected-lease

Function

The dhcp client expected-lease command configures an expected lease time for a DHCP client.

The undo dhcp client expected-lease command cancels the configured expected lease time of a DHCP client.

By default, the expected lease time is not configured for a DHCP client.

Format

dhcp client expected-lease lease-time

undo dhcp client expected-lease

undo dhcp client expected-lease lease-time

Parameters

Parameter Description Value
lease-time

Specifies the expected lease time of a DHCP client.

The value is an integer ranging from 60 to 864000, in seconds.

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 sub-interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, PW-VE sub-interface view, VE sub-interface view, VLANIF interface view, Sub-interface view, Management interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

Some DHCP clients use a fixed IP address for a long time, and some DHCP clients use a temporary IP address. After a DHCP client's lease time configured using the lease command is expired, the DHCP server reclaims the IP address of the DHCP client and allocates this IP address to another DHCP client.

To configure the expected lease time for a DHCP client, run the dhcp client expected-lease command. While assigning an address lease time, the DHCP server compares the expected lease time with the address lease time of the current address pool and provides the DHCP client an appropriate lease time based on address assignment rules.

Example

# Configure the expected lease time of a DHCP client as 100 seconds on GE 0/1/0.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet0/1/0
[~HUAWEI-GigabitEthernet0/1/0] dhcp client expected-lease 100
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >