Configure DHCP address pools on S series switch

0

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.

Other related questions:
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.

DHCP address pool modes on S series switches
When an S series switch excluding the S1700 functions as the DHCP server, the switch supports the interface-based and global address pools. - Interface-based address pool The interface address pool is on the network segment where the primary IP address of an interface is located. The DHCP server can only select and assign IP addresses on the network segment to clients. - Global address pool 1. If the DHCP server is on the same network segment as clients (no relay agent is deployed), the DHCP server selects IP addresses in the address pool on the network segment where the primary IP address of the interface connected to clients is located. If the interface is not configured with the primary IP address or no address pool is on the same network segment as the primary IP address, clients cannot request IP addresses. 2. If the DHCP server and clients are on different network segments (a relay agent is deployed), the DHCP server parses the received IP address (the primary IP address of the first interface configured with the relay function) specified by the giaddr field in the DHCP Request message, and selects the address pool on the same network segment as the IP address to assign addresses. If the IP address does not match the corresponding address pool, clients cannot request IP addresses. Follow the preceding rules to ensure that a client can obtain an IP address.

IP addresses in a DHCP address pool on S series switch are exhausted
If the number of allocatable IP addresses in the address pool exceeds the number of DHCP clients connected to the DHCP server, the address pool resources may be exhausted in the following situation: - Many attackers apply for IP addresses or an attacker applies for many IP addresses by changing the CHADDR field in DHCP Discover messages. In this case, configure DHCP snooping. - The DHCP server ping function has been configured on the DHCP server. This function allows the switch to ping allocated IP addresses before sending DHCP Offer messages. Any reply to the ping packets may cause the DHCP server to consider that an IP address conflict occurs, resulting in exhaustion of address pool resources. To solve this problem, use either of the following methods: 1. Configure port mirroring on the DHCP server to obtain the packet header, and determine whether address pool exhaustion is caused by the second reason. If yes, disable the corresponding client. 2. Run the undo dhcp server ping packet command to disable the DHCP server ping function.

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.

Configure DHCP server on S series switch based on the interface address pool
To configure the DHCP server based on the interface address pool for the S series switches (excluding the S1700), configure an IP address for the interface and the switch allocates addresses that are on the same network segment as the interface IP address to clients. This configuration mode is simple and applies only to scenarios where the DHCP server and clients are on the same network segment. That is, no DHCP relay exists.The configuration is as follows: [HUAWEI] dhcp enable //Enable DHCP. [HUAWEI] interface gigabitethernet 2/0/0 //Enter the view of the interface connected to the DHCP client. [HUAWEI-GigabitEthernet2/0/0] port link-type access [HUAWEI-GigabitEthernet2/0/0] port default vlan 10 [HUAWEI-GigabitEthernet2/0/0] quit [HUAWEI] interface vlanif 10 [HUAWEI-Vlanif10] ip address 10.1.1.1 24 //Configure the network segment where the DHCP client resides. The IP address range of the interface-based DHCP server is: 10.1.1.2 to 10.1.1.254. [HUAWEI-Vlanif10] dhcp select interface //Enable the DHCP server function based on the interface address pool. [HUAWEI-Vlanif10] dhcp server dns-list 114.114.114.114 //Specify the DNS server address in the interface address pool. [HUAWEI-Vlanif10] dhcp server lease day 2 //Set the lease of IP addresses to 2 days. [HUAWEI-Vlanif10] quit

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