< Home

Resetting a DHCP Address Pool

Context

To force a DHCP server to re-allocate IP addresses to clients or to set IP addresses in an address pool to idle (idle IP addresses will be preferentially allocated), reset an address pool.

Procedure

  • Run the following commands to reset address pools on the device.

    • Interface address pool:

      reset ip pool interface interface-name { start-ip-address [ end-ip-address ] | all | conflict | expired | used }

    • Global address pool:

      reset ip pool name ip-pool-name { start-ip-address [ end-ip-address ] | all | conflict | expired | used }

  • Configure a DHCP relay agent to request a DHCP server to release IP addresses of clients.

    After a DHCP relay agent is configured to request the DHCP server to release IP addresses of clients, it sends DHCP Release messages to the specified DHCP server. After receiving the message, the DHCP server restores specified IP addresses to the idle status. Released IP addresses can then be allocated to other clients. Run the following commands to configure the DHCP relay agent to request the DHCP server to release IP addresses of clients:

    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. Run the dhcp relay release client-ip-address mac-address [ vpn-instance vpn-instance-name ] [ server-ip-address ] command to request the DHCP server to release IP addresses allocated to DHCP clients.

      The parameter vpn-instance vpn-instance-name cannot be configured in the interface view.

      • When you run the preceding command in the system view:
        • If no DHCP server is specified, the DHCP relay agent sends DHCP Release messages to all DHCP servers connected to DHCP relay-enabled interfaces.
        • If a DHCP server is specified, the DHCP relay agent sends DHCP Release messages to only the specified DHCP server.
      • When you run the preceding command in the interface view:
        • If no DHCP server is specified, the DHCP relay agent sends DHCP Release messages to the DHCP server connected to this interface.
        • If a DHCP server is specified, the DHCP relay agent sends DHCP Release messages to only the specified DHCP server.

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