< Home

(Optional) Configuring an Address Lease Time

Context

The default lease time in an address pool is 1 day. An administrator can change an address lease time based on network requirements. IP addresses in the same address pool use the same lease time, and different address pools can have different address leases specified. After the lease of an address pool is changed, newly allocated IP addresses use the new lease. The IP addresses that have been allocated before the lease is changed still use the old lease before the old lease is updated and use the new lease after the old lease is updated.

BOOTP clients do not support Option 51 (the IP address lease option). The lease of IP addresses allocated to BOOTP clients is unlimited, and these IP addresses will not be reclaimed by DHCP servers.

The IP addresses statically allocated to clients are always valid, without being limited by address lease time.

Procedure

  • Configure a lease time based on an interface address pool.
    1. Enter the system view.

      system-view

    2. Enter the interface or sub-interface view.

      interface interface-type interface-number[.subinterface-number ]

      Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731S-H, S5731-S, S5731S-S, S6720-HI, S5732-H, S6730-H, S6730S-H, S6730-S, S6730S-S, S6720-EI, and S6720S-EI support sub-interfaces.

    3. (Optional) On an Ethernet interface, run undo portswitch

      The interface is switched to Layer 3 mode.

      By default, an Ethernet interface works in Layer 2 mode.

      Only the S5720-EI, S5720-HI, S5730-HI, S5731-H, S5731-S, S5731S-H, S5731S-S, S5732-H, S6720-EI, S6720-HI, S6720S-EI, S6730-H, S6730S-H, S6730-S, and S6730S-S support switching between Layer 2 and Layer 3 modes.

    4. Specify an IP address lease time.

      dhcp server lease { day day [ hour hour [ minute minute ] ] | unlimited }

      By default, the IP address lease is 1 day.

  • Configure a lease time based on a global address pool.
    1. Enter the system view.

      system-view

    2. Enter the global address pool view.

      ip pool ip-pool-name

    3. Specify an IP address lease time.

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

      By default, the IP address lease is 1 day.

Verifying the Configuration

Run the display ip pool command to view information about the IP address lease. The values of the lease and left fields in the command output indicate the configured lease time and remaining lease time, respectively.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >