Generic Routing Encapsulation (GRE) Tunnel - Study CCNP (2024)

Generic Routing Encapsulation or GRE protocol is developed by Cisco and it provides a virtual point-to-point private connection and encapsulates and forwards packets over an IP-based network. GRE is used in many instances, such as transporting IPv6 traffic over an IPv4-only network. We can also use GRE to tunnel routing protocols like RIP, OSPF, or EIGRP between HQ and branch sites.

How Do GRE Tunnels Work?

When a router encapsulates data packets, it modifies the packet’s header information (encapsulation) to include the remote endpoint’s IP address as the destination. The GRE packets consist of GRE header and flags, original IP header, and payload data. The new IP header information now allows the GRE packet to be routed between two tunnel endpoints without inspecting the original packet’s payload. Once the packet reaches the remote tunnel endpoint, the GRE header is removed (de-encapsulation), and the original data packet is routed to the remote network.

Original Packet

IP HeaderPayload Data

GRE Packet

GRE IP HeaderGRE FlagsOriginal IP HeaderPayload Data

GRE Configuration

Here’s the step-by-step process for configuring the GRE tunnel:

  1. Create a GRE tunnel interface.
  2. Configure an IP address for the tunnel interface.
  3. Set the local tunnel source. It can be a physical or loopback interface.
  4. Set the remote destination IP.

Optional configs: Tunnel bandwidth, keepalive, and IP MTU

For our example configuration, we will use the topology below. We have two sites, Site A and Site B, and both have their respective ISPs as default gateways to reach the Internet.

Generic Routing Encapsulation (GRE) Tunnel - Study CCNP (1)

Without GRE tunnelling configured, let’s see if we can ping from Site A LAN to Site B LAN:

Site-A#sh ip routeGateway of last resort is 172.16.1.2 to network 0.0.0.0S* 0.0.0.0/0 [1/0] via 172.16.1.2
Site-A#traceroute 192.168.2.1Type escape sequence to abort.Tracing the route to 192.168.2.1VRF info: (vrf in name/id, vrf out name/id)1 172.16.1.2 2 msec 3 msec 4 msec2 172.16.1.2 !H !H *
Site-A#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:.....Success rate is 0 percent (0/5)

A traceroute to Site B’s LAN interface is sent to ISP1 GW which blackholes it.

Now, let’s configure Site A and Site B routers. We have OSPF enabled on the LAN (192.168.1.0/24 and 192.168.2.0/24) and GRE tunnel (10.10.10.0/24) networks. With this, Sites A and B become direct OSPF neighbors over the GRE tunnel and learn each other’s routes. The default static routes are pointing to their respective ISPs.

Site A

Site-A#conf tSite-A(config)#int Tunnel1Site-A(config-if)#ip address 10.10.10.1 255.255.255.0Site-A(config-if)#tunnel source 172.16.1.1Site-A(config-if)#tunnel destination 172.16.2.1Site-A(config-if)#exitSite-A(config)#router ospf 1Site-A(config-router)#router-id 1.1.1.1Site-A(config-router)#network 10.10.10.0 0.0.0.255 area 0Site-A(config-router)#network 192.168.1.0 0.0.0.255 area 1Site-A(config-router)#exitSite-A(config)#ip route 0.0.0.0 0.0.0.0 172.16.1.2

Site B

Site-B#conf tSite-B(config)#int Tunnel1Site-B(config-if)#ip address 10.10.10.2 255.255.255.0Site-B(config-if)#tunnel source 172.16.2.1Site-B(config-if)#tunnel destination 172.16.1.1Site-B(config-if)#exitSite-B(config)#router ospf 1Site-B(config-router)#router-id 2.2.2.2Site-B(config-router)#network 10.10.10.0 0.0.0.255 area 0Site-B(config-router)#network 192.168.2.0 0.0.0.255 area 1Site-B(config-router)#exitSite-B(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2

Verification

Now, let’s check the state of the tunnel using the ‘show interfaces tunnel’ command.

Site-A#sh int tunnel 1 | include Tunnel.*is|Tunnel s|Tunnel pTunnel1 is up, line protocol is up Tunnel source 172.16.1.1, destination 172.16.2.1 Tunnel protocol/transport GRE/IP
Site-B#sh int tunnel 1 | include Tunnel.*is|Tunnel s|Tunnel p Tunnel1 is up, line protocol is up Tunnel source 172.16.2.1, destination 172.16.1.1 Tunnel protocol/transport GRE/IP

Let’s also check the routing table if Site A has formed an OSPF adjacency with Site B over the GRE tunnel.

Site-A# sh ip route ospfGateway of last resort is 172.16.1.2 to network 0.0.0.0O IA 192.168.2.0/24 [110/1001] via 10.10.10.2, 00:02:22, Tunnel1

Lastly, we do a traceroute and ping to confirm reachability.

Site-A#traceroute 192.168.2.1Type escape sequence to abort.Tracing the route to 192.168.2.1VRF info: (vrf in name/id, vrf out name/id) 1 10.10.10.2 5 msec 6 msec * 
Site-A#ping 192.168.2.1Type escape sequence to abort.Sending 5, 100-byte ICMP Echos to 192.168.2.1, timeout is 2 seconds:!!!!!Success rate is 100 percent (5/5), round-trip min/avg/max = 4/5/6 ms

Download our Free CCNA Study Guide PDF for complete notes on all the CCNA 200-301 exam topics in one book.

We recommend the Cisco CCNA Gold Bootcamp as your main CCNA training course. It’s the highest rated Cisco course online with an average rating of 4.8 from over 30,000 public reviews and is the gold standard in CCNA training:

Generic Routing Encapsulation (GRE) Tunnel - Study CCNP (2)

Generic Routing Encapsulation (GRE) Tunnel - Study CCNP (2024)

FAQs

Generic Routing Encapsulation (GRE) Tunnel - Study CCNP? ›

How Do GRE Tunnels Work? When a router encapsulates data packets, it modifies the packet's header information (encapsulation) to include the remote endpoint's IP address as the destination. The GRE packets consist of GRE header and flags, original IP header

IP header
IPv4 is the fourth version in the development of the Internet Protocol, and routes most traffic on the Internet. The IPv4 header includes thirteen mandatory fields and is as small as 20 bytes. A fourteenth optional and infrequently used options field can increase the header size.
https://en.wikipedia.org › wiki › IP_header
, and payload data.

What is generic routing encapsulation GRE tunnel? ›

Generic Routing Encapsulation, or GRE, is a protocol for encapsulating data packets that use one routing protocol inside the packets of another protocol. "Encapsulating" means wrapping one data packet within another data packet, like putting a box inside another box.

What VPN tunnel type uses generic routing encapsulation? ›

GRE tunnels are essential for routing data efficiently and securely over multicast-enabled networks, particularly in Cisco technologies. Multipoint Generic Routing Encapsulation is a protocol used for creating Virtual Private Networks (VPNs) over a multicast-enabled network, particularly for Cisco technologies.

Is generic routing encapsulation GRE a non secure site to site VPN tunneling protocol? ›

Generic Routing Encapsulation (GRE) is a non-secure site-to-site VPN tunneling protocol. A GRE tunnel can encapsulate various network layer protocols as well as multicast and broadcast traffic. GRE does not by default support encryption; and therefore, it does not provide a secure VPN tunnel.

Which of the following protocols do generic routing encapsulation GRE tunnels support? ›

Features of Generic Routing Encapsulation

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.

What is the purpose of a GRE tunnel? ›

GRE Tunnel Overview

A Generic Routing Encapsulation (GRE) tunnel is ideal for forwarding internet-bound traffic from your corporate network to the Zscaler service. GRE is a tunneling protocol for encapsulating packets inside a transport protocol. A GRE-capable router encapsulates a payload packet inside a GRE 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 the difference between GRE and UDP? ›

Generic Routing Encapsulation (GRE) is a tunneling protocol that encapsulates various network protocols within Internet Protocol (IP) packets. User Datagram Protocol (UDP) is a lightweight transport protocol used for sending data over IP networks. Both protocols are fundamental to network communications.

Is a GRE tunnel secure? ›

GRE tunnels do not provide any authentication, confidentiality, or integrity protection for the encapsulated traffic. This means that anyone who can intercept the GRE packets can see the original network layer protocol and its payload, and potentially modify or spoof it.

What is GRE in Cisco? ›

Generic Routing Encapsulation (GRE) provides a simple approach to transporting packets of one protocol over another protocol using encapsulation.

What are the disadvantages of the GRE? ›

One of the main problems with the GRE is its ability to predict graduate school performance, particularly the first-year grades. Several critics have cited that its predictive validity is actually weak. Also, the GRE fails to cover areas like a student's intellect, creativity, and perseverance to finish a program.

What is the difference between site to site VPN and GRE tunnel? ›

VPN tunnels encrypts traffic that is sent across the link while GRE tunnels simply encapsulate the traffic before sending it over the link. However, VPN tunnels come with several disadvantages as well. VPN configurations must include statically maintained access lists to identify traffic allowed through the tunnel.

What is the difference between L2TP and GRE tunnel? ›

GRE and L2TP are both tunneling protocols. Their main difference is that L2TP is a user access protocol whereas GRE is a network protocol. Therefore, L2TP involves only user-side access, and GRE involves only network-side tunnel connectivity.

What is the purpose of 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 are the 3 types of routing protocols? ›

In the Internet, there are three types of routing protocols commonly used. They are: distance vector, link state, and path vector. In this chapter, we present the basic concepts and fundamentals behind each of these three types of protocols in a generic framework.

What is the bandwidth limit for GRE tunnel? ›

Supported Bandwidth for GRE Tunnels

Zscaler supports a maximum bandwidth of 1 Gbps for each GRE tunnel if its internal IP addresses aren't behind NAT.

What is the difference between IP encapsulation and GRE? ›

IP-in-IP is an even simpler encapsulating protocol, using this technique IP packets are encapsulated only in an additional IP header. So unlike GRE tunnels an IP-in-IP tunnel cannot carry multicast traffic, other protocols or IPv6 between networks.

What is encapsulation in tunneling? ›

Tunneling is a way to move packets from one network to another. Tunneling works via encapsulation: wrapping a packet inside another packet.

When using generic routing encapsulation (GRE tunneling over internet protocol version 4 IPv4), where is the GRE header inserted? ›

GRE Header The 4-16 byte header is placed between the delivery and payload headers. At least, the GRE header stores the GRE version and payload protocol type. Optionally the GRE header can store a packet checksum, a tunnel key and packet sequence number.

What is the difference between EoIP and GRE tunnel? ›

GRE tunnel adds a 24 byte overhead (4-byte gre header + 20-byte IP header). Ethernet over IP (EoIP) Tunneling is a MikroTik RouterOS protocol that creates an Ethernet tunnel between two routers on top of an IP connection.

Top Articles
Rescheduling Airbnb Guests? Read This First to Avoid Losing Money
What Is The Maximum Tax Refund You Can Get In Canada?
Swissport Ess
Apartments for Rent in Saint Thomas, VI - Home Rentals | realtor.com®
Planet Visible Tonight
15 Universal Studios Hollywood Tips You NEED To Read (2023)
Suspect may have staked out Trump's golf course for 12 hours before the apparent assassination attempt
Tap Into Bloomfield
Forum R1Rcm Com Ultipro
Xi Jinping Copypasta
Accf Town Fund
Danielle Moodie-Mills Net Worth
Mugshots Key West
Barbra Jane Dovey
Bj타리
At 25 Years, Understanding The Longevity Of Craigslist
Bad And Boujee One Mo Chance Age
Macbeth Summary Activity: 5 Act Structure
Stars Cinema Golden
Oral-B iO 8N Elektrische Tandenborstel Zwart
Udk Raid
Nalley Trailer Sales Photos
3Si Tracker Login
F9 2385
Adams County 911 Live Incident
082900432
Creating a Numerical Table from Two Functions (TABLE)
Lowes Springhurst
Bowfa Ge
Driving Directions To Target Near Me
Zodiac Sign Lip Chart
Nsfw Interactive Cyoa
Emerson Naturals Kratom
Gas Station Near Santa Barbara Airport
Gmu Linkedin Learning
Original Shakshuka - einfaches Rezept | Leckere Ideen
Milwaukee Nickname Crossword Clue
Sean Hannity My Pillow Promo Code 2022
Black Panther 2 Showtimes Near Epic Theatres Of Palm Coast
Marianas Market Weekly Ad
Best Online Bingo Sites - Play For Fun or Real Money
Bridger Elementary Logan
Online Finance & Accounting Courses
Webkinz® - Top Issues
Pg Thomasson Funeral Services Obituaries
Theft Crimes Lawyer in Exton | McKenzie Law Firm, P.C.
Journal articles: 'History of journalistic criticism in Portugal' – Grafiati
How Long Does A Rock Live
Friv4School Unblocked
Busted Newspaper Kershaw County
Williams Funeral Home Warrensburg Mo
Worldfree4U Movies In
Latest Posts
Article information

Author: Neely Ledner

Last Updated:

Views: 5700

Rating: 4.1 / 5 (42 voted)

Reviews: 89% of readers found this page helpful

Author information

Name: Neely Ledner

Birthday: 1998-06-09

Address: 443 Barrows Terrace, New Jodyberg, CO 57462-5329

Phone: +2433516856029

Job: Central Legal Facilitator

Hobby: Backpacking, Jogging, Magic, Driving, Macrame, Embroidery, Foraging

Introduction: My name is Neely Ledner, I am a bright, determined, beautiful, adventurous, adventurous, spotless, calm person who loves writing and wants to share my knowledge and understanding with you.