What is Generic Routing Encapsulation (GRE)? | Definition from TechTarget (2024)

By

  • Rahul Awati
  • Tessa Parmenter,Contributor
  • Lisa Phifer,Core Competence

What is Generic Routing Encapsulation (GRE)?

Generic Routing Encapsulation (GRE) is a protocol that encapsulates packets in order to route various protocols over Internet Protocol (IP) networks. GRE is defined by Internet RFC 2784. GRE was developed as a tunneling tool meant to carry any OSI Layer 3 network protocol over an IP network. In essence, GRE creates a private point-to-point connection like that of a virtual private network (VPN).

The GRE protocol involves encapsulating or wrapping data packets within other data packets. Doing so creates a tunnel (also known as a GRE tunnel) between two routers and establishes a direct or point-to-point connection between separate IP networks or protocols. Such tunneling of packets simplifies the connections between those networks.

Suppose a connection is to be set up between two networks or LANs. Assume that one network uses the IPv6 protocol while the other supports the older IPv4 protocol. Without GRE, the two networks would be unable to communicate with each other due to their protocol differences. But with GRE, the IPv6 packets are encapsulated within the IPv4 packets, allowing the IPv6 packets to pass through the IPv4 network.

Why use Generic Routing Encapsulation?

GRE tunneling can be used when there is a need to set up a direct or point-to-point connection between two networks or protocols, such as in an enterprise where different business units or departments are supported by different networks. Encapsulating packets and creating a GRE tunnel allows routers in two networks to operate as if they have a direct connection, allowing packets to move between them that would not be able to do otherwise.

How does Generic Routing Encapsulation work?

GRE works by encapsulating a payload -- an inner packet that needs to be delivered to a destination network -- inside an outer IP packet. GRE tunnel endpoints send payloads through GRE tunnels by routing encapsulated packets through intervening IP networks. Other IP routers along the way do not parse the payload (the inner packet); they only parse the outer IP packet as they forward it toward the GRE tunnel endpoint. Upon reaching the tunnel endpoint, GRE encapsulation is removed, and the payload is forwarded to its ultimate destination.

Encapsulation is done to create a GRE tunnel between two specific routers at either end of the tunnel. This means that only those routers can send and receive the GRE packets. The router at the sending end encrypts the GRE header and the router at the receiving end decrypts it. Along the way, the encapsulated packet travels through the GRE tunnel in encrypted form and then emerges from the receiving router as the original packet. The receiving router then removes the encapsulation and forwards the inner packet to its final destination on its network.

The other non-GRE-configured routers between the two GRE-configured routers will simply forward the encapsulated packet by referencing the headers surrounding them. They will not decrypt or open the packets; this is the job of the receiving GRE-configured router.

Generic Routing Encapsulation packets and headers

In any network, a packet refers to a unit of data that moves from a source to a destination. All packets consist of a payload and control information. The payload contains the user data (actual information) while the control information includes elements like source and destination addresses and sending sequence. The control information is placed in the packet header, with one header attached to each packet.

Before a GRE tunnel is created, the original or outer packet has an IP header (20 bytes). Creating the tunnel means creating a GRE packet that now has two IP headers. The IP header for the original packet remains intact. When the tunnel is created, the protocol adds a new GRE header (4 bytes), which indicates the type of protocol that will be used by the encapsulated packet. The GRE header also includes information such as the packet's source and destination addresses, sequence number and protocol identifier.

Once both headers are created, the encapsulated packet can travel from the source router to the destination router. The end router will decapsulate the packet and use the header information to route the packet to its destination.

What is Generic Routing Encapsulation (GRE)? | Definition from TechTarget (1)

Features of Generic Routing Encapsulation

The main feature of the GRE protocol is its ability to wrap one data packet inside another packet, allowing packets to travel between two otherwise-incompatible protocols or networks. Versatility is another feature of GRE. The protocol can work with numerous Layer 3 protocols, including IP, IPX and DECnet. As a result, one GRE tunnel can carry different types of traffic and route packets to their ultimate destination.

GRE tunnels are stateless, meaning the tunnel endpoints (routers) do not keep any information about the receiving router, including its state and availability. As a result, the source router does not have the ability to change the state of the tunnel interface or bring down its line protocol if the receiving router is unreachable.

Advantages and disadvantages of Generic Routing Encapsulation

Creating a GRE tunnel enables the use of protocols that are not supported by a network, thus enabling connectivity between networks and sub-networks. Further, the protocol is highly reliable because adding a GRE header to a packet ensures that it will reach its destination.

In contrast to IP-to-IP tunneling, GRE tunneling can transport multicast and IPv6 traffic between networks. Further, GRE provides a stateless private connection so the tunnel interface will remain active even if the end of the tunnel is unreachable.

Other advantages of GRE tunnels include the following:

  • GRE tunnels encase multiple protocols over a single-protocol backbone.
  • GRE tunnels provide workarounds for networks with limited hops.
  • GRE tunnels connect discontinuous sub-networks.
  • GRE tunnels allow VPNs to operate across wide area networks.

The chief disadvantage of GRE is that it is not considered a secure protocol because it doesn't use encryption like the IP Security (IPsec) Encapsulating Security Payload, defined by RFC 2406. As a result, GRE tunnels can be used to launch DDoS attacks. Cyber attackers can build a botnet, control it via GRE, and then use it to jam a network with junk traffic, making the network inaccessible for legitimate users. This risk can be minimized by configuring authentication and encryption mechanisms on the GRE tunnels.

Explore the differences between GRE and IPsec tunnels. See how network functions virtualization (NFV) architecture works.

This was last updated in November 2023

Continue Reading About Generic Routing Encapsulation (GRE)

  • IPv6 addresses: Security recommendations for usage
  • What's the difference between a MAC address and IP address?
  • Layer 3 switches explained
  • Layer 3 network integration from Datera uses nodes as endpoints
  • A Deep Dive Into Border Gateway Protocol

Related Terms

IT operations (IT ops)
The term IT operations (IT ops) describes the many processes and services an IT department manages and maintains within an ...Seecompletedefinition
local area network (LAN)
A local area network (LAN) is a group of computers and peripheral devices that are connected together within a distinct ...Seecompletedefinition
subnet mask
A subnet mask is a 32-bit binary number used in modern network addressing schemes to differentiate between a network's location ...Seecompletedefinition

Dig Deeper on Network infrastructure

  • Best practices to install network hardwareBy: DeannaDarah
  • tunneling or port forwardingBy: RahulAwati
  • overlay networkBy: JohnFruehe
  • protocol data unit (PDU)By: PeterLoshin
What is Generic Routing Encapsulation (GRE)? | Definition from TechTarget (2024)

FAQs

What is Generic Routing Encapsulation (GRE)? | Definition from TechTarget? ›

Generic Routing Encapsulation (GRE) is a protocol that encapsulates packets in order to route various protocols over Internet Protocol (IP) networks. GRE is defined by Internet RFC 2784.

What is generic routing encapsulation? ›

Generic routing encapsulation (GRE) provides a private path for transporting packets through an otherwise public network by encapsulating (or tunneling) the packets. GRE tunneling is accomplished through tunnel endpoints that encapsulate or de-encapsulate traffic.

What does GRE mean in networking? ›

Generic Routing Encapsulation, or GRE, is a protocol for wrapping data packets inside secondary data packets in order to set up a direct point-to-point network connection.

What is multipoint generic routing encapsulation? ›

Multipoint Generic Routing Encapsulation (mGRE) is used to connect multiple remote sites through a VPN. mGRE uses hub and spoke topology to encapsulate and forward packets from one remote site to another.

What is GRE in Cisco? ›

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 or point-to-multipoint links over an Internet Protocol network.

What protocols can GRE encapsulate? ›

Generic routing encapsulation or GRE is a protocol that encapsulates packets of one network protocol, such as IPv4, IPv6, IPX, etc., within the payload of another protocol, like IP. The term “encapsulate” refers to the process of wrapping one data packet within another data packet.

What is the difference between IPSec and GRE tunnel? ›

GRE is a tunneling protocol which is used to transport multicast, broadcast and non-IP packets like IPX etc. IPSec is an encryption protocol. IPSec can only transport unicast packets not multicast & broadcast. Hence we wrap it GRE first and then into IPSec which is called as GRE over IPSec.

What is GRE and how it works? ›

The Graduate Record Examination, or GRE, is an important step in the graduate school or business school application process. The GRE is a multiple-choice, computer-based, standardized exam that is often required for admission to graduate programs and graduate business programs (MBA) globally.

What is the main use of GRE? ›

The GRE General Test helps admissions committees get a more complete picture of applicant strengths by providing information about applicants' reasoning, critical thinking and analytical writing skills. Learn more about the GRE General Test.

What are the 2 types of GRE? ›

As mentioned earlier there are two types of GRE – GRE General test and Subject test. GRE general test is offered as computer or paper-based. One of the significant differences between the two GRE exam patterns is that the computer-based GRE is section adaptive in nature.

Does VPN use GRE? ›

GRE is a mechanism for encapsulating any network layer protocol over any other network layer protocol. GRE can be used in point-to-point mode to provide a VPN between two sites. Additionally, GRE can be used for Multipoint Virtual Private Networks (VPNs) using GRE in point-to-multipoint mode.

What is an example of a multipoint network? ›

Radio and television broadcasting are examples of point to multipoint communication systems. The Point to Point Protocol (PPP) is used to create direct communication between two nodes in the network.

What is the difference between mGRE and MPLS? ›

The mGRE tunnel provides a common link between branch offices that connect to the same VPN. Because mGRE is a point-to-multipoint model, fully meshed GRE tunnels are not required to interconnect MPLS VPN PE devices. MPLS is a widely deployed VPN internet architecture.

What does the GRE include? ›

The GRE General Test measures verbal reasoning, quantitative reasoning, critical thinking and analytical writing skills that have been developed over a long period of time and are required for success in today's demanding programs.

What port is GRE? ›

Point-to-Point Tunneling Protocol (PPTP) uses TCP port 1723 and IP protocol 47 Generic Routing Encapsulation (GRE).

What layer is GRE? ›

By default, GRE. GRE is an IP encapsulation protocol that is used to transport packets over a network. tunnels are in IPv4 Layer-3 mode.

What is the encapsulation process of Cisco? ›

When a host transmits data across a network to another device, the data goes through encapsulation: It is wrapped with protocol information at each layer of the OSI model. Each layer communicates only with its peer layer on the receiving device.

What is encapsulation in VPN technology? ›

Encapsulation is really just a process of wrapping the original packet inside another packet created by client-side VPN software. Everything in the original packet is encrypted by a VPN client and can only be read by a VPN server. To the public, this is still a valid packet and will be routed as normal.

Which type of encapsulation is used for the OSPF packets? ›

OSPF packets are encapsulated directly in IP with the protocol field set to 89. The destination IP address in OSPF depends on the network type.

What feature allows multipoint generic routing encapsulation mGRE to establish tunnels without mapping entries between destinations dynamically? ›

NHRP is used similarly to the Address Resolution Protocol (ARP) on Ethernet, it provides the ability to map a tunnel IP address with a logical (Non-Broadcast Multi-Access (NBMA)) IP address; this allows mGRE to have dynamically set up tunnels without having to explicitly configure a mapping entry between each potential ...

Top Articles
100,000 Dollars, Gold Certificate, United States, 1934
11 year old girl, diagnosed with autism, has higher IQ than Einstein; soon to receive Masters in engineering - Times of India
Bj 사슴이 분수
Craigslist Free En Dallas Tx
Mrh Forum
Algebra Calculator Mathway
Www.politicser.com Pepperboy News
New Slayer Boss - The Araxyte
Directions To 401 East Chestnut Street Louisville Kentucky
Gunshots, panic and then fury - BBC correspondent's account of Trump shooting
Day Octopus | Hawaii Marine Life
Danielle Longet
Garrick Joker'' Hastings Sentenced
Pwc Transparency Report
Find your energy supplier
2021 Lexus IS for sale - Richardson, TX - craigslist
My.doculivery.com/Crowncork
Hartland Liquidation Oconomowoc
Truth Of God Schedule 2023
Second Chance Maryland Lottery
Der Megatrend Urbanisierung
Www Craigslist Milwaukee Wi
Byui Calendar Fall 2023
Petco Vet Clinic Appointment
Panic! At The Disco - Spotify Top Songs
Toyota Camry Hybrid Long Term Review: A Big Luxury Sedan With Hatchback Efficiency
Titanic Soap2Day
Kohls Lufkin Tx
Mineral Wells Skyward
Dmv In Anoka
Belledelphine Telegram
Marokko houdt honderden mensen tegen die illegaal grens met Spaanse stad Ceuta wilden oversteken
R Baldurs Gate 3
27 Fantastic Things to do in Lynchburg, Virginia - Happy To Be Virginia
10-Day Weather Forecast for Santa Cruz, CA - The Weather Channel | weather.com
Miles City Montana Craigslist
Nurofen 400mg Tabletten (24 stuks) | De Online Drogist
Obsidian Guard's Skullsplitter
new haven free stuff - craigslist
拿到绿卡后一亩三分地
Stanford Medicine scientists pinpoint COVID-19 virus’s entry and exit ports inside our noses
Bernie Platt, former Cherry Hill mayor and funeral home magnate, has died at 90
301 Priest Dr, KILLEEN, TX 76541 - HAR.com
Shoecarnival Com Careers
Mathews Vertix Mod Chart
From Grindr to Scruff: The best dating apps for gay, bi, and queer men in 2024
Cara Corcione Obituary
Craigslist Marshfield Mo
Slug Menace Rs3
Noelleleyva Leaks
Sunset On November 5 2023
Latest Posts
Article information

Author: Duane Harber

Last Updated:

Views: 5751

Rating: 4 / 5 (51 voted)

Reviews: 90% of readers found this page helpful

Author information

Name: Duane Harber

Birthday: 1999-10-17

Address: Apt. 404 9899 Magnolia Roads, Port Royceville, ID 78186

Phone: +186911129794335

Job: Human Hospitality Planner

Hobby: Listening to music, Orienteering, Knapping, Dance, Mountain biking, Fishing, Pottery

Introduction: My name is Duane Harber, I am a modern, clever, handsome, fair, agreeable, inexpensive, beautiful person who loves writing and wants to share my knowledge and understanding with you.