skip to main | skip to sidebar

Thursday, April 28, 2011

GRE Tunnel Keepalives:

1.It gives the ability for one side to originate and receive keepalive packets to and from the remote router even if the remote router does not support GRE keepalives.


2.The sender pre-builds the keepalive response packet inside the original keepalive request packet so that the remote end only needs to do the standard GRE decapsulation of the outer GRE IP header and then forward the inner IP GRE packet.

3.This mechanism causes the keepalive response to forward out the physical interface rather than the tunnel interface.

4.GRE keepalive timers on each side are independent and do not have to match.

This is an example of a keepalive packet that originates from Router A and is destined for Router B. The keepalive response that Router B returns to Router A is already pre-built by Router A and is inside the inner IP header. Router B simply decapsulates the keepalive packet and sends it back to Router A out the physical interface serial 2.


To configure GRE tunnel keepalive,


Router (config)# interface Tunnel 0

Router (config-if)# keepalive 5 4

The syntax of the command is keepalive [retries]. The seconds parameter indicates the interval at which a GRE keepalive packet should be sent. The retries parameter indicates the number of GRE keepalive responses allowed to miss before declaring the tunnel down.


The inner GRE protocol type is set to 0 while the outer GRE protocol type is IP (0x0800). Hence, when the sender receives a response with GRE protocol type 0, it understands that the packet is a GRE tunnel keepalive packet response that it sent to its neighbor/remote-end. It drops the response packet and sets the tunnel keepalive counter to 0.

Note: GRE tunnel keepalive is only supported on point-to-point GRE tunnels; not on multipoint GRE (mGRE).

0 comments: