Generic Routing Encapsulation (GRE)
RFC 1701

Document Type RFC - Informational (October 1994; No errata)
Was draft-hanks-gre (individual)
Last updated 2013-03-02
Stream Legacy
Formats plain text pdf html bibtex
Stream Legacy state (None)
Consensus Boilerplate Unknown
RFC Editor Note (None)
IESG IESG state RFC 1701 (Informational)
Telechat date
Responsible AD (None)
Send notices to (None)
Network Working Group                                           S. Hanks
Request for Comments: 1701                               NetSmiths, Ltd.
Category: Informational                                            T. Li
                                                            D. Farinacci
                                                               P. Traina
                                                           cisco Systems
                                                            October 1994

                  Generic Routing Encapsulation (GRE)

Status of this Memo

   This memo provides information for the Internet community.  This memo
   does not specify an Internet standard of any kind.  Distribution of
   this memo is unlimited.

Abstract

   This document specifies a protocol for performing encapsulation of an
   arbitrary network layer protocol over another arbitrary network layer
   protocol.

Introduction

   A number of different proposals [RFC 1234, RFC 1226] currently exist
   for the encapsulation of one protocol over another protocol. Other
   types of encapsulations [RFC 1241, SDRP, RFC 1479] have been proposed
   for transporting IP over IP for policy purposes. This memo describes
   a protocol which is very similar to, but is more general than, the
   above proposals.  In attempting to be more general, many protocol
   specific nuances have been ignored.  The result is that this proposal
   is may be less suitable for a situation where a specific "X over Y"
   encapsulation has been described.  It is the attempt of this protocol
   to provide a simple, general purpose mechanism which is reduces the
   problem of encapsulation from its current O(n^2) problem to a more
   manageable state.  This proposal also attempts to provide a
   lightweight encapsulation for use in policy based routing.  This memo
   explicitly does not address the issue of when a packet should be
   encapsulated.  This memo acknowledges, but does not address problems
   with mutual encapsulation [RFC 1326].

   In the most general case, a system has a packet that needs to be
   encapsulated and routed.  We will call this the payload packet.  The
   payload is first encapsulated in a GRE packet, which possibly also
   includes a route.  The resulting GRE packet can then be encapsulated
   in some other protocol and then forwarded.  We will call this outer

Hanks, Li, Farinacci & Traina                                   [Page 1]
RFC 1701          Generic Routing Encapsulation (GRE)       October 1994

   protocol the delivery protocol. The algorithms for processing this
   packet are discussed later.

Overall packet

   The entire encapsulated packet would then have the form:

                  ---------------------------------
                  |                               |
                  |       Delivery Header         |
                  |                               |
                  ---------------------------------
                  |                               |
                  |       GRE Header              |
                  |                               |
                  ---------------------------------
                  |                               |
                  |       Payload packet          |
                  |                               |
                  ---------------------------------

Packet header

   The GRE packet header has the form:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |C|R|K|S|s|Recur|  Flags  | Ver |         Protocol Type         |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |      Checksum (optional)      |       Offset (optional)       |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Key (optional)                        |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                    Sequence Number (optional)                 |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |                         Routing (optional)
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

      Flags and version (2 octets)

      The GRE flags are encoded in the first two octets.  Bit 0 is the
      most significant bit, bit 15 is the least significant bit.  Bits
      13 through 15 are reserved for the Version field.  Bits 5 through
      12 are reserved for future use and MUST be transmitted as zero.

Hanks, Li, Farinacci & Traina                                   [Page 2]
RFC 1701          Generic Routing Encapsulation (GRE)       October 1994

      Checksum Present (bit 0)

      If the Checksum Present bit is set to 1, then the Checksum field
      is present and contains valid information.
Show full document text