Generic Routing Encapsulation

From Wikipedia, the free encyclopedia
Jump to: navigation, search

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.

Example uses[edit]

  • 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[edit]

OSI model layer Protocol
5. Session X.225
4. Transport UDP
3. Network (GRE-encapsulated) IPv6
Encapsulation GRE
3. Network IPv4
2. Data Link Ethernet
1. Physical Ethernet physical layer

Based on the principles of protocol layering in OSI, protocol encapsulation, not specifically GRE, breaks the layering order. It may be viewed as a separator between two different protocol stacks, one acting as a carrier for another.

IP as a delivery protocol[edit]

GRE packets that are encapsulated within IP use IP protocol type 47.[1]

Packet header[edit]

A GRE packet header structure is represented in the diagram below. [Latest RFC 2784 && RFC 2890]

Bits 0–3 4–12 13–15 16–31
C K S Reserved0 Version Protocol Type
Checksum (optional) Reserved1 (optional)
Key (optional)
Sequence Number (optional)

Standards[edit]

  • 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)

References[edit]

  1. ^ RFC 1702: Generic Routing Encapsulation over IPv4 networks. October 1994.

External links[edit]