dhcp server database

Function

The dhcp server database command enables the function of storing and restoring DHCP data.

The undo dhcp server database command disables the function of storing and restoring DHCP data.

By default, the function of storing and restoring DHCP data is disabled.

Format

dhcp server database { enable | recover | write-delay interval }

undo dhcp server database { enable | recover | write-delay }

Parameters

Parameter Description Value
enable

Enables the function of storing DHCP data.

-

recover

Restores DHCP data from a storage device.

-

write-delay interval

Specifies the interval for storing DHCP data.

The value is an integer ranging from 300 to 86400, in seconds. The default value is 300.

Views

System view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

To prevent against unexpected data loss, run the dhcp server database enable command to enable the DHCP data storage function. The system saves the lease.txt and conflict.txt files to a DHCP folder on the CF card. After one-to-many mapping between one MAC address and multiple sessions is enabled, the system will generate an option82_index.data file to save the Option 82 information of users. The system automatically saves DHCP data at an interval and the previous data files are overwritten. To configure such interval, run the dhcp server database write-delay interval command.

To restore DHCP data from a storage file when a device becomes faulty, run the dhcp server database recover command after the system is restarted.

Configuration Impact

After the dhcp server database enable command is executed, if a large number of clients go online concurrently, the online rate will be decreased greatly. Only a minority of clients can rapidly go online.

Precautions

Do not manually delete the lease.txt, option82_index.data, or conflict.txt file. Otherwise, DHCP data cannot be restored after the system is restarted. The files are overwritten at a specified interval; therefore, you are advised to back up the files in a different location.

The data storage function is independent of the data restoration function.

Example

# Enable the DHCP data storage function on storage device.
<HUAWEI> system-view
[~HUAWEI] dhcp server database recover
# Enable the DHCP data storage function and set the storage interval to 36,000 seconds.
<HUAWEI> system-view
[~HUAWEI] dhcp server database enable
[*HUAWEI] dhcp server database write-delay 36000
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >