Skip to content
DevOps AI ToolKit
Newsletter
All prompts
GCP with AI Difficulty: Advanced ClaudeChatGPTCursor

GCP Hybrid Connectivity: Cloud VPN & Interconnect Debug Prompt

Troubleshoot hybrid connectivity to GCP — down HA VPN tunnels, Cloud Router BGP sessions that won't establish, missing or unadvertised routes, and asymmetric traffic between on-prem and a VPC.

Target user
Network and cloud engineers running Cloud VPN, Cloud Interconnect, and Cloud Router
Difficulty
Advanced
Tools
Claude, ChatGPT, Cursor

The prompt

You are a senior cloud network engineer who has restored hybrid connectivity during outages where an HA VPN tunnel shows ESTABLISHED but traffic still black-holes because the Cloud Router isn't advertising the subnet. You reason from the layer that's actually failing — IKE, BGP, or routing — not from rebuilding the tunnel.

I will provide:
- Topology: Cloud VPN (HA or Classic) or Dedicated/Partner Interconnect, the VPC, the Cloud Router, and the on-prem/peer device
- The symptom: tunnel down, BGP not established, some subnets reachable and others not, or intermittent/asymmetric traffic
- Tunnel state: [`gcloud compute vpn-tunnels describe`] status and [`gcloud compute routers get-status`] showing BGP peer state and learned routes
- Config facts: the peer IP, shared secret presence (do NOT paste the secret), both sides' ASNs, advertised route mode (default vs custom), and the peer's advertised prefixes
- Firewall and routing: relevant VPC firewall rules and whether the subnets in question are being advertised

Your job:

1. **Isolate the layer** — Phase 1/2 (IKE/IPsec, tunnel not ESTABLISHED), BGP (tunnel up but session not Established), or routing/policy (session up, routes learned, but traffic still fails). Do not touch IKE settings for what is actually a route-advertisement gap.

2. **VPN/IPsec** — for a down tunnel, check the peer IP, the pre-shared key match, IKE version, and that on-prem allows UDP 500/4500 and ESP. For HA VPN, confirm both interfaces and both tunnels so a single-tunnel failure doesn't read as a full outage.

3. **BGP on Cloud Router** — confirm the peer ASN and Cloud Router ASN, the BGP peer IP pair (the /30 link-local addresses), and that the session is Established. If it's Idle/Connect, state whether it's an address mismatch, an ASN mismatch, or a missing firewall/route to the peer.

4. **Route advertisement** — this is the silent killer. Verify whether the Cloud Router advertises the right prefixes (default advertised routes vs custom), whether the on-prem side advertises the expected subnets, and whether a subnet is simply not in the advertisement set. Check for overlapping/more-specific routes stealing traffic.

5. **Asymmetry and MTU** — for intermittent failures, check symmetric routing across the two HA tunnels and MTU/MSS clamping for dropped large packets.

Output: (a) the failing layer, (b) the exact mismatch or missing advertisement with the get-status line that proves it, (c) the precise gcloud fix (e.g. add a custom advertised range, correct the peer ASN), (d) a verification step, (e) what NOT to change.

Bias toward the narrowest fix — advertise the missing prefix or correct the one wrong ASN — over rebuilding the tunnel. Show me the change before I apply it; a wrong advertised-route change can black-hole production traffic.

Run this prompt with AI

Test it, get an AI-improved version, or compare models — live in the Prompt Workspace. No copy-paste.

Why this prompt works

Hybrid connectivity failures span three layers that look alike from the application’s side — everything just times out — but demand completely different fixes. An IPsec tunnel that won’t reach ESTABLISHED, a BGP session stuck in Idle, and a healthy session that simply isn’t advertising a subnet are three distinct problems, and the most common mistake is tearing down and rebuilding a tunnel that was never the issue. This prompt forces layer isolation first so the fix lands where the failure actually is.

The route-advertisement branch exists because it’s the quietest and most frequent cause of “the VPN is up but nothing works.” A Cloud Router in default advertisement mode may not advertise a newly added subnet, or an on-prem device may not advertise the prefix GCP expects. gcloud compute routers get-status shows the learned and advertised routes explicitly, and the prompt makes the model read that output rather than assume the tunnel state tells the whole story.

The safety framing is deliberate. Advertised-route and firewall changes on a Cloud Router take effect on live production traffic immediately, so the prompt insists on one change at a time, verification between changes, and never pasting shared secrets — the difference between a clean fix and a self-inflicted outage.

Related prompts

More GCP with AI prompts & error guides

Browse every GCP with AI prompt and troubleshooting guide in one place.

Free download · 368-page PDF

Reading prompts? Get all 500 in one free PDF

500 battle-tested, copy-paste AI prompts engineered by a senior systems engineer — every one with fill-in placeholders and safety/back-out notes. Drop your email and it's yours.

  • 500 prompts: Linux · Kubernetes · Terraform · OpenStack · GitLab · Docker · Monitoring · Incident Response
  • Instant PDF download — yours free, forever
  • Plus one practical AI-workflow email a week (no spam)

Single opt-in · unsubscribe anytime · no spam.