The dhcp server ping command sets the maximum number of ping packets to be sent and the maximum response time of a ping packet.
The undo dhcp server ping command restores the default setting.
By default, the DHCP server sends 2 ping packets and the maximum response time is 500 ms.
dhcp server ping { packet number | timeout milliseconds } *
undo dhcp server ping { packet | timeout }
Parameter | Description | Value |
---|---|---|
packet number | Specifies the maximum number of ping packets to be sent. | The value is an integer ranging from 0 to 10. The value 0 indicates that no ping operation is performed. |
timeout milliseconds | Specifies the maximum response time of a ping packet. | The value is an integer that ranges from 0 to 10000, in milliseconds. The value 0 indicates that no ping operation is performed. |
Usage Scenario
This command applies to DHCP servers. Repetitive IP address assignment will cause IP address conflicts. To solve this problem, before assigning an IP address to a client, the DHCP server needs to send ping packets using the dhcp server ping command to check whether the IP address is in use. Address detection checks whether the DHCP server receives any response within a certain period of time. If there is no response within a certain period of time, the DHCP server continues to send ping packets to this address until the number of ping packets reaches the maximum value. If there is still no response, it indicates that the IP address is not in use. This ensures that the IP address assigned to the client is unique.
Prerequisites
DHCP has been enabled using the dhcp enable command.