You can enable the Keepalive function for a GRE tunnel to avoid selecting an unavailable GRE tunnel to transmit packets.
The Keepalive function can be configured on one end of a GRE tunnel to test the GRE tunnel status. If the remote end is found unreachable, the tunnel is disconnected on time to avoid data black hole.
The system view is displayed.
The tunnel interface view is displayed.
The Keepalive function is enabled.
The GRE tunnel Keepalive function is unidirectional. Therefore, to realize the Keepalive function on both ends, enable the Keepalive function on both ends of a GRE tunnel. One end can be configured with the Keepalive function regardless of whether the remote end is enabled with the Keepalive function. However, you are still advised to enable the Keepalive function on both ends of the GRE tunnel.
Before configuring the tunnel policy and the GRE tunnel for the VPN, enable the GRE tunnel Keepalive function. With this function enabled, the VPN does not select the GRE tunnel that cannot reach the remote end, and the data loss can be avoided. The reasons for enabling the Keepalive function are listed below:
If the Keepalive function is not enabled, the local tunnel interface may always be Up regardless of whether data reaches the remote end.
If the Keepalive function is enabled on the local end, the local tunnel interface is set to Down when the remote end is unreachable. As a result, the VPN does not select the unreachable GRE tunnel and the data is not lost.
The configuration is committed.