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.
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.<HUAWEI> system-view [~HUAWEI] dhcp server database recover
<HUAWEI> system-view [~HUAWEI] dhcp server database enable [*HUAWEI] dhcp server database write-delay 36000