GRE
GRE is a stateless IP encapsulation that creates a logical point-to-point tunnel and can carry routed payloads.
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.
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
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.
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
interface tunnel <id>Primary Commands
Configuration and operational commands for this Topic.
interface tunnel <id>ReferenceCreate or enter a tunnel interface.
Use when: Use this command at the Network Virtualization / Overlay boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. Healthy underlay reachability does not prove overlay mappings; an overlay mapping does not prove encapsulated forwarding.
Cisco IOS / IOS XE · mixedip address <address> <mask>ReferenceAssign an IPv4 address and mask to an interface.
Use when: Use this command at the GRE Tunnels boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. An up tunnel interface does not prove overlay routing, MTU safety or application reachability.
Cisco IOS / IOS XE · mixedtunnel source <interface|ip>ReferenceSet the tunnel source interface or address.
Use when: Use this command at the GRE Tunnels boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. An up tunnel interface does not prove overlay routing, MTU safety or application reachability.
Cisco IOS / IOS XE · mixedtunnel destination <ip>ReferenceSet the tunnel destination address.
Use when: Use this command at the GRE Tunnels boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. An up tunnel interface does not prove overlay routing, MTU safety or application reachability.
Cisco IOS / IOS XE · mixedtunnel mode gre ipReferenceUse GRE over IPv4 as the tunnel mode (default).
Use when: Use this command at the GRE Tunnels boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. An up tunnel interface does not prove overlay routing, MTU safety or application reachability.
Cisco IOS / IOS XE · mixedShow Commands
Read-only Cisco show commands for confirming state, narrowing a fault and interpreting the current boundary.
show ip interface briefShowCompact IPv4 interface/address/protocol state.
Use when: Use as the prior manifest-approved bounded observation/validation surface for this exact Topic.
Quick note: Restores exact/ ownership only; this authored guidance is not observed production Evidence.
Cisco IOS XE · stateshow interfaces tunnel <id>ReferenceInspect tunnel state and endpoints.
Use when: Use this command at the IPsec / Site-to-Site VPN boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. IKE established does not prove that the required traffic matches an IPsec SA or decrypts successfully.
IOS/IOS XE · mixedshow tunnelShowDisplay tunnel interface state.
Use when: Use this command at the GRE Tunnels boundary in the documented evidence chain.
Quick note: Cisco IOS / IOS XE first. An up tunnel interface does not prove overlay routing, MTU safety or application reachability.
Cisco IOS / IOS XE · mixedHow 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.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
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.
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.
Subtopics
Go one level deeper into this subject.
A tunnel interface (interface Tunnel<n>) is a virtual interface with its own IP address; routing sends traffic into it and the router encapsulates it in GRE.
Subtopic Tunnel SourceThe tunnel source is the local underlay address or interface used as the outer source IP (tunnel source <if|ip>); it must be the address the far end uses as its destination.
Subtopic Tunnel DestinationThe tunnel destination is the remote endpoint's address (tunnel destination <ip>); it must be reachable through the underlay, not through the tunnel itself.
Subtopic GRE EncapsulationGRE 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.
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>andping <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)
| Field | Bits | Meaning |
|---|---|---|
| C | 1 | Checksum present |
| Reserved0 | 12 | Must be zero (receivers discard packets with bits 1–5 set, unless they implement RFC 1701) |
| Version | 3 | 0 (version 1 is used by PPTP) |
| Protocol Type | 16 | EtherType of the payload; 0x0800 for IPv4 |
| Checksum + Reserved1 | 32 | Only 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
| Capability | Why it matters |
|---|---|
| Carries multicast and routing protocols | OSPF or EIGRP can run across the Internet between sites |
| Carries non-IP or IPv6 over IPv4 | The Protocol Type field identifies the payload |
| Point-to-point interface | Routes 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.
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
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
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%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.
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.
Quick lookup tables
GRE Tunnels evidence chain
Configuration, operational state, counters and downstream proof remain separate.
| Boundary | Question | Evidence | Does not prove |
|---|---|---|---|
| Definition | What is configured or intended? | running configuration / controller policy | live operation |
| Local state | Is the feature active at the expected scope? | show interfaces tunnel <id> | remote success |
| Counters | Did controlled traffic or an event reach this stage? | scoped counters/timestamps | complete return path |
| Next boundary | What consumes or transports this state? | payload route → tunnel interface → GRE encapsulation → underlay route → remote decapsulation → return overlay route | application success |
GRE · operational reference
Compact state and interpretation boundaries for fast lookup.
| GRE layer | Must be healthy |
|---|---|
| Underlay | Route to tunnel destination resolves outside tunnel |
| Tunnel | Source/destination and line protocol are correct |
| Overlay | Intended routes use tunnel path |
| MTU | Encapsulation overhead fits the real path |