dhcp ip-ttl

Function

The dhcp ip-ttl command sets the time to live (TTL) value for DHCP reply messages.

The undo dhcp ip-ttl command restores the default TTL value in DHCP reply messages.

By default, when the device functions as a DHCP server, the TTL is 255. When the device functions as a DHCP relay agent, the TTL is the value carried in the DHCP reply message received from the DHCP server.

Format

dhcp ip-ttl ttl-value

undo dhcp ip-ttl

Parameters

Parameter Description Value
ttl-value

Specifies a TTL value in DHCP reply messages.

The value is an integer ranging from 1 to 255.

Views

100ge sub-interface view, 100GE interface view, 10GE sub-interface view, 10GE interface view, 200GE sub-interface view, 25GE sub-interface view, 25GE interface view, 400GE sub-interface view, 400GE interface view, 40GE sub-interface view, 40GE interface view, 50GE sub-interface view, 50GE interface view, Eth-Trunk sub-interface view, Eth-Trunk interface view, FlexE interface view, GE optical interface view, GE sub-interface view, GE interface view, GE electrical interface view, Global VE sub-interface view, PW-VE sub-interface view, PW-VE interface view, VBDIF interface view, VE sub-interface view, VLANIF interface view, XGE interface view

Default Level

2: Configuration level

Task Name and Operations

Task Name Operations
dhcp write

Usage Guidelines

Usage Scenario

To specify a TTL value in DHCP reply messages, run the dhcp ip-ttl command on a DHCP server or relay agent.

Example

# Set the TTL value to 2 for DHCP reply messages sent by GE 0/1/0.
<HUAWEI> system-view
[~HUAWEI] interface GigabitEthernet 0/1/0
[~HUAWEI-GigabitEthernet0/1/0] dhcp ip-ttl 2
Copyright ? Huawei Technologies Co., Ltd.
Copyright ? Huawei Technologies Co., Ltd.
< Previous topic Next topic >