Generic routing encapsulation (GRE) is an stateless IP encapsulation protocol used to provide a private, secure path for transporting packets through an otherwise public network. Generic routing encapsulation (GRE) was initially developed by Cisco, but later became industry standard (RFC 1701 (Obsolete), RFC 2784, RFC 2890).
GRE was developed as a tunneling tool meant to carry any OSI Layer 3 protocol over an IP network. GRE essentially creates a private point-to-point connection like that of a virtual private network (VPN), but without encryption. GRE encapsulates data packets and redirects them to a device that de-encapsulates them and routes them to their final destination. This allows the source and destination switches to operate as if they have a virtual point-to-point connection with each other because the outer header applied by GRE is transparent to the encapsulated payload packet.
Data is routed by the system to the GRE endpoint over routes established in the route table. When a data packet is received by the GRE endpoint, it is de-encapsulated and routed again to its destination address. Other IP routers along the way do not parse the payload (the inner packet); they only parse the outer IP packet as they forward it towards the GRE tunnel endpoint.
GRE tunnels are stateless that is, the endpoint of the tunnel contains no information about the state or availability of the remote tunnel endpoint. Therefore, the switch operating as a tunnel source router cannot change the state of the GRE tunnel interface to down if the remote endpoint is unreachable.