DHCP Client Cannot Obtain IP Addresses When switch Functions as the DHCP Relay Agent
Fault Description
When the switch functions as the DHCP relay agent, the DHCP client cannot obtain IP addresses.
Procedure
- Run the display current-configuration | include dhcp enable command to check whether DHCP is enabled. By default, DHCP is disabled.
- If no DHCP information is displayed, DHCP is disabled. Run the dhcp enable command to enable DHCP.
- If dhcp enable is displayed, DHCP is enabled.
- In the switch interface view, run the display this command to check whether the DHCP relay function is enabled.
- If dhcp select relay is displayed, the DHCP relay function is enabled. Go to step 3.
- If no information is displayed, the DHCP relay function is disabled. Then run the dhcp select relay command to enable the DHCP relay function.
- In the switch interface view, run the display this command to check whether the DHCP server is configured on the DHCP relay agent.
- If dhcp relay server-ip ip-address is displayed, the DHCP server IP address is configured on the DHCP relay agent.
- If dhcp relay server-select group-name is displayed, the interface on the DHCP relay agent is bound to a DHCP server group. Go to step 4.
- If no information is displayed, the DHCP server IP address is not configured on the DHCP relay agent. Configure the DHCP server using either of the following methods:
- Run the dhcp relay server-ip ip-address command to configure the DHCP server IP address on the DHCP relay agent.
- Run the dhcp-server command to add DHCP servers to the DHCP server group and run the dhcp relay server-select group-name command to bind the VLANIF interface to a DHCP server group.
- Run the display dhcp server group group-name command to check whether DHCP servers are configured in the DHCP server group.
- If the Server-IP field is displayed, DHCP servers are configured in the DHCP server group.
- If the Server-IP field is not displayed, DHCP servers are not configured in the DHCP server group. Then run the dhcp-server command to add DHCP servers to the DHCP server group.