Generic Routing Encapsulation
Generic Routing Encapsulation (GRE) is a tunneling protocol developed by Cisco Systems that can encapsulate a wide variety of network layer protocols inside virtual point-to-point links over an Internet Protocol internetwork.
- In conjunction with PPTP to create VPNs.
- In conjunction with IPsec VPNs to allow passing of routing information between connected networks.
- In Mobility protocols.
- In A8/A10 interfaces to encapsulate IP data to/from Packet Control Function (PCF).
- Linux and BSD can establish ad-hoc IP over GRE tunnels which are interoperable with Cisco equipment.
- Aruba Access Points use GRE tunnels to establish a connection with their respective Aruba Mobility Controller. User data is transferred through this tunnel.
- Distributed denial of service (DDoS) protected appliance to an unprotected endpoint.
Example protocol stack
|OSI model layer||Protocol|
|3. Network (GRE-encapsulated)||IPv6|
|2. Data Link||Ethernet|
|1. Physical||Ethernet physical layer|
From what can be seen in the diagram above, protocol encapsulation (not specifically GRE) breaks the layering order in the OSI model terms. It may be viewed as a separator between two different protocol stacks, one acting as a carrier for another.
IP as a delivery protocol
|Checksum (optional)||Reserved1 (optional)|
|Sequence Number (optional)|
- RFC 1702: Generic Routing Encapsulation over IPv4 networks. October 1994.
- RFC 1701 — Generic Routing Encapsulation (GRE) (INFORMATIONAL)
- RFC 1702 — Generic Routing Encapsulation over IPv4 networks (INFORMATIONAL)
- RFC 2784 — Generic Routing Encapsulation (GRE) (PROPOSED STANDARD - Updated by RFC 2890)
- RFC 2890 — Key and Sequence Number Extensions to GRE (PROPOSED STANDARD)
- Cisco Systems