keepalive

Configures GRE link keepalive.
Syntax
keepalive [ interval [ retries ] ]
no keepalive [ interval [ retries ] ]
Command Default

GRE link keepalive is not enabled.

Parameters
interval
Specifies the number of seconds between each initiation of a keepalive message. The range if from 2 to 32767 seconds and the default is 10 seconds.
retries
Specifies the number of times that a packet is sent before the system places the tunnel in the DOWN state. Valid values are from 1 through 255. The default number of retries is 3.
Modes

Tunnel interface configuration mode

Usage Guidelines

When GRE tunnels are used in combination with static routing or policy-based routing, and a dynamic routing protocol such as RIP, BGP, or OSPF is not deployed over the GRE tunnel, a configured tunnel does not have the ability to bring down the line protocol of either tunnel endpoint, if the far end becomes unreachable. Traffic sent on the tunnel cannot follow alternate paths because the tunnel is always UP. To avoid this scenario, enable GRE link keepalive, which will maintain or place the tunnel in an UP or DOWN state based upon the periodic sending of keepalive packets and the monitoring of \responses to the packets. If the packets fail to reach the tunnel far end more frequently than the configured number of retries, the tunnel is placed in the DOWN state

The no form of the command disables GRE keepalive.

Examples

The following example enables GRE keepalive and sets the keepalive interval and retries.

device(config)# keepalive 500 150