< Home

expired (upgrade-compatible command)

Function

The expired command sets the lease for IP addresses in a global IP address pool.

By default, the lease of IP addresses is one day.

Format

expired { day day [ hour hour [ minute minute ] ] | unlimited }

Parameters

Parameter

Description

Value

day day

Specifies the number of days in the IP address lease.

The value is an integer ranging from 0 to 999, in days. The default value is 1.

hour hour

Specifies the number of hours in the IP address lease.

The value is an integer ranging from 0 to 23, in hours. The default value is 0.

minute minute

Specifies the number of minutes in the IP address lease.

The value is an integer ranging from 0 to 59, in minutes. The default value is 0.

unlimited

Indicates that the IP address lease is unlimited.

-

Views

IP address pool view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The expired-hide command applies to DHCP servers. To meet different client requirements, DHCP supports dynamic, automatic, and static address assignment. Different hosts require different IP address leases. For example, if some hosts such as a DNS server need to use certain IP addresses for a long time, configure expired as unlimited to set the IP address lease of the specified global address pool to unlimited. If some hosts such as a portable computer just need to user temporary IP addresses, set the IP address lease of the specified global address pool to the required time so that the expired IP addresses can be released and assigned to other clients.

When a DHCP client starts or half of its IP address lease has passed, the DHCP client sends a DHCP Request packet to the DHCP server to renew the lease. If the IP address can still be assigned to the client, the DHCP server informs a renewed IP address lease to the client. If the IP address can no longer be assigned to this client, the DHCP server informs the client that the IP address lease cannot be renewed and it needs to apply for another IP address.

Prerequisites

Run the ip pool command to create a global IP address pool and the dhcp enable command to globally enable the DHCP server function.

Precautions

Different IP address leases can be specified for different global IP address pools on a DHCP server. In a global IP address pool, all addresses have the same lease.

Example

# Specify the IP address lease of the global address pool global1 to 1 day 2 hours and 30 minutes.

<HUAWEI> system-view 
[HUAWEI] ip pool global1 
[HUAWEI-ip-pool-global1] expired  day 1 hour 2 minute 30
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
Next topic >