Keepalive Detection

Principles

The current GRE protocol does not have the function of link status detection. If the remote interface is unreachable, the tunnel cannot immediately close the tunnel connection. As a result, the source continuously forwards packets to the peer. The peer, however, discards all the packets because the tunnel is unreachable. A black hole is therefore generated.

The NetEngine 8000 F provides link status detection, also called Keepalive detection, for GRE tunnels. Keepalive detection is used to detect whether the tunnel link is in the Keepalive state at any time, specifically, whether the peer of the tunnel is reachable. If the peer is not reachable, the tunnel is disconnected to prevent data loss caused by black holes.

Implementation

After Keepalive detection is enabled, the ingress of the GRE tunnel periodically sends Keepalive detection packets to the peer. If the peer is reachable, the ingress receives a reply packet from the peer. Otherwise, the ingress cannot receive any reply packet. The details are as follows:
  1. After Keepalive detection is enabled, the source of a GRE tunnel creates a timer, periodically sends the Keepalive detection packets, and counts the number of detection packets. The number increases by one each time a detection packet is sent.

  2. The peer sends a reply packet to the source after receiving a detection packet.

  3. If the source receives a reply packet before the counter value reaches the preset value, the source considers the peer reachable and resets the counter. If the source does not receive any reply packet before the counter reaches the preset value, specifically, the retry times, the source considers the peer unreachable.

The endpoint of a GRE tunnel has a Keepalive detection mechanism if it has Keepalive detection configured. The peer does not need to have the Keepalive detection mechanism. After the peer receives a Keepalive detection packet, it sends a reply packet, regardless of whether it has Keepalive detection configured.

Benefits

Keepalive detection prevents data loss when the peer becomes unreachable, ensuring data transmission reliability.

Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >