Generic Routing Encapsulation

From Wikipedia, the free encyclopedia - View original article

 
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]

Example protocol stack[edit]

OSI model layerProtocol
5. SessionX.225
4. TransportUDP
3. Network (GRE-encapsulated)IPv6
EncapsulationGRE
3. NetworkIPv4
2. Data LinkEthernet
1. PhysicalEthernet 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[edit]

GRE packets which are encapsulated within IP will 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–34–1213–1516–31
CKSReserved0VersionProtocol Type
Checksum (optional)Reserved1 (optional)
Key (optional)
Sequence Number (optional)

References[edit]

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

External links[edit]