Address allocation rules on S series switch

0

When an S series switch (except S1700 switches) functions as a DHCP server, the switch adds IP addresses in an address pool to different IP address lists based on the IP address status. Unallocated IP addresses belong to the allocatable IP address list. Allocated IP addresses belong to the in-use IP address list. Conflicting IP addresses belong to the conflicting IP address list. IP addresses that cannot be allocated belong to the unallocatable IP address list. The DHCP server selects an IP address for a client from the address pool in the following sequence:
1. IP address statically bound to the MAC address of the client on the DHCP server
2. IP address that has once been allocated to the client
3. IP address specified in the Option 50 field (requested IP address) in the DHCP Discover message sent by the client
4. Largest allocatable IP address
5. If the DHCP server does not find any allocatable IP address, it searches for the expired IP addresses and conflicting IP addresses in turn, and then allocates a valid IP address to the client. If all the IP addresses are in use, the DHCP server replies with a DHCP NAK message to notify the client that no IP address is available. After receiving the DHCP NAK message, the DHCP client sends a DHCP Discover message to apply for a new IP address.

The switch can exclude some IP addresses that cannot be allocated through DHCP from the address pool. For example, if 192.168.1.100/24 has been manually configured for the DNS server, the DHCP server needs to exclude IP address 192.168.1.100 from the address pool on network segment 192.168.1.0/24. In this way, IP address 192.168.1.100 will not be allocated through DHCP, preventing IP address conflicts.

Other related questions:
What are address allocation rules for S series switches
When functioning as a DHCP server, an S series switch (excluding the S1700) adds IP addresses in an address pool to different IP address lists based on the IP address status. Unallocated IP addresses belong to the allocatable IP address list. Allocated IP addresses belong to the in-use IP address list. Conflicting IP addresses belong to the conflicting IP address list. IP addresses that cannot be allocated belong to the unallocatable IP address list. The DHCP server selects an IP address for a client from the address pool in the following sequence: 1. IP address statically bound to the MAC address of the client on the DHCP server 2. IP address that has been allocated to the client 3. IP address specified in the Option50 field (requested IP address) in the DHCP Discover message from the client 4. Largest allocatable IP address 5. If the DHCP server does not find any allocatable IP address, it searches for the expired IP addresses and conflicting IP addresses in turn, and then allocates a valid IP address to the client. If all the IP addresses are in use, the DHCP server replies with a DHCP NAK message to notify the client that no IP address is available. After receiving the DHCP NAK message, the DHCP client sends a DHCP Discover message to apply for a new IP address. The device can exclude some IP addresses that cannot be allocated through DHCP from address pools. For example, if IP segment 192.168.1.100/24 has been manually configured for the DNS server, the DHCP server needs to exclude this IP address from the address pool on network segment 192.168.1.0/24. In this way, IP address 192.168.1.100 will be not allocated through DHCP, preventing IP address conflicts.

Check address allocation on S series switch
On S series switches except S1700 switches, you can view information about IP addresses in an address pool as follows: - If an interface address pool is used, run the display ip pool [ interface interface-pool-name [ start-ip-address [ end-ip-address ] | all | conflict | expired | used ] ] command. - If a global address pool is used, run the display ip pool [ name ip-pool-name [ start-ip-address [ end-ip-address ] | all | conflict | expired | used ] ] command. You can configure fields in the command as required: - To view information about all IP addresses in an address pool, specify all. - To view information about conflicting IP addresses in an address pool, specify conflict. - To view information about expired and idle IP addresses in an address pool, specify expired. - To view information about used IP addresses in an address pool, specify used. - To view information about a specific IP address or an IP address range in an address pool, specify start-ip-address [ end-ip-address ].

Method to check IP addresses allocation on S series switches
For S series switches excluding the S1700, run the following commands as required to check IP addresses allocation: - If IP addresses are assigned based on the interface address pool, run the display ip pool [ interface interface-pool-name [ start-ip-address [ end-ip-address ] | all | conflict | expired | used ] ] command. - If IP addresses are assigned based on the global address pool, run the display ip pool [ name ip-pool-name [ start-ip-address [ end-ip-address ] | all | conflict | expired | used ] ] command. Note: - Specify all to check allocation of all the IP addresses. - Specify conflict to check conflicting IP addresses. - Specify expired to check expired IP addresses that are in idle state. - Specify used to check used IP addresses. - Specify start-ip-address [ end-ip-address ] to check allocation of an IP address or some IP addresses.

Incorrect IP address allocation on S series switch
A DHCP client sends request messages (DHCP Discover) in broadcast mode. If there is more than one DHCP server (private DHCP server) on the same network segment, the clients may obtain IP addresses from unauthorized servers. In this case, you can configure the DHCP snooping function, so that clients receive DHCP messages and obtain IP addresses only from authorized DHCP servers. Configure the DHCP snooping function as follows: 1. Enable DHCP snooping globally. [HUAWEI] dhcp enable [HUAWEI] dhcp snooping enable 2. Configure the interfaces connected to DHCP clients. Perform the configuration on all interfaces connected to DHCP clients. Configuration of interface GE1/0/1 is used as an example. [HUAWEI] interface gigabitethernet 1/0/1 [HUAWEI-GigabitEthernet1/0/1] dhcp snooping enable [HUAWEI-GigabitEthernet1/0/1] quit 3. Configure the interface connected to the DHCP server. [HUAWEI] interface gigabitethernet 1/0/2 [HUAWEI-GigabitEthernet1/0/2] dhcp snooping trusted [HUAWEI-GigabitEthernet1/0/2] quit Note: - For a Layer 2 access switch, steps 1, 2, and 3 are mandatory and need to be performed in sequence. - For a DHCP relay agent, only steps 1 and 2 are required.

Reason why the lease of some addresses in the address pool displays - on S series switches
Run the display ip pool [ { interface interface-pool-name | name ip-pool-name } [ start-ip-address [ end-ip-address ] | all | conflict | expired | used ] ] command to check DHCP address pool allocation on S series switches excluding the S1700. You can find that some addresses�?lease display -. This is because these addresses are one of idle, excluded, statically bound, and conflicting addresses.

If you have more questions, you can seek help from following ways:
To iKnow To Live Chat
Scroll to top