GRE, Generic Routing Encapsulation

Description Glossary RFCs Publications Obsolete RFCs

Description:

Protocol suite: TCP/IP.
Protocol type:Transport layer encapsulation protocol.
IP protocol:47.
MIME subtype:
SNMP MIBs:
Working groups:
Links:

MAC header IP header GRE header Data :::

GRE header, version 0:

0001020304050607 0809101112131415 1617181920212223 2425262728293031
C R K S s Recur Flags Version Protocol
Checksum Offset
Key
Sequence Number
Routing :::

C, Checksum Present. 1 bit.
The Checksum field is present and contains valid information if set. If either the Checksum Present bit or the Routing Present bit are set, the Checksum and Offset fields are both present.

R, Routing Present. 1 bit.
If set then the Offset field is present and contains valid information. If either the Checksum Present bit or the Routing Present bit are set, the Checksum and Offset fields are both present.

K, Key Present. 1 bit.
If set then the Key field is present and contains valid information.

S, Sequence Number present. 1 bit.
If set then the Sequence Number field is present and contains valid information.

s, Strict Source Route. 1 bit.
The meaning of this bit is defined in other documents. It is recommended that this bit only be set if all of the the Routing Information consists of Strict Source Routes.

Recur, Recursion Control. 3 bits, unsigned integer.
Contains the number of additional encapsulations which are permitted. 0 is the default value.

Flags. 5 bits.
These bits are reserved and must be transmitted as 0.

Version. 3 bits.
GRE protocol version. Must be cleared to 0.

Protocol. 16 bits.
Contains the protocol type of the payload packet. In general, the value will be the Ethernet protocol type field for the packet. Additional values may be defined in other documents.

Checksum. 16 bits.
Optional. Contains the IP (one's complement) checksum of the GRE header and the payload packet.

Offset. 16 bits.
Optional. Indicates the byte offset from the start of the Routing field to the first byte of the active Source Route Entry to be examined.

Key. 32 bits.
Optional. Contains a number which was inserted by the encapsulator. It may be used by the receiver to authenticate the source of the packet.

Sequence Number. 32 bits, unsigned.
Optional. Contains a number which is inserted by the encapsulator. It may be used by the receiver to establish the order in which packets have been transmitted from the encapsulator to the receiver.

Routing. Variable length.
Optional. This field is a list of SREs.


SRE, Source Route Entry Packet.

0001020304050607 0809101112131415 1617181920212223 2425262728293031
Address Family SRE Offset SRE Length
Routing Information :::

Address Family. 16 bits.
Indicates the syntax and semantics of the Routing Information field. The values for this field and the corresponding syntax and semantics for Routing Information are defined in other documents.

SRE Offset. 8 bits.
Indicates the byte offset from the start of the Routing Information field to the first byte of the active entry to be examined.

SRE Length. 8 bits.
The number of bytes in the SRE. If cleared to 0, this indicates this is the last SRE in Routing.

Routing Information. Variable length.
Contains data which may be used in routing this packet.


MAC header IP header GRE header Data :::

GRE header, version 1:
The GRE header used in PPTP is enhanced slightly from that specified in the current GRE protocol specification. The main difference involves the definition of a new Acknowledgment Number field, used to determine if a particular GRE packet or set of packets has arrived at the remote end of the tunnel. This Acknowledgment capability is not used in conjunction with any retransmission of user data packets. It is used instead to determine the rate at which user data packets are to be transmitted over the tunnel for a given user session.

0001020304050607 0809101112131415 1617181920212223 2425262728293031
C R K S s Recur A Flags Version Protocol
Payload Length Call ID
Sequence Number
Acknowledgment Number

C, Checksum Present. 1 bit.
Cleared to 0.

R, Routing Present. 1 bit.
Cleared to 0.

K, Key Present. 1 bit.
Set to 1.

S, Sequence Number present. 1 bit.
Set if a payload packet is present. Cleared if a payload packet is not present (GRE packet is an Acknowledgment only).

s, Strict Source Route. 1 bit.
Cleared to 0.

Recur, Recursion Control. 3 bits, unsigned integer.
Cleared to 0.

A, Acknowledgment sequence number present. 1 bit.
Set to one if the packet contains an Acknowledgment Number to be used for acknowledging previously transmitted data.

Flags. 4 bits.
Must be cleared to 0.

Version. 3 bits.
Must be set to 1.

Protocol. 16 bits. Always set to 0x880B.
Contains the protocol type of the payload packet.

Payload Length. 16 bits.
Size of the payload not including the GRE header.

Call ID. 16 bits.
Contains the Peer's Call ID for the session to which this packet belongs.

Sequence Number. 32 bits.
Optional. Contains the sequence number of the payload. This field is present only if the S bit is set.

Acknowledgment Number. 32 bits.
Contains the sequence number of the highest numbered GRE packet received by the sending peer for this user session. This field is present only if the A bit is set.


Glossary:


RFCs:

[RFC 1701] Generic Routing Encapsulation (GRE).

[RFC 1702] Generic Routing Encapsulation over IPv4 networks.

[RFC 2637] Point-to-Point Tunneling Protocol (PPTP).

[RFC 2784] Generic Routing Encapsulation (GRE).

[RFC 2890] Key and Sequence Number Extensions to GRE.

[RFC 3095] RObust Header Compression (ROHC): Framework and four profiles: RTP, UDP, ESP, and uncompressed.

[RFC 3147] Generic Routing Encapsulation over CLNS Networks.


Publications:


Obsolete RFCs:


Description Glossary RFCs Publications Obsolete RFCs