< Home

(Optional) Configuring the Logging Function for IP Address Allocation

Context

Configuring the DHCP server to log IP address allocation provides you with records that may facilitate maintenance and diagnostics.

  • With this logging function enabled, if a large number of DHCP clients request IP addresses from the DHCP server, the server frequently records logs. The server performance may therefore be affected.
  • IP address allocation logs are recorded in the AM module. To view log information, the information center must be enabled. In addition, default settings for log output vary depending on various factors including the log level and output direction. For details, see Information Center Configuration in the CLI-based Configuration - Device Management Configuration Guide.

    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.

Procedure

  • Configure the logging function in 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. Enable the DHCP server to record IP address allocation logs.

      dhcp server logging [ allocation-fail | allocation-success | release | renew-fail | renew-success | detect-conflict | recycle-conflict ] *

      By default, the logging function is disabled.

  • Configure the logging function in a global address pool.
    1. Enter the system view.

      system-view 

    2. Enter the global address pool view.

      ip pool ip-pool-name

    3. Enable the DHCP server to record IP address allocation logs.

      logging [ allocation-fail | allocation-success | release | renew-fail | renew-success | detect-conflict | recycle-conflict ] *

      By default, the logging function is disabled.

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