Method to release DHCP address pool and configure the lease on S series switches


S series switches excluding the S1700 allow the DHCP address pool to be manually released and support configurable lease for IP addresses dynamically assigned through DHCP.

Other related questions:
Check DHCP IP address lease on S series switch
On S series switches except S1700 switches, you can view the lease of 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 ] ] command. - If a global address pool is used, run the display ip pool name ip-pool-name [ start-ip-address [ end-ip-address ] ] command. The Lease field in the command output indicates the lease of IP addresses.

DHCP address lease configuration on S series switch
For S series switches (except S1700 switches), IP addresses that are dynamically allocated by a DHCP server have leases. The lease is configurable and defaults to 1 day. IP address leases can be specified for global and interface address pools. For example, to set the IP address lease of the address pool pl to 10 days, perform the following configuration: - Global address pool [HUAWEI] ip pool p1 [HUAWEI-ip-pool-p1] lease day 10 - Interface address pool [HUAWEI] interface vlanif 10 [HUAWEI-Vlanif10] dhcp select interface [HUAWEI-Vlanif10] dhcp server lease day 10 Different address pools on a DHCP server can be configured with different IP address leases, but IP addresses in the same address pool must have the same lease.

Reasons why the DHCP address pool is exhausted on S series switches
If the allocated address pool resources far exceed the number of clients connected to a switch, the following causes may result in address pool exhaustion: - An attacker sends a large number of DHCP Discover messages by continuously changing the CHADDR field. As a result, the address pool resources are exhausted. In this case, DHCP snooping can be deployed. - DHCP server is configured with the DHCP server ping function. With this function, the switch attempts to ping the allocated address before sending the DHCP Offer message. If clients respond to ping packets on the network, the DHCP server may incorrectly determine address conflicts. As a result, the address pool resources are exhausted. There are two solutions: Obtain the packet header through port mirroring on the DHCP server and check whether the determination is correct. If so, the client can be disabled. 2. Disable the DHCP server ping function by using the undo dhcp server ping packet command.

Configure DHCP address pools on S series switch
When functioning as DHCP servers, S series switches (except S1700 switches) support the interface and global address pool configurations. - Interface address pool: The network segment to which the primary IP address of an interface belongs is an interface address pool. The DHCP server allocates IP addresses only on this network segment to clients connected to the interface. - Global address pool: 1. If a switch functioning as the DHCP server is on the same network segment as clients (that is, no DHCP relay agent is configured), the switch allocates IP addresses on the same network segment as the primary IP address of the interface connected to clients. If no primary IP address is configured for the interface or no address pool is on the same network segment as the interface's primary IP address, the clients cannot obtain IP addresses. 2. If a switch functioning as the DHCP server is on a different network segment from a DHCP client (that is, a DHCP relay agent is configured), the DHCP server parses the IP address (primary IP address of the first DHCP relay agent's interface) specified in the giaddr field of a DHCP Request packet, and allocates an IP address on the same network segment as the parsed IP address from an address pool to the client. If no address pool matches the parsed IP addresses, the client cannot obtain an IP address. When configuring address pools, follow the preceding rules to ensure that clients can obtain IP addresses.

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