< Home

(Optional) Excluding IP Addresses from an Address Pool

Context

To prevent a DHCP server from allocating specific IP addresses, exclude these IP addresses from the address pool.

You do not need to exclude the gateway address configured using the gateway-list or dhcp server gateway-list command from being automatically allocated. The device automatically adds the gateway address into the list of IP addresses that cannot be automatically allocated.

You do not need to exclude the IP address of a server's interface connecting to a client from being automatically allocated. The device automatically sets the interface IP address to the Conflict status during address allocation.

Procedure

  • Exclude IP addresses from 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. Specify the range of IP addresses to exclude from the address pool.

      dhcp server excluded-ip-address start-ip-address [ end-ip-address ]

      By default, all IP addresses are automatically allocated from the address pool.

      To set multiple IP address ranges that cannot be automatically allocated from the address pool, run this command multiple times.

      For example, to exclude 192.168.1.10 from the range of IP addresses that can be automatically allocated, run:

      [HUAWEI-Vlanif100] dhcp server excluded-ip-address 192.168.1.10

  • Exclude IP addresses from a global address pool.
    1. Enter the system view.

      system-view

    2. Enter the global address pool view.

      ip pool ip-pool-name

    3. Specify the range of IP addresses to exclude from the address pool.

      excluded-ip-address start-ip-address [ end-ip-address ]

      By default, all IP addresses are automatically allocated from the address pool.

      To set multiple IP address ranges that cannot be automatically allocated from the address pool, run this command multiple times.

      For example, to exclude 192.168.1.10 from the range of IP addresses that can be automatically allocated, run:

      [HUAWEI-ip-pool-global_f1] excluded-ip-address 192.168.1.10

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