< Home

dhcp client expected-lease

Function

The dhcp client expected-lease command enables expected lease on a DHCP client.

The undo dhcp client expected-lease command disables expected lease on a DHCP client.

By default, expected lease is disabled on the DHCP client.

Format

dhcp client expected-lease time

undo dhcp client expected-lease

Parameters

Parameter

Description

Value

time

Specifies an expected lease for a DHCP client.

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

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

The dhcp client expected-lease command applies to DHCP clients. An expected lease can be contained in Option 51 of a DHCP Request message sent to the server. The server compares the expected lease with the lease in the address pool and assigns a shorter lease to the client.

When the device functions as the DHCP client, the lease cannot be shorter than 8 seconds. Otherwise, some packets are discarded. Therefore, the lease configured on the peer end DHCP server cannot be shorter than 8 seconds.

Example

# Set the expected lease to 7200s on VLANIF100.
<sysname> system-view
[sysname] interface vlanif 100
[sysname-Vlanif100] dhcp client expected-lease 7200
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >