< Home

dhcp server reserved ip-address mac

Function

The dhcp server reserved ip-address mac command enables the function of reserving IP address allocation records.

The undo dhcp server reserved ip-address mac command disables the function of reserving IP address allocation records.

By default, a device does not reserve IP address allocation records.

Format

dhcp server reserved ip-address mac

undo dhcp server reserved ip-address mac

Parameters

None

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

After a user goes offline, the IP address is reclaimed. The status of the IP address then is set to Idle and the device does not reserve allocation records of the IP address. When the user attempts to go online again, the user wants to use the original IP address. However, the device does not reserve any allocation record of the IP address and the original IP address may have been allocated to another user.

To resolve this issue, you can enable the function of reserving IP address allocation records. If a user goes offline after this function is enabled, the status of the IP address is set to Expired and the device reserves allocation records of the IP address based on the user's MAC address. If the user attempts to go online again, the device preferentially allocates the original IP address to the user.

Prerequisites

  1. The DHCP function has been enabled using the dhcp enable command in the system view.
  2. IP addresses in the interface address pool have been configured using the ip address command.

  3. The DHCP server function has been enabled on the interface using the dhcp select interface command.

Example

# Enable the function of reserving IP address allocation records in the interface address pool named VLANIF100.

<sysname> system-view
[sysname] dhcp enable
[sysname] interface vlanif 100
[sysname-Vlanif100] ip address 192.168.1.1 24
[sysname-Vlanif100] dhcp select interface
[sysname-Vlanif100] dhcp server reserved ip-address mac
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >