The logging command enables the logging function during IP address allocation of the DHCP server in the IP address pool view.
The undo logging command disables the logging function during IP address allocation of the DHCP server in the IP address pool view.
By default, the logging function during IP address allocation of the DHCP server is disabled.
logging [ allocation-fail | allocation-success | release | renew-fail | renew-success | detect-conflict | recycle-conflict ] *
undo logging [ allocation-fail | allocation-success | release | renew-fail | renew-success | detect-conflict | recycle-conflict ] *
Parameter | Description | Value |
---|---|---|
allocation-fail |
Displays logs when address allocation fails. |
- |
allocation-success |
Displays logs when address allocation succeeds. |
- |
release |
Displays logs when addresses are released. |
- |
renew-fail |
Displays logs when address lease renewal fails. |
- |
renew-success |
Displays logs when address lease renewal succeeds. |
- |
detect-conflict |
Displays logs when address conflict occurs. |
- |
recycle-conflict |
Displays logs when conflicting addresses are reclaimed. |
- |
Usage Scenario
This command is used on a DHCP server. When the DHCP server allocates IP addresses to clients, it records address allocation information to facilitate routine maintenance and fault location. After the logging function during IP address allocation of the DHCP server is configured using the logging command, the DHCP server records logs about address allocation, conflict, lease renewal, and release.
Run the display ip pool name ip-pool-name command to check the status of the logging function during IP address allocation of the DHCP server.
Prerequisites
The global address pool has been created using the ip pool (system view) command.
Precautions
For example, the level of logs indicating that an IP address is successfully allocated, an IP address is successfully renewed, and an IP address is successfully released is informational, and these logs are not recorded in the log buffer by default. You can run the info-center source AM channel 4 log level informational command to change the level of the logs to be recorded in the log buffer. You can then run the display logbuffer command to check the preceding logs.