Generic Routing Encapsulation

From Wikipedia, the free encyclopedia

Generic Routing Encapsulation (GRE) is a tunneling protocol designed for encapsulation of arbitrary kinds of network layer packets inside arbitrary kinds of network layer packets. The original packet is the payload for the final packet. For example, tunnel servers which encrypt can use GRE to tunnel through the Internet for secure virtual private networks.

GRE was developed by Cisco and can encapsulate a wide variety of protocol packet types inside IP tunnels. GRE tunnels are designed to be completely stateless, which means that each tunnel end-point does not keep any information about the state or availability of the remote tunnel end-point. This feature helps the service providers to provide for IP tunnels to its clients, who are not concerned about the internal tunneling architecture at the service providers end. This gives the users (the clients of service providers) flexibility to configure or reconfigure their IP architecture without being concerned about the connectivity issues, creating a virtual point-to-point link to routers at remote points over an IP internetwork.

GRE uses IP protocol number 47.

Contents

[edit] Example uses

  • Used in conjunction with PPTP to create virtual private networks.
  • Used in conjunction with IPsec VPNs to allow passing of routing information between connected networks.
  • Used in Mobility protocols .

[edit] Example Protocol Stack using GRE

RADIUS
UDP
IPv6 (2)
GRE
IPv4 (1)
Ethernet

[edit] Header Details

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

[edit] References