Configuring a DHCP address pool on the DHCP relay agent
This feature allows DHCP clients of the same type to obtain IP addresses and other configuration parameters from the DHCP servers specified in the matching DHCP address pool.
It applies to scenarios where the DHCP relay agent connects to clients of the same access type but classified into different types by their locations. In this case, the relay interface typically has no IP address configured. You can use the gateway-list command to specify gateway addresses for clients matching the same DHCP address pool and bind the gateway addresses to the device's MAC address.
Upon receiving a DHCP DISCOVER or REQUEST from a client that matches a DHCP address pool, the relay agent processes the packet as follows:
Fills the giaddr field of the packet with a specified gateway address.
Forwards the packet to all DHCP servers in the matching DHCP address pool.
The DHCP servers select a DHCP address pool according to the gateway address.
To configure a DHCP address pool on the DHCP relay agent:
Step | Command | Remarks |
---|---|---|
1. Enter system view. | system-view | N/A |
2. Create a DHCP address pool and enter its view. | dhcp server ip-pool pool-name | By default, no DHCP address pools exist. |
3. Specify gateway addresses for the clients matching the DHCP address pool. | gateway-list ip-address&<1-64> | By default, no gateway address is specified. |
4. Specify DHCP servers for the DHCP address pool. | remote-server ip-address&<1-8> | By default, no DHCP server is specified for the DHCP address pool. You can specify a maximum of eight DHCP servers for one DHCP address pool for high availability. The relay agent forwards DHCP DISCOVER and REQUEST packets to all DHCP servers in the DHCP address pool. |