Pcornel
Browse topics
Options
Recent
Favorites
Networking · Technical reference

GRE Header Evidence

Direct answer

A GRE packet is the original packet with two headers in front: a new IP header (protocol 47) to the other tunnel endpoint, and a 4-byte GRE header naming what is inside. Optional checksum, key and sequence fields add four bytes each.

When to use this

Use it to read GRE in a capture taken between the endpoints, and when packets arrive but the tunnel does not accept them.

First 30 seconds

1. Capture between the endpoints, filter gre — packets in both directions?

2. One direction only → the return path filters protocol 47, or the far end points elsewhere.

3. Packets arrive but the tunnel's input counter does not move → key or endpoints do not match the local tunnel.

4. Compare flags and key in both directions.

5. Fragmented GRE → lower the tunnel MTU.

Operational verification

inner packet routed into the tunnel → GRE header with matching options and key → outer IP header, protocol 47, to the far endpoint → permitted on the path → accepted by the matching tunnel → inner packet routed on

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
Key commandshow interfaces Tunnel0
Scope / prerequisiteUse it to read GRE in a capture taken between the endpoints, and when packets arrive but the tunnel does not accept the…
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 Verification workflow Verify boundary
show interfaces Tunnel0
show interfaces Tunnel0 | include key|Key|keepalive|Checksumming

The interface view shows whether a key, checksums or sequencing are enabled and the keepalive setting, together with counters of packets in and out and input errors.

In a capture taken in the underlay, filter on gre or ip.proto == 47. Read the outer source and destination (the endpoints), the GRE flags and protocol type, the key if present, and then the inner packet's own addresses. To follow one conversation through the tunnel, filter on the inner addresses.

Known-good: GRE packets flow in both directions between the two endpoints, with the same flags and key each way and the expected inner protocol.

Step 2 Failure isolation workflow Narrow the fault
  • GRE packets in one direction only. The return path filters protocol 47, or the far end's tunnel destination does not point back here.
  • Packets arrive but the tunnel's input counter does not rise. They match no tunnel: the key differs, or source and destination do not mirror the local tunnel.
  • One side has a key or checksums configured and the other does not. The headers differ and packets are dropped.
  • The protocol type is not carried by the receiving tunnel. For example IPv6 into a tunnel with no IPv6 configured.
  • Only keepalive-shaped packets appear. The tunnel is up at the GRE level and nothing is being routed into it.
  • GRE packets are fragmented. The inner packets are too large for the path after encapsulation; lower the tunnel's MTU.
  • Nothing passes a firewall that permits "all TCP and UDP". GRE is neither; protocol 47 needs its own rule.
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

The protocol type uses EtherType values: 0x0800 IPv4, 0x86DD IPv6. A key configured on one side only, or different keys, makes the receiver discard the packets silently. GRE has no ports, so it does not pass port-based NAT, and firewalls need an explicit rule for protocol 47.

Key checks
  • show interfaces Tunnel<n> — key, checksum and keepalive settings; packets in and out; input errors.
  • Capture filter gre or ip.proto == 47 — outer endpoints, flags, protocol type, key, inner addresses.
ReferenceWhat it is1 section · depth on demand

Mental model

A GRE packet is the original packet with two headers placed in front: a new IP header that carries it to the other end of the tunnel, and a short GRE header that says what kind of packet is inside.

ReferenceWhy it matters1 section · depth on demand

Why it matters operationally

In a capture taken between the tunnel endpoints, everything looks like traffic between two routers. The GRE header is what reveals the content — and its optional fields, the key in particular, must agree on both ends or packets are silently dropped on arrival.

ReferenceHow it works1 section · depth on demand

How it works

Layout.

PartSizeContents
Outer IP header20 bytesSource and destination: the tunnel endpoints. Protocol field = 47
GRE header4 bytes, up to 16 with optionsFlags and the type of the inner packet
Inner packetThe original packet, unchanged

The GRE header.

FieldSizeMeaning
C flag1 bitA checksum field follows
K flag1 bitA key field follows
S flag1 bitA sequence number field follows
Version3 bits0
Protocol type16 bitsWhat the inner packet is, using EtherType values
Checksum4 bytes, optionalCovers the GRE header and payload
Key4 bytes, optionalA number that must match on both ends
Sequence number4 bytes, optionalFor detecting packets out of order

Common protocol types:

ValueInner packet
0x0800IPv4
0x86DDIPv6
0x8847MPLS
0x6558An Ethernet frame (used for Layer 2 over GRE)

With no options, as in a plain Cisco tunnel, the header is four bytes and the total overhead 24. Each option adds four.

The key (tunnel key <number>) distinguishes several tunnels between the same pair of addresses and acts as a weak check against misdelivery. It is not a security feature — it is sent in clear. A packet whose key does not match the receiving tunnel's is discarded.

Keepalives have a recognisable shape: the router sends a GRE packet whose inner packet is itself a GRE packet addressed back to the sender, with protocol type 0. The far end unwraps the outer layer and simply routes the inner packet back.

On the way, only the outer header is looked at. The outer TTL decreases at each hop; the inner packet's TTL decreases once, as the tunnel counts as a single hop.

ReferenceImportant terms & boundaries1 section · depth on demand

In depth

GRE header fields

The GRE header is small. RFC 2784 defines it as a 4-byte minimum, plus an optional 4 bytes:

  • C bit: when set, a checksum and a reserved field follow.
  • Reserved0 bits: receivers discard packets where bits 1–5 are set, unless they support the older RFC 1701.
  • Version: must be 0. Version 1 is the enhanced GRE used by PPTP.
  • Protocol type: the EtherType of the payload, such as 0x0800 for IPv4.

The base specification has no key or sequence fields. RFC 2890 adds them back as extensions.

Header layout

FieldBitsNotes
C (checksum present)1Usually 0
Reserved012Bits 1–5 must be 0 (otherwise RFC 1701 keys, sequence numbers, routing)
Version30 (1 = PPTP enhanced GRE)
Protocol type16EtherType of the payload
Checksum + Reserved116 + 16Only when C = 1
Key (RFC 2890)32Optional; identifies flows or tunnels (used by mGRE and ERSPAN)
Sequence (RFC 2890)32Optional; ordering

Common protocol types

ValuePayload
0x0800IPv4
0x86DDIPv6
0x88BEERSPAN type II
0x22EBERSPAN type III
0x6558Transparent Ethernet bridging (Layer 2 over GRE)
0x8847MPLS

Overhead

EncapsulationAdded bytes
GRE over IPv4, no options24 (20 IP + 4 GRE)
With a key28
With a key and checksum32
GRE over IPv644
analyst$ tshark -r gre.pcap -Y gre -T fields -e ip.src -e ip.dst -e gre.flags_and_version -e gre.proto -e gre.key | sort | uniq -c
    812 198.51.100.2  203.0.113.20  0x0000  0x0800
     40 10.255.0.11   10.99.0.40    0x1000  0x88be
analyst$ sudo tcpdump -ni eth0 -v -c 2 'ip proto 47'
IP (tos 0x0, ttl 254, id 0, offset 0, flags [DF], proto GRE (47), length 108)
    198.51.100.2 > 203.0.113.20: GREv0, length 88: IP 10.110.0.64 > 10.40.0.20: ICMP echo request, id 3, seq 1, length 64

Reading the example

The first line is plain GRE carrying IPv4, with no flags set. The second has flag 0x1000, which is the sequence number present bit, and protocol 0x88be. That is ERSPAN type II, which uses GRE sequence numbers. Seeing both in one capture is normal on a switch that also mirrors traffic.

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

Basis: https://www.rfc-editor.org/rfc/rfc2784.html · confidence 94%
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 packetgre protocol type
Confirmation

Confirm action

Continue?