When switch Functions as a DHCP Server, Can the DHCP Server Select an Address Pool Based on the Secondary IP Address?
In V200R009C00 and later versions, the DHCP server can select an address pool based on the secondary IP address.
Limitations:
- Only global address pools support secondary IP address-based address pool selection and interface address pools do not support this function.
- The DHCP server and client must be on the same network segment, and the DHCP relay agent cannot be configured.
Allocation Mechanism:
- The DHCP server preferentially selects the IP addresses that are statically bound using the static-bind command in the global address pool view.
- The DHCP server first searches for a valid IP address from the address pool corresponding to the primary IP address. If no address is available in this address pool, the DHCP server then searches for a valid IP address from the address pool corresponding to the secondary IP address.
Configuration Example:
#
ip pool 200
gateway-list 10.200.1.1
network 10.200.1.0 mask 255.255.255.0
dns-list 10.114.114.114
#
ip pool 201
gateway-list 10.201.1.1
network 10.201.1.0 mask 255.255.255.0
dns-list 10.114.114.114
#
interface Vlanif200
ip address 10.200.1.1 255.255.255.0
ip address 10.201.1.1 255.255.255.0 sub
dhcp select global
#