Generic Routing Encapsulation

Generic Routing Encapsulation (GRE ) is a network protocol that was developed by Cisco Systems. It is used to encapsulate other protocols and to transport them in the form of a tunnel over the Internet Protocol ( IP).

Examples of GRE applications:

  • VPN connections for PPTP,
  • Construction of tunnels between IPv6 -enabled networks across IPv4 infrastructure ( and vice versa) or
  • IPsec tunnel between endpoints, which allow the use of dynamic routing protocols and multicast transmissions over VPN connections.
  • Tunnel for the transmission of IPX or AppleTalk protocol.

GRE uses the IP protocol number 47 A GRE header has the following structure:

  • C (bit 0) - Checksum Present - if this bit is 1, the fields and checksum reserved1 available.
  • Sale ( bits 13-15 ) - Version Number
  • Reserved0, Reserved1 - These fields are not used in the current version and should all be set to 0, this is not the case, this is an indication that an older version (RFC 1701) is implemented.

GRE header are at least 4 bytes. Because the GRE packet is further wrapped in a still new IP packet, at least 24 bytes will be greater in the GRE tunnel transmitted packets. This must be considered when determining the maximum packet size Maximum Transmission Unit (MTU).

Configuration

GRE tunnels are configured in Cisco routers as a (virtual) interfaces. In the example, the minimum configuration for a GRE tunnel IPv4 in IPv4:

[ ... ]! interface Tunnel0 ( locally unique number from 0-2147483647 )   ip address 192.168.0.1 255.255.255.0 (inner tunnel address)   tunnel source 10.0.0.1 ( external local tunnel address)   tunnel destination 10.0.0.2 (outer tunnel address of the destination router ) end addressing

GRE tunnels have their own tunnel addresses that are used but only within the routers involved. These addresses correspond to the requirements of the encapsulated protocol and are configured on the tunnel interface.

To transport packages through the tunnel, the tunnel outer address and which are in the transport network that connects the tunnel end-points, needs additional routed. These addresses correspond to the requirements of the Internet Protocol.

Transmission

A packet to be transmitted is first provided on the source router with a GRE header. Then, the resulting packet is wrapped as a payload in a new unicast IP packet whose source address is the local outer tunnel address. Destined to the outer tunnel address of the target system is used.

The destination router GRE header is removed again after the reception of the IP packet. The encapsulated packet is then routed through the tunnel interface.

365572
de