Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

GRE

Direct answer

GRE is a stateless IP encapsulation that creates a logical point-to-point tunnel and can carry routed payloads.

When to use this

Use GRE when an overlay must carry routing or multicast across an IP underlay; add separate protection when confidentiality is required.

First 30 seconds

1. show interfaces tunnel <n> — up/up? Source and destination correct?

2. Outer: ping <tunnel-destination> source <tunnel-source> — reachable?

3. Inner: ping <far-tunnel-ip> — works?

4. Flapping with %TUN-5-RECURDOWN → the destination is learned through the tunnel itself; fix the outer route.

5. Large packets fail → set ip mtu 1400 and ip tcp adjust-mss 1360 on the tunnel.

Operational verification

tunnel source up → outer route to the destination (not via the tunnel) → GRE packets reach the far end → far end has the reverse tunnel → inner routes point into the tunnel → MTU fits

Evidence · next step

1. Verify tunnel source state.
2. Verify underlay route to tunnel destination without recursive tunnel use.
3. Confirm mode and tunnel IP.
4. Check line protocol and counters.
5. Validate MTU/MSS and return routing.

Continue only after interpreting the current observation.
Context & applicabilityCommon mistakes · platform/version boundaries
Platform / version applicability
Protocol standard + deployed implementation
applies
Structured applicability is explicit Topic metadata; it does not infer compatibility beyond the stored rows.
At a glance

Operational reference

Fast context before you go deeper.

PlatformProtocol standard · Cisco IOS / IOS XE · Cisco IOS XE
Key commandinterface tunnel <id>
Scope / prerequisiteUse GRE when an overlay must carry routing or multicast across an IP underlay; add separate protection when confidentia…
Show · 2Reference · 6
What next?3 suggested next steps
Child topics (this level)4
Catalog command links8
Evidence1
On this pageJump to a specific section
Cisco IOS / IOS XE first

Primary Commands

Configuration and operational commands for this Topic.

Verification

Show Commands

Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.

How to read the output

show interfaces tunnel <id>

Look first: line/protocol state, errors/discards, rate, duplex/speed, last input/output

Healthy: State and counters align with expected traffic and physical conditions.

Warning: CRC/input errors, drops, resets, queue drops or unexpected negotiation.

Does not prove: An interface counter is a symptom until correlated with path/time/workload.

Operational workflow

Verification & Troubleshooting

Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.

5 steps Observe → verify → isolate → change minimally → repeat the original test.
ObservedRecord what the original test actually shows

Capture the concrete output, symptom, packet, log or counter before changing anything.

Step 1 First 30 seconds Verify boundary

Immediate answer: Identify the exact GRE scope before changing state. Follow source/outer route → nonrecursive GRE endpoint → inner route/tunnel → remote decapsulation → return service.

Verification chain: source/outer route → nonrecursive GRE endpoint → inner route/tunnel → remote decapsulation → return service

Boundary: A local display shows only its own state. Read the Topic’s bounded example and recovery limits before testing.

Step 2 GRE: bounded example and recovery Verify boundary

Illustrative isolated pair: outer endpoints 192.0.2.1 and 198.51.100.1; numbered tunnel 10.255.1.1/30 and .2; routed test LANs behind both ends. Underlay endpoint routes and the original inner return route already exist. Verify inner route→GRE→outer path→remote decapsulation with one bounded sourced flow.

Negative test: block only GRE protocol 47 between this isolated pair, keeping ordinary underlay reachability. Observe the inner failure without predicting a universal Tunnel line-protocol result. Restore the exact filter and verify two-way service. Save original routes and tunnel settings. GRE alone supplies no confidentiality; no device/capture was tested here.

Step 3 Verification and output interpretation Verify boundary

Verify in two layers. First show the underlay route and reachability to the tunnel destination using the intended source. Then inspect the tunnel interface for source, destination, encapsulation, line protocol and counters. Next show overlay routes use the tunnel as intended and test a representative inner destination. For MTU-sensitive behavior, compare configured tunnel/interface MTU and perform a controlled packet-size test rather than concluding from small-packet ping alone. Packet capture, where available, can show the outer source/destination and GRE encapsulation independently from the inner payload.

Step 4 GRE: first failed boundary Narrow the fault

If the underlay endpoint is unreachable or recursively resolved through the tunnel, fix that dependency first. If outer routing is correct but no remote inner delivery occurs, compare source/destination and GRE mode on both ends, IP protocol 47 policy, endpoint handling, MTU and reverse inner routes. Do not confuse GRE protocol 47 with TCP/UDP port 47.

A rising local tunnel counter is not evidence the remote decapsulated the packet. A small probe may work while encapsulated large traffic fails. Collect endpoint observations and actual packet-size accounting before tuning MSS or enabling keepalive mechanisms.

Step 5 Verification & troubleshooting Narrow the fault

1. Verify tunnel source state.

2. Verify underlay route to tunnel destination without recursive tunnel use.

3. Confirm mode and tunnel IP.

4. Check line protocol and counters.

5. Validate MTU/MSS and return routing.

Evidence references

Evidence · 1 on this Topic

Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.

command output · 1
Command lookup Jump straight to Cisco syntax
Drill down

Subtopics

Go one level deeper into this subject.

Key points
  • GRE uses IP protocol 47, not TCP/UDP port 47
  • Tunnel line protocol depends on local source and recursive reachability to the destination
  • GRE adds overhead and can expose MTU, MSS and fragmentation problems
  • GRE alone provides no encryption, integrity or peer authentication.
Key checks
  • show interfaces tunnel <n> — line/protocol state, source, destination, encapsulation, MTU.
  • show ip route <tunnel-destination> — the outer route used to reach the far end.
  • show ip interface brief | include Tunnel — tunnel address and status.
  • ping <far-tunnel-ip> and ping <tunnel-destination> source <tunnel-source> — inner vs outer reachability.
  • show ip route <inner-prefix> — inner traffic routed into the tunnel.
  • show logging | include TUN-5-RECURDOWN — recursive routing.
ReferenceHow it works1 section · depth on demand

GRE: observation versus configuration

Scope: IOS XE point-to-point GRE over IPv4, global routing, no encryption in this basic case. interface tunnel <id> enters configuration; it does not inspect a tunnel. Read the actual Tunnel interface/configuration, route to the outer destination and route to the inner target.

The outer destination must resolve through the underlay independently of its own tunnel. A configured source/destination or up interface is not peer/application evidence; basic GRE does not inherently authenticate the peer or guarantee its liveness. Read interface counters around a bounded inner flow.

Compare with the separate VTI and GRE-over-IPsec references before interpreting the protection model.

ReferenceImportant terms & boundaries4 sections · depth on demand

In depth

GRE: encapsulating one network's packets inside another

RFC 2784 defines Generic Routing Encapsulation. A GRE packet has a delivery header (the outer IP header), a GRE header, and the payload packet. Over IPv4, the outer header carries IP protocol 47.

GRE header (RFC 2784)

FieldBitsMeaning
C1Checksum present
Reserved012Must be zero (receivers discard packets with bits 1–5 set, unless they implement RFC 1701)
Version30 (version 1 is used by PPTP)
Protocol Type16EtherType of the payload; 0x0800 for IPv4
Checksum + Reserved132Only when C = 1

The base header is 4 bytes, or 8 with the checksum. With the 20-byte outer IPv4 header, GRE adds 24 bytes, so a 1500-byte link carries a 1476-byte tunnel MTU.

R1(config)# interface Tunnel10
R1(config-if)# ip address 172.31.10.1 255.255.255.252
R1(config-if)# tunnel source GigabitEthernet0/0/0
R1(config-if)# tunnel destination 203.0.113.2
R1(config-if)# ip mtu 1400
R1(config-if)# ip tcp adjust-mss 1360
R1(config-if)# keepalive 10 3
R1# show interfaces Tunnel10
Tunnel10 is up, line protocol is up
  Hardware is Tunnel
  Internet address is 172.31.10.1/30
  MTU 9976 bytes, BW 100 Kbit/sec, DLY 50000 usec,
  Encapsulation TUNNEL, loopback not set
  Tunnel source 198.51.100.2 (GigabitEthernet0/0/0), destination 203.0.113.2
  Tunnel protocol/transport GRE/IP
    Key disabled, sequencing disabled
    Checksumming of packets disabled
  Tunnel TTL 255, Fast tunneling enabled
  Tunnel transport MTU 1476 bytes

What GRE adds

CapabilityWhy it matters
Carries multicast and routing protocolsOSPF or EIGRP can run across the Internet between sites
Carries non-IP or IPv6 over IPv4The Protocol Type field identifies the payload
Point-to-point interfaceRoutes point into the tunnel like any interface

What GRE doesn't add

RFC 2784 describes GRE's security as similar to normal IPv4. The payload isn't encrypted or authenticated, so GRE over the Internet is usually combined with IPsec.

TTL and loops (RFC 2784)

The decapsulating endpoint must decrement the payload's TTL, and discard a payload whose destination is the encapsulating router itself, to prevent loops.

Recursive routing

If the route to the tunnel destination points through the tunnel, the tunnel flaps (%TUN-5-RECURDOWN). Make sure the destination is reached via the physical path.

Documented example, not captured output.

Source basisSource attribution states what this section is based on; it is not independent proof that the current environment matches it.

Quick reference

GRE (Generic Routing Encapsulation, IP protocol 47) wraps packets — including multicast and non-IP — in a new IP header, creating a virtual point-to-point tunnel between two routers. It adds 24 bytes of overhead and provides no encryption.

interface Tunnel0
 ip address 172.16.0.1 255.255.255.252
 tunnel source Gi0/0
 tunnel destination 198.51.100.2
 ip mtu 1476
 ip tcp adjust-mss 1436
 keepalive 10 3

Documented example, not captured output.

Avoid recursive routing: the route to the tunnel destination must not point into the tunnel itself, or the tunnel flaps.

State model and protocol mechanics

Generic Routing Encapsulation creates a logical tunnel interface that wraps an inner packet in GRE plus an outer IP header. The outer packet is routed through the underlay using the tunnel source and destination, while the inner packet follows the routing/policy context of the tunnel interface. GRE can carry protocols that ordinary point-to-point IP forwarding would not otherwise represent in the same way, but basic GRE does not provide confidentiality or integrity. Recursive dependency matters: the route to the tunnel destination must resolve through the underlay rather than through the same tunnel in a way that creates recursion. Encapsulation increases packet size, so effective payload MTU is lower unless the underlying path supports the additional overhead.

Limits and common misconceptions

Tunnel up/up does not show every overlay prefix is reachable, and an underlay ping to the tunnel destination does not show the GRE interface is correctly configured. GRE is not encryption. Small packets working does not show larger packets survive encapsulation overhead. A route to the tunnel destination that recursively points into the tunnel can destabilize the overlay even while basic configuration looks correct. Keep underlay endpoint reachability, tunnel protocol state, overlay routing and payload/application behavior as separate evidence layers.

ReferenceConfiguration & state1 section · depth on demand

Design and configuration model

Choose stable tunnel endpoints whose underlay routing is independent of the tunnel’s overlay routes. Set tunnel source and destination explicitly, address the tunnel according to the overlay design, and use routing over the tunnel only for prefixes that should follow that overlay path. Account for MTU/MSS when applications send packets near the physical-path MTU. If security is required, combine GRE with an appropriate protection mechanism such as IPsec according to the design rather than assuming GRE itself encrypts traffic. Avoid advertising the tunnel destination through the tunnel if that can cause recursive routing; keep endpoint reachability anchored in the underlay.

Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Technical verification history

Verification history & basis

When and against what this Topic was checked. Later text edits do not count as a new check.

2026-09-14 · vendor docProtocol standard + deployed implementation RFC 2784

Authoritative/upstream documentation reviewed for bounded claims in Virtualization & Overlays → GRE. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2784.html · confidence 94%
Technical changelog & impact

What changed and what may be affected

Recent technical edits are separated from ordinary page timestamps. Relationship impact is advisory: it identifies nearby canonical references to review, not automatic breakage.

Related reference impactReview these references after material technical changes when their shared boundary is affected.
Terminology layer

Terms & aliases

Hover a linked term for a quick definition; click it to open its glossary entry. Aliases are other names that find this Topic in search.

Aliases that resolve here
GRE tunnelIP protocol 47tunnel recursive routing
Embedded reference data

Quick lookup tables

GRE Tunnels evidence chain

Configuration, operational state, counters and downstream proof remain separate.

BoundaryQuestionEvidenceDoes not prove
DefinitionWhat is configured or intended?running configuration / controller policylive operation
Local stateIs the feature active at the expected scope?show interfaces tunnel <id>remote success
CountersDid controlled traffic or an event reach this stage?scoped counters/timestampscomplete return path
Next boundaryWhat consumes or transports this state?payload route → tunnel interface → GRE encapsulation → underlay route → remote decapsulation → return overlay routeapplication success

GRE · operational reference

Compact state and interpretation boundaries for fast lookup.

GRE layerMust be healthy
UnderlayRoute to tunnel destination resolves outside tunnel
TunnelSource/destination and line protocol are correct
OverlayIntended routes use tunnel path
MTUEncapsulation overhead fits the real path
Confirmation

Confirm action

Continue?