< Home

dhcp client gateway-detect

Function

The dhcp client gateway-detect command enables gateway detection on a DHCP client.

The undo dhcp client gateway-detect command disables gateway detection on a DHCP client.

By default, gateway detection is disabled on a DHCP client.

Format

dhcp client gateway-detect period period retransmit retransmit timeout time

undo dhcp client gateway-detect

Parameters

Parameter

Description

Value

period period

Specifies an interval for gateway detection on a DHCP client.

The value is an integer that ranges from 1 to 86400, in seconds.

retransmit retransmit

Specifies the retransmission count of gateway detection on a DHCP client.

The value is an integer that ranges from 1 to 10.

timeout time

Specifies the timeout period of gateway detection on a DHCP client.

It is an integer that ranges from 300 to 2000, in milliseconds.

Views

Interface view

Default Level

2: Configuration level

Usage Guidelines

Usage Scenario

The dhcp client gateway-detect command applies to DHCP clients. After a DHCP client obtains an IP address, the dhcp client gateway-detect command enables the DHCP client to detect the status of the gateway being used. If the gateway has an incorrect address or the gateway device fails, the DHCP client requests a new IP address from the DHCP server.

Precautions

Gateway detection applies to dual-homed scenarios.

Example

# Enable gateway detection on VLANIF100 of the DHCP client. Set the detection interval to 3600s, retransmission count to 3, and timeout period to 500 ms.

<HUAWEI> system-view
[HUAWEI] interface vlanif 100
[HUAWEI-Vlanif100] dhcp client gateway-detect period 3600 retransmit 3 timeout 500
# Enable gateway detection on GE0/0/1 of the DHCP client. Set the detection interval to 3600s, retransmission count to 3, and timeout period to 500 ms.
<HUAWEI> system-view
[HUAWEI] interface gigabitethernet 0/0/1
[HUAWEI-GigabitEthernet0/0/1] undo portswitch
[HUAWEI-GigabitEthernet0/0/1] dhcp client gateway-detect period 3600 retransmit 3 timeout 500
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >