Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

GRE Encapsulation · GRE

Direct answer

GRE encapsulation wraps the original packet in a new IP header (protocol 47) plus a 4-byte GRE header, adding 24 bytes, so the tunnel MTU is lower than the physical MTU.

When to use this

Use it to understand GRE overhead, MTU problems and what a GRE packet looks like in a capture.

First 30 seconds

1. GRE adds a 24-byte header (20 IP + 4 GRE).

2. Carries multicast and non-IP.

3. No encryption.

4. Set ip mtu 1476 and tcp adjust-mss 1436.

5. Recursive routing breaks tunnels.

Operational verification

payload → GRE header → new IP header → underlay

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 · IOS/IOS XE
Key commandping 10.2.2.2 size 1476 df-bit
Scope / prerequisiteUse it to understand GRE overhead, MTU problems and what a GRE packet looks like in a capture.
What next?3 suggested next steps
Evidence1
On this pageJump to a specific section
Operational workflow

Verification & Troubleshooting

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

2 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 MTU tests Verify boundary
ping 10.2.2.2 size 1476 df-bit           ! through the tunnel
ping 198.51.100.2 size 1500 df-bit       ! underlay

If 1476 fails but smaller sizes work, lower ip mtu on the tunnel and set ip tcp adjust-mss 40 bytes lower.

Step 2 Common mistakes Narrow the fault
  • Forgetting GRE adds 24 bytes, so large packets fragment or drop.
  • Assuming GRE is encrypted — it is not; add IPsec.
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.

observation · 1
Command lookup Jump straight to Cisco syntax
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> — encapsulation GRE, MTU
  • ping <remote-tunnel-ip> size 1476 df-bit — MTU test
ReferenceWhat it is1 section · depth on demand

Overhead and MTU

GRE adds a 20-byte outer IPv4 header and a 4-byte GRE header (more with keys or sequence numbers). With a 1500-byte underlay, tunnel IP MTU is 1476; with IPsec on top it is lower (often 1400). Set ip mtu and ip tcp adjust-mss on the tunnel, or large TCP transfers stall when PMTUD is blocked.

ReferenceWhy it matters1 section · depth on demand

When to use it

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

ReferenceImportant terms & boundaries3 sections · depth on demand

Worked example

Encapsulation means adding headers, and every added header takes space from the payload. Because the physical link's MTU stays the same, packets that were exactly the right size before may now be too big. The worked example calculates the GRE overhead and shows the settings that keep TCP traffic from running into fragmentation problems.

GRE adds a new 20-byte outer IPv4 header plus a 4-byte GRE header (24 bytes; more with keys or sequence numbers).

Worked example: physical MTU 1500 → maximum inner packet 1476. With IPsec protecting the GRE (ESP, AES, SHA) overhead grows by roughly 50–70 bytes, so ip mtu 1400 and ip tcp adjust-mss 1360 on the tunnel are common safe values. GRE can carry multicast and non-IP payloads, which is why it is used for routing protocols over IPsec and in DMVPN (mGRE).

In depth

GRE header fields

FieldSizeMeaning
C bit1 bitChecksum present (adds 4 bytes)
K bit (RFC 2890)1 bitKey present (adds 4 bytes)
S bit (RFC 2890)1 bitSequence number present (adds 4 bytes)
Version3 bits0
Protocol type16 bitsEtherType of the payload: 0x0800 IPv4, 0x86DD IPv6, 0x8847 MPLS

The outer IP header carries IP protocol 47. GRE has no ports, so firewalls and NAT devices must explicitly allow protocol 47; PAT cannot multiplex several GRE tunnels behind one address.

Tunnel keys

interface Tunnel0
 tunnel source Loopback0
 tunnel destination 203.0.113.2
 tunnel key 100

The key distinguishes several tunnels between the same pair of endpoints. It is not a security feature — it is sent in clear text.

GRE with or without IPsec

ModeConfigurationCarries
Plain GREtunnel mode gre ip (default)Any protocol incl. multicast/routing — unencrypted
GRE over IPsecGRE tunnel + tunnel protection ipsec profile XSame as GRE, encrypted
Native IPsec VTItunnel mode ipsec ipv4IP unicast and multicast, no GRE header (saves 4 bytes)

Identify GRE in a capture

tcpdump -ni eth0 ip proto 47

Wireshark shows the outer IP, the GRE header with protocol type and then the inner packet. If the inner packets appear on one side but not the other, look for an ACL or firewall dropping protocol 47 rather than a routing problem.

Counters to check

show interfaces Tunnel0 shows input/output packets and drops for the tunnel. Output packets increasing with no input on either side means encapsulated packets leave but never arrive — a path or filter issue in the underlay.

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

Header

FieldSize
New IP header20 bytes
GRE header (basic)4 bytes
Optional key+4 bytes
Optional sequence+4 bytes

Typical settings: ip mtu 1476 and ip tcp adjust-mss 1436 on the tunnel interface.

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 → GRE Encapsulation. Documentation verification only; this is not observed lab or production Evidence.

Basis: https://www.rfc-editor.org/rfc/rfc2784.html · confidence 94%
Confirmation

Confirm action

Continue?