Recording Exchange Messages with a DHCP Relay Client

A DHCP relay agent can record information exchanged between DHCP servers and clients based on a specific option or sub-option in DHCP packets to facilitate fault location.

Usage Scenario

If a DHCP client cannot obtain an IP address properly, a DHCP relay agent can be configured to record the information exchanged between DHCP servers and DHCP clients to help locate the fault. Then, the DHCP relay agent records the information exchanged between the DHCP client and server based on the specified option code and sub-option code in DHCP packets.

Procedure

  1. Run system-view

    The system view is displayed.

    • The cleared history records of information exchange cannot be restored. Exercise caution while running the reset dhcp relay client-info command.

  2. (Optional) Run reset dhcp relay client-info [ interface interface-type interface-number [ pevlan pevlan-id [ end-pevlan-id ] [ cevlan cevlan-id [ end-cevlan-id ] ] ] | mac-address mac-address | option option-value ]

    The history records of exchanges between the DHCP client and server over the DHCP relay agent have been cleared.

  3. Run dhcp relay client-info option option-code [ sub-option sub-option-code ]

    The DHCP relay agent has been configured to specify the DHCP packets to recorded.

  4. Run commit

    The configuration is committed.

Checking the Configurations

  • Run the display dhcp relay client-info option configuration command in any view to view the DHCP option code or sub-option code based on which the DHCP relay agent records DHCP packets.
  • Run the display dhcp relay client-info [ interface interface-type interface-number [ pevlan pevlan-id [ end-pevlan-id ] [ cevlan cevlan-id [ end-cevlan-id ] ] ] | mac-address mac-address | option option-value ] command in any view to view history records of the information exchanged between the DHCP client and server over the DHCP relay agent.
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic