logo
logo
Sign in

An Overview of GRE Protocol

avatar
George Jnr
An Overview of GRE Protocol

GRE Protocol (Global Restricted Language Protocol) is a relatively new IP networking technology that was created in 1982 by Ethernet specialist Larry Roberts and Bill Atkinson. This simple, low-level routing protocol was developed to provide a mechanism for IP networks to establish a fast connection through multiple low-speed connections. The first prototype of GREP (Grammar/IP) was a simple BGP connection over a Solicited Default Network (SDN) using a leased line. Later, a much more efficient and advanced variant of the GREP was developed, which is widely used today. This connection is based on a Layer 2 framing and is called Wide Area Network (WAN), which supports secure, fast and reliable local-area network connectivity (LAN).

 

An interesting characteristic of the GRE protocol is its ability to use 'gre' as a synonym for IP packets. The packets of an IP packet do not need to contain the IP address; rather, they can be tagged with the 'gre' prefix, where 'gre' stands for 'Gateway'. In the same way, an ICMP destination unreachable can be tagged with the 'icmp unreachable' keyword. Since, the GREP packets carry IP addresses, they are routed over the same network as other IP packets, i.e. across the local area network (LAN), or across the wide-area network (WAN) via the same gateway.

 

A typical GRE protocol consists of three bits: the first bit is reserved for the destination network, the second for the source IP address, and the third for the secret algorithm. The first three bits of the secret algorithm are used to generate a unique destination for each packet. These three bits cannot be combined with any other character in the IP header, thus making this mode of operation insecure. Nonetheless, there have been many proposed modifications to the protocol, and these have resulted in the current format.

 

An ICMP Echo Request message sent to an IP user would have the following format: Echo request, source port, destination protocol, echo-port, response code, packet-type, header followed by the length, and then the packet's destination address. If a GRE packet contains three bits, and these bits are all zero, it will be received without response. However, if the first three bits of the destination IP are all one and the last three bits of the source IP are all zeros, then the packet will be returned without return.

 

The first part of the encapsulated packet is the header, which provides information to the sender about the main protocol. This data usually encodes a session ID, the local time, the source address, and an optional local port number. The rest of the encapsulated packet is composed of the payload. The payload is the part of the packet that carries important information to the receiver. It is separated into a number of sections, the first section containing the application language bindings, the second section containing fields needed for connection to the application server, and the third section containing fields needed to determine the parameters of the response.

 

The Encapsulating Security Payload (ESP) is the part of the encapsulation that creates security. The ESP will give the details of how to create and manage a secure tunnel for packets. The next step in the encapsulation process is the Authentication header, which authenticates the packets for both the client and the server. After this is done, the last part is the Discovery response, which lets the clients know that they have received a real packet and that the connection has been established.

 

On the other hand, the GRE protocol does not use any standard format. Any format that is defined by the Internet Standards Bureau (ISB) is appropriate for use with this protocol. There is no restriction on the number of chunks in each chunk. The chunks can also differ in length. There is no checksum, as is the case with TCP. The only thing that is checked during connection setup is whether or not the transmitted GRE header is packed using a single bit.

 

One important thing to note about the GRE over IP communication protocol is that it is not compatible with the ICMP destination unreachable metric. This is because an ICMP unreachable message is sent by an IP packet to a GRE router. If a router receives such a message, it does not return or forward the packet; rather, it acknowledges the presence of the destination. Therefore, it is clear that while the GRE over IP communication protocol is available for point-to-point traffic, it is considered relatively ineffective for bulk or general IP traffic.

collect
0
avatar
George Jnr
guide
Zupyak is the world’s largest content marketing community, with over 400 000 members and 3 million articles. Explore and get your content discovered.
Read more