RFC 2784 (rfc2784) - Page 2 of 9
Generic Routing Encapsulation (GRE)
Alternative Format: Original Text Document
RFC 2784 Generic Routing Encapsulation March 2000
In the most general case, a system has a packet that needs to be
encapsulated and delivered to some destination. We will call this
the payload packet. The payload is first encapsulated in a GRE
packet. The resulting GRE packet can then be encapsulated in some
other protocol and then forwarded. We will call this outer protocol
the delivery protocol. The algorithms for processing this packet are
discussed later.
Finally this specification describes the intersection of GRE
currently deployed by multiple vendors.
The keywords MUST, MUST NOT, MAY, OPTIONAL, REQUIRED, RECOMMENDED,
SHALL, SHALL NOT, SHOULD, SHOULD NOT are to be interpreted as defined
in RFC 2119 [RFC 2119].
2. Structure of a GRE Encapsulated Packet
A GRE encapsulated packet has the form:
---------------------------------
| |
| Delivery Header |
| |
---------------------------------
| |
| GRE Header |
| |
---------------------------------
| |
| Payload packet |
| |
---------------------------------
This specification is generally concerned with the structure of the
GRE header, although special consideration is given to some of the
issues surrounding IPv4 payloads.
2.1. GRE Header
The GRE packet header has the form:
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| Reserved0 | Ver | Protocol Type |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| Checksum (optional) | Reserved1 (Optional) |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
Farinacci, et al. Standards Track