< Home

link-alive (upgrade-compatible command)

Function

The link-alive command enables the link-alive function on a GRE tunnel.

The undo link-alive command disables the link-alive function on a GRE tunnel.

By default, the link-alive function is disabled on a GRE tunnel.

Format

link-alive [ period period ] [ retry-times retry-times ]

undo link-alive

Parameters

Parameter Description Value
period Specifies the interval for sending link-alive packets. The value is an integer that ranges from 1 to 32767, in seconds. The default value is 5.
retry-times retry-times Specifies the tunnel-unreachable counter value. The value is an integer that ranges from 1 to 255. The default value is 3.

Views

Tunnel interface view

Default Level

2: Configuration level

Usage Guidelines

The link-alive function takes effect on a GRE tunnel immediately after you run the link-alive command on the tunnel interface. After you run the undo link-alive command, the link-alive function immediately becomes invalid. The source end of a GRE tunnel periodically sends link-alive packets. The tunnel-unreachable counter increases by 1 every time a link-alive packet is sent. If the source end does not receive any response packet when the tunnel-unreachable counter value reaches retry-times, the source end considers the remote end unreachable.

Example

# Enable the link-alive function on a GRE tunnel and retain the default parameter values.

<HUAWEI> system-view
[HUAWEI] interface tunnel 1
[HUAWEI-Tunnel1] tunnel-protocol gre
[HUAWEI-Tunnel1] link-alive

# Disable the link-alive function on a GRE tunnel.

<HUAWEI> system-view
[HUAWEI] interface tunnel 1
[HUAWEI-Tunnel1] undo link-alive

# Enable the link-alive function on a GRE tunnel. Set the interval for sending link-alive packets to 12 seconds and retain the default tunnel-unreachable counter value.

<HUAWEI> system-view
[HUAWEI] interface tunnel 1
[HUAWEI-Tunnel1] link-alive period 12

# Enable the link-alive function on a GRE tunnel. Set the interval for sending link-alive packets to 12 seconds and the tunnel-unreachable counter to 4.

<HUAWEI> system-view
[HUAWEI] interface tunnel 1
[HUAWEI-Tunnel1] link-alive period 12 retry-times 4
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >