Generic Routing Encapsulation (GRE) tunnels provide virtual point-to-point and multipoint connectivity across IP networks, enabling Cisco routers to transport routing protocols, multicast streams, and IPv6 payloads over an existing IPv4 or IPv6 underlay. Because a GRE tunnel is a logical construct rather than a physical wire, verifying whether it is truly operational requires checking more than just the local interface state. You must inspect line protocol conditions, packet counters, keepalive responses, and—when encrypted—the underlying IPsec security associations.
Table of Contents
Core Cisco IOS CLI Commands to Check GRE Tunnel Status and Statistics
To verify whether a GRE tunnel interface is active and forwarding traffic on a Cisco IOS or IOS XE router, use the following privileged EXEC commands. Replace <number> with your configured tunnel interface ID.
! 1. Quick summary of administrative and line protocol status for all tunnels
Router# show ip interface brief | include Tunnel
Tunnel0 10.255.0.1 YES NVRAM up up
Tunnel1 10.255.0.5 YES NVRAM up down
! 2. Detailed inspection of GRE parameters, keepalives, MTU, and traffic counters
Router# show interfaces tunnel <number>
Tunnel0 is up, line protocol is up
Hardware is Tunnel
Internet address is 10.255.0.1/30
MTU 17916 bytes, BW 100 Kbit/sec, DLY 50000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation TUNNEL, loopback not set
Keepalive set (10 sec), retries 3
Tunnel linestate evaluation up
Tunnel source 203.0.113.1 (GigabitEthernet0/0), destination 198.51.100.1
Tunnel Subblocks:
src-track:
Tunnel0 source tracking subblock associated with GigabitEthernet0/0
Set of tunnels with source GigabitEthernet0/0, 1 member (includes iterators), on interface <OK>
Tunnel protocol/transport GRE/IP
Key disabled, sequencing disabled
Checksumming of packets disabled
Tunnel TTL 255, Fast tunneling enabled
Tunnel transport MTU 1476 bytes
Tunnel transmit bandwidth 8000 (kbps)
Tunnel receive bandwidth 8000 (kbps)
Last input 00:00:02, output 00:00:02, output hang never
Last clearing of "show interface" counters never
Input queue: 0/375/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/0 (size/max)
5 minute input rate 142000 bits/sec, 38 packets/sec
5 minute output rate 156000 bits/sec, 41 packets/sec
28450 packets input, 19842100 bytes, 0 no buffer
Received 0 broadcasts (0 IP multicasts)
0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
31204 packets output, 21490800 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
! 3. Verify the active configuration applied to the tunnel interface
Router# show running-config interface tunnel <number>
Building configuration...
Current configuration : 194 bytes
!
interface Tunnel0
ip address 10.255.0.1 255.255.255.252
ip mtu 1400
ip tcp adjust-mss 1360
keepalive 10 3
tunnel source GigabitEthernet0/0
tunnel destination 198.51.100.1
end
Key fields to validate in the output above:
* Tunnel0 is up, line protocol is up: Confirms both the administrative state and local protocol checks (or active keepalives) have succeeded.
* Tunnel source ... destination ...: Displays the underlay IP addresses and physical source interface binding (<OK>).
* Keepalive set: Indicates whether active end-to-end health probing is enabled (Keepalive not set appears by default).
* Tunnel transport MTU: Shows the automatically calculated maximum payload size after accounting for the 24-byte GRE + outer IPv4 header overhead (1500 − 24 = 1476 bytes).
* packets input / packets output: Confirms bidirectional encapsulation (output) and decapsulation (input) across the tunnel.
Understanding GRE Tunnel States and How Keepalives Work
Seeing an operational status in the CLI output does not always guarantee end-to-end reachability. Because GRE behaves differently from physical links, interpreting its status combinations requires understanding how Cisco IOS evaluates virtual interfaces.
Why does a Cisco GRE tunnel stay up/up when the remote router is down?
By design, GRE (defined in RFC 2784, using IP Protocol 47) is a stateless encapsulation protocol with no built-in control plane or handshake. When keepalives are not configured, a Cisco router evaluates only local criteria before placing a point-to-point GRE tunnel into the up/up state:
1. The tunnel interface is not administratively shut down.
2. The configured tunnel source interface is in the up/up state and has a valid IP address assigned.
3. The router has a valid route in its Routing Information Base (RIB) to reach the tunnel destination IP address (including a default route 0.0.0.0/0), and that route does not point out the tunnel interface itself.
If the remote peer powers off or an intermediate ISP drops GRE packets, the local router’s underlay route to the destination IP often remains valid (for example, via a default gateway), causing the tunnel to remain up/up and blackhole traffic.
What do the different interface and line protocol status combinations mean?
TunnelX is up, line protocol is up: All local source and routing checks pass, and if keepalives are enabled, keepalive responses are actively arriving from the remote endpoint.TunnelX is up, line protocol is down: The tunnel interface is enabled, but a protocol dependency has failed. Common causes include: no route in the routing table to thetunnel destination, the physicaltunnel sourceinterface is down, consecutive GRE keepalive probes have timed out, or the tunnel source tracks an inactive HSRP/redundancy virtual IP.TunnelX is administratively down, line protocol is down: Theshutdowncommand is currently applied underinterface TunnelX.TunnelX is down, line protocol is down: The logical interface has failed initialization due to a critical hardware or software subblock error.
How do GRE tunnel keepalives detect remote peer status?
Configuring keepalive [period [retries]] (defaulting to every 10 seconds with 3 retries) under the tunnel interface enables active end-to-end path verification without requiring software changes on the remote peer:
1. Packet Construction: The local router pre-builds an inner GRE keepalive response packet with its own tunnel source IP as the destination and the remote tunnel endpoint IP as the source.
2. Encapsulation & Transmission: It wraps that inner packet inside a standard outer GRE header addressed to the remote tunnel destination IP and transmits it.
3. Stateless Echo at Remote Peer: When the remote router receives the packet on IP Protocol 47, it strips the outer GRE header, inspects the inner IP header, sees that the destination IP belongs to the originating router, and routes the inner GRE packet right back to the sender.
4. State Enforcement: If the originating router misses the configured number of consecutive keepalive returns (for example, 3 missed packets at 10-second intervals = 30 seconds), it brings the tunnel line protocol down, allowing dynamic routing protocols or floating static routes to fail over immediately.
Verifying GRE over IPsec Tunnel and Crypto Session Status
Because standard GRE does not encrypt payloads, production deployments frequently pair GRE with IPsec (tunnel protection ipsec profile <profile-name>). In a GRE over IPsec architecture, the GRE line protocol depends on the underlying IKE (Phase 1) and IPsec (Phase 2) Security Associations (SAs). Use the following CLI commands to verify both layers simultaneously.
! 1. Verify unified crypto session state mapped to the Tunnel interface
Router# show crypto session detail
Crypto session current status
Code: C - IKE Configuration mode, D - Dead Peer Detection
K - Keepalives, N - NAT-traversal, T - cTCP encapsulation
X - IKE Extended Authentication, F - IKE Fragmentation
R - IKE Auto Reconnect, U - IKE Dynamic Route Update
Interface: Tunnel0
Profile: GRE-IPSEC-PROFILE
Uptime: 04:12:33
Session status: UP-ACTIVE
Peer: 198.51.100.1 port 500 fvrf: (none) ivrf: (none)
Phase1_id: 198.51.100.1
Desc: (none)
Session ID: 0
IKEv2 SA: local 203.0.113.1/500 remote 198.51.100.1/500 Active
Capabilities:D connid:1 lifetime:19:47:27
IPSEC FLOW: permit 47 host 203.0.113.1 host 198.51.100.1
Active SAs: 2, origin: crypto map
Inbound: #pkts decaps: 28455, #pkts decrypt: 28455, #pkts verify: 28455
Outbound: #pkts encaps: 31209, #pkts encrypt: 31209, #pkts digest: 31209
! 2A. Check Phase 1 status if using IKEv2 (Look for Status: READY)
Router# show crypto ikev2 sa
IPv4 Crypto IKEv2 SA
Tunnel-id Local Remote fvrf/ivrf Status
1 203.0.113.1/500 198.51.100.1/500 none/none READY
Encr: AES-CBC, keysize: 256, PRF: SHA512, Hash: SHA512, DH Grp:19, Auth sign: PSK, Auth verify: PSK
Life/Active Time: 86400/15153 sec
! 2B. Check Phase 1 status if using IKEv1 / ISAKMP (Look for state: QM_IDLE)
Router# show crypto isakmp sa
IPv4 Crypto ISAKMP SA
dst src state conn-id status
198.51.100.1 203.0.113.1 QM_IDLE 1001 ACTIVE
! 3. Check Phase 2 IPsec SAs and encryption counters for the specific GRE tunnel
Router# show crypto ipsec sa interface tunnel <number>
interface: Tunnel0
Crypto map tag: Tunnel0-head-0, local addr 203.0.113.1
protected vrf: (none)
local ident (addr/mask/prot/port): (203.0.113.1/255.255.255.255/47/0)
remote ident (addr/mask/prot/port): (198.51.100.1/255.255.255.255/47/0)
current_peer 198.51.100.1 port 500
PERMIT, flags={origin_is_acl,}
#pkts encaps: 31209, #pkts encrypt: 31209, #pkts digest: 31209
#pkts decaps: 28455, #pkts decrypt: 28455, #pkts verify: 28455
#pkts compressed: 0, #pkts decompressed: 0
#pkts not compressed: 0, #pkts compr. failed: 0
#pkts not decompressed: 0, #pkts decompress failed: 0
#send errors 0, #recv errors 0
local crypto endpt.: 203.0.113.1, remote crypto endpt.: 198.51.100.1
path mtu 1500, ip mtu 1500, ip mtu idb GigabitEthernet0/0
current outbound spi: 0xC4901B2A(3297778474)
PFS (Y/N): N, DH group: none
inbound esp sas:
spi: 0x8A3F1104(2319388932)
transform: esp-256-aes esp-sha256-hmac ,
in use settings ={Tunnel, }
conn id: 2001, flow_id: CSR:1, sibling_flagsFFFFFFFF80000048, crypto map: Tunnel0-head-0
sa timing: remaining key lifetime (k/sec): (4607998/2084)
IV size: 16 bytes
replay detection support: Y
Status: ACTIVE(ACTIVE)
Key indicators to check in the crypto output:
* Session status: UP-ACTIVE: Confirms both Phase 1 and Phase 2 negotiations have succeeded for the tunnel.
* IPSEC FLOW: permit 47 host ...: Verifies that the IPsec transform is explicitly protecting IP Protocol 47 (GRE) between the two tunnel endpoints.
* #pkts encrypt and #pkts decrypt: Repeating the command should show both counters incrementing simultaneously. If #pkts encrypt increases while #pkts decrypt stays at 0, return ESP traffic (IP Protocol 50) or UDP port 4500 (NAT-T) is being blocked upstream, or the remote peer’s tunnel configuration is mismatched.
Step-by-Step Guide to Troubleshooting Down or Flapping GRE Tunnels
When your verification checks reveal a tunnel stuck in up/down or constantly bouncing between up and down, follow this sequential diagnostic workflow to isolate and fix the root cause.
Step 1: Query the Internal Tunnel Line State Evaluation Reason
Before testing external paths, check why Cisco IOS marked the tunnel line protocol down using the internal tunnel diagnostic command:
Router# show tunnel interface tunnel <number>
Tunnel0
Mode:GRE/IP, Destination 198.51.100.1, Source GigabitEthernet0/0
Application ID 1: unspecified
Tunnel Subblocks:
src-track:
Tunnel0 source tracking subblock associated with GigabitEthernet0/0
Set of tunnels with source GigabitEthernet0/0, 1 member (includes iterators), on interface <OK>
Linestate - current down
Last linestate change time 00:02:14,Reason: Keepalive failed
Examine the Linestate and Reason fields (along with the src-track subblock). Common reported reasons include Source interface down, No route to destination, Tunnel destination recursive, or Keepalive failed. Ensure that the source interface matches an active interface and that both endpoints have matching tunnel source and tunnel destination declarations (the local source IP must exactly match the remote peer’s configured destination IP).
Step 2: Validate Underlay Routing and IP Protocol 47 Reachability
Verify that the router has a valid underlay route to the remote tunnel destination and that packets can reach it from the exact tunnel source IP:
Router# show ip route 198.51.100.1
Routing entry for 198.51.100.0/24
Known via "static", distance 1, metric 0
Routing Descriptor Blocks:
* 203.0.113.254, via GigabitEthernet0/0
Route metric is 0, traffic share count is 1
Router# ping 198.51.100.1 source GigabitEthernet0/0
- If
show ip routereturns% Network not in table(and no default route exists), add a static route or verify your underlay IGP/BGP session. - Remember that a successful ICMP
pingonly confirms ICMP reachability. Intermediate firewalls or router ACLs along the path must explicitly permit IP Protocol 47 (GRE) (permit gre host <local-ip> host <remote-ip>). If an ACL drops Protocol 47, underlay pings will succeed while GRE keepalives and tunnel data fail.
Step 3: Resolve Recursive Routing Flaps
If the tunnel interface comes up briefly, drops for a few seconds, and repeats endlessly, inspect the system log (show logging):
%TUN-5-RECURDOWN: Tunnel0 temporarily disabled due to recursive routing
%LINEPROTO-5-UPDOWN: Line protocol on Interface Tunnel0, changed state to down
Why this happens: You are running a dynamic routing protocol (such as OSPF, EIGRP, or BGP) over the GRE tunnel, and the remote router is advertising its public/underlay tunnel destination subnet through the tunnel itself. Once the local router learns a better metric or more specific prefix for the tunnel destination via Tunnel0, it tries to encapsulate tunnel packets inside Tunnel0, creating a recursion loop that forces IOS to shut down the line protocol.
How to fix it:
1. Add a static /32 host route for the remote tunnel destination IP pointing strictly to the physical underlay next-hop gateway (static routes have an Administrative Distance of 1, beating OSPF/EIGRP/BGP).
2. Filter the underlay public subnets from being advertised over the GRE tunnel using a distribute-list, prefix-list, or separate routing protocol autonomous system.
3. Alternatively, place the underlay physical interface into a front-door VRF (FVRF) and bind the tunnel to it using tunnel vrf <vrf-name>.
Step 4: Debug Keepalive Drops and MTU Blackholes
If the underlay route is stable but keepalives fail—or the tunnel stays up/up while large TCP sessions stall—use targeted debugs and DF-bit (Don’t Fragment) pings:
! Monitor GRE keepalive transmission and reception in real time
Router# debug tunnel keepalive
Tunnel0: sending keepalive, 203.0.113.1 -> 198.51.100.1 (count=1)
Tunnel0: keepalive received, 198.51.100.1 -> 203.0.113.1
! Turn off debugging immediately after inspection
Router# undebug all
If sending keepalive increments count=1, count=2, count=3 without a keepalive received message, verify whether the remote router has an inbound ACL blocking Protocol 47 or whether asymmetric routing at the remote site is sending the decapsulated return packet out an interface blocked by Unicast Reverse Path Forwarding (uRPF).
Finally, if small pings across the tunnel overlay IP work (ping 10.255.0.2), but application traffic hangs, test for MTU fragmentation issues:
Router# ping 10.255.0.2 size 1400 df-bit
Because GRE adds 24 bytes of overhead (and GRE over IPsec adds 50–76+ bytes), configure ip mtu 1400 and ip tcp adjust-mss 1360 under the tunnel interface on both routers to prevent mid-stream packet drops.
Automated Tools and SNMP Methods for Monitoring Cisco GRE Tunnels
Relying on manual CLI checks is impractical when managing dozens of branch sites or DMVPN spokes. Network administrators use automated SNMP polling, active probes, and network management platforms to track GRE tunnel availability continuously:
- Standard IF-MIB and Cisco IPsec Flow Monitor MIB Polling (SNMP)
Cisco IOS exposes logicalTunnelinterfaces in the standard SNMPIF-MIBalongside physical ports. QueryifDescr(1.3.6.1.2.1.2.2.1.2) orifName(1.3.6.1.2.1.31.1.1.1.1) to identify the uniqueifIndexof yourTunnelXinterface, then pollifOperStatus(1.3.6.1.2.1.2.2.1.8.<ifIndex>) to monitor its operational state (1= up,2= down) andifHCInOctets(1.3.6.1.2.1.31.1.1.1.6) /ifHCOutOctets(1.3.6.1.2.1.31.1.1.1.10) for 64-bit bandwidth utilization. For GRE over IPsec tunnels, supplement interface polling withCISCO-IPSEC-FLOW-MONITOR-MIB(cikeTunStatusat1.3.6.1.4.1.9.9.171.1.2.3.1.35) to track active IKE Phase 1 sessions. - Cisco IOS IP SLA with Enhanced Object Tracking and EEM
To verify actual overlay data-plane forwarding directly from the router, configure anip slaicmp-echoorudp-jitterprobe targeting the remote tunnel interface IP address (for example,10.255.0.2) with a 5-second frequency. Bind the IP SLA operation to atrackobject (track 1 ip sla 1 reachability). This generates immediate%TRACK-6-STATEsyslog events, SNMP traps (CISCO-RTTMON-MIB), or Embedded Event Manager (EEM) automated remediation actions whenever overlay traffic fails—even if GRE keepalives are not supported on the remote third-party endpoint. - SolarWinds Network Performance Monitor (NPM)
SolarWinds NPM automatically discovers logical CiscoTunnelinterfaces during SNMP node onboarding. It correlates tunnelifOperStatuswith dynamic routing neighbor tables (OSPF, EIGRP, and BGP) so operators receive consolidated alerts when a GRE tunnel flaps or drops a routing adjacency, while retaining historical throughput and error counter graphs. - Paessler PRTG Network Monitor
PRTG offers native SNMP Traffic sensors, Cisco IP SLA sensors, and Custom SNMP OID sensors tailored for Cisco routers. Administrators can combine tunnel interface state monitoring with latency and packet-loss thresholds from IP SLA probes to visualize branch-to-hub GRE health on live topology maps. - Zabbix and LibreNMS (Open-Source SNMP & Streaming Telemetry)
Both Zabbix and LibreNMS include built-in Cisco IOS templates that use SNMP Low-Level Discovery (LLD) to automatically detect and monitorTunnelinterfaces, alert onifOperStatuschanges, and graph interface error counters. On modern Cisco IOS XE platforms, these stacks can also ingest model-driven YANG streaming telemetry (Cisco-IOS-XE-interfaces-oper) over gRPC/NETCONF for sub-second tunnel state visibility without SNMP polling overhead.
Official Cisco IOS Documentation and Command References for GRE
For platform-specific syntax, hardware scaling limits, and RFC compliance details, consult the primary Cisco technical publications below:
- Cisco IOS XE Interface and Hardware Component Configuration Guide — Module: Implementing Tunnels
Defines the architectural specifications, prerequisites, and configuration procedures for point-to-point GRE over IPv4/IPv6, multipoint GRE (mGRE), Path MTU Discovery (tunnel path-mtu-discovery), and GRE tunnel key/checksum options. - Cisco IOS Interface and Hardware Component Command Reference — I through K and S through Z
Provides the authoritative syntax definitions, default values, and usage guidelines forinterface tunnel,tunnel source,tunnel destination,tunnel mode gre,keepalive,show interfaces tunnel, anddebug tunnel. - Cisco Support Technical Note — Resolve GRE Tunnel Interface States (Document ID: 118850)
Specifies the exact internal evaluation rules for point-to-point GRE and mGRE line protocol states, detailssrc-tracksubblock tracking dependencies (including HSRP VIP redundancy states), and documents theshow tunnel interface tunnel <number>diagnostic command. - Cisco Support Technical Note — Understand GRE Tunnel Keepalives
Documents the packet construction of GRE keepalive probes, explains why one-way keepalive configuration functions with remote routers that do not configure keepalives, and outlines firewall ACL considerations for IP Protocol 47. - Cisco IOS XE Security Configuration Guide: Secure Connectivity — Module: GRE Tunnel IPsec Protection
Details the configuration and verification of virtual tunnel interface protection usingtunnel protection ipsec profile, IKEv1/IKEv2 profiles, andshow crypto sessiondiagnostic outputs.
Conclusion
Checking GRE tunnel status on a Cisco router starts with show ip interface brief and show interfaces tunnel <number>, but accurate verification goes beyond confirming an up/up status line. Because GRE is inherently stateless, enabling keepalive on the tunnel interface—and verifying Phase 1 and Phase 2 crypto sessions with show crypto session detail when using IPsec—ensures the CLI reflects real end-to-end reachability. Combined with underlay route validation to prevent recursive routing flaps and SNMP or IP SLA monitoring for automated alerting, these practices keep your Cisco GRE overlay links predictable and resilient.











Comments