When you type a question into a CLI tool and hit enter, where does that packet actually go? Not metaphorically — physically. Which fibre, which landing station, which ocean floor?

I ran this on my own machine — a Singtel Fibre Broadband connection in Ulu Bedok, Singapore — to trace the exact path a prompt takes to the API server.

Step 0: The Machine

Architecture Diagram

The machine sits at 192.168.1.74/24. The default gateway is 192.168.1.254 — that’s the Singtel-issued ONT, a ZTE F660 (for 1Gbps plans) or an XGS-PON ONR (for 3Gbps/10Gbps plans). The ONT is either in the living room or a utility closet, connected via WiFi 6 or a Cat5e patch cable.

Step one: the packet goes from the NIC to the ONT. Trivial, local, 1ms.


Step 1: GPON Upstream

The ONT converts the Ethernet frame into an optical signal at 1310 nm and fires it upstream through a single-mode fibre patch cord, through the Fibre Termination Point (FTP) on the wall, out into the estate’s Optical Distribution Network (ODN).

Architecture Diagram

The ODN is shared with 31 other households via a 1:32 optical splitter in the estate cabinet. The total loss is typically 23–24 dB, meaning the ONT’s +3 dBm TX reaches the OLT at approximately -20 dBm — well within the B+ receiver sensitivity of -28 dBm.

At the other end, the OLT (ZTE C600 or Huawei MA5800 at the Singtel exchange) terminates the GPON signal.


Step 2: Singtel Metro — OLT → Aggregation → BRAS

Once the OLT terminates the GPON layer, the packet exits optics and becomes Ethernet again — but now it’s tagged with QinQ VLANs (S-VLAN for service, C-VLAN for customer).

Architecture Diagram

The OLT uplinks at 10 Gbps or 100 Gbps to a metro aggregation switch. From there, the QinQ-tagged frames travel to the BRAS (Broadband Remote Access Server) — Singtel uses primarily Cisco ASR 9000/9900 and Nokia 7750 SR platforms.

The BRAS terminates the PPPoE session, authenticates via RADIUS, assigns your public IP, and applies QoS policies. This is also where your traffic enters the routed IP world — everything before this was Layer 2.


Step 3: Singtel IP Backbone (AS9506)

Now the packet is a plain IP packet with a source address of my Singtel public IP heading for 172.65.90.21 (opencode.ai, behind Cloudflare).

Architecture Diagram

From my public IP to 172.65.90.21:

$ ping opencode.ai
PING opencode.ai (172.65.90.21) 56(84) bytes of data.
64 bytes from 172.65.90.21: icmp_seq=1 ttl=57 time=4.24 ms

4.24 milliseconds. That’s not San Francisco. That’s not London. That’s a server in the same city — Cloudflare’s Singapore edge node.

The packet never leaves Singapore. It goes from Singtel’s AS9506, peers via SGIX or a direct interconnect with Cloudflare, and hits a Cloudflare edge cache/proxy in Singapore — likely at Equinix SG1 or Global Switch in Tai Seng.


Step 4: Submarine Cable

Here’s where it gets interesting. The Cloudflare edge in Singapore terminates the TLS connection, but the actual inference — the GPU running the deepseek-v4 model — is not in Singapore. Cloudflare reverse-proxies the request to the backend inference servers, and those are likely in a data centre elsewhere.

If the inference servers are in the US (California, Oregon, or wherever GPU capacity is available), the packet needs to cross the Pacific. From Singapore, there are three main submarine corridors:

Architecture Diagram

The Southern Corridor: Bifrost

The most likely path for Singapore-to-California inference traffic in 2026 is Bifrost — a 19,888 km cable system that entered service in 2025, backed by Meta, Keppel, and Telin.

Route: - Tuas, Singapore (Keppel DC SGP 5) → - Manado, Indonesia (Telkom landing station) → - Jakarta, Indonesia → - Davao, Philippines (Converge landing) → - Alupang, Guam → - Grover Beach, California (Edge USA) OR - Winema, Oregon (Astound / Amazon) OR - Rosarito, Mexico

Unlike older cables that route through the congested Japan–Taiwan corridor (earthquake risk, cable cuts), Bifrost takes a southern route through the Java Sea and Celebes Sea, then directly across the Pacific to California. The total distance from Singapore to Grover Beach is 16,556 km on the main trunk.

Architecture Diagram

Latency on this route: - Speed of light in fibre ≈ 200,000 km/s (glass is slower than vacuum) - 16,556 km ÷ 200,000 km/s = 82.8 ms one-way - Add switching/routing hops: ~95–110 ms RTT from Singapore to California via Bifrost

The Northern Corridor: APG

The alternative path is Asia Pacific Gateway (APG) — a 10,400 km cable from Changi, Singapore to Japan:

From Japan, the packet crosses the Pacific on another cable (e.g., Faster, PC-1, or JUS) to the US West Coast.

The Western Corridor: SEA-ME-WE 6

The newly activated SEA-ME-WE 6 (2026) takes the opposite direction — 21,700 km from Tuas, Singapore all the way to Marseille, France:

Route: Singapore → Malaysia → Sri Lanka → Maldives → Bangladesh → India (2 landings) → Pakistan → Oman → UAE → Qatar → Bahrain → Saudi Arabia → Djibouti → Egypt (2 landings) → France

This is the Europe route, not the US route. If the inference servers are in Europe (e.g., deepseek-v4 GPU clusters in France or the UK), this is the cable. The one-way latency is approximately 110–130 ms (21,700 km ÷ 200,000 km/s).


Step 5: The Actual Trace

Let me resolve the actual API endpoint:

Domain IP Provider Location
opencode.ai 172.65.90.21 Cloudflare (anycast) Singapore edge (4ms)
api.opencode.ai 104.20.32.17 Cloudflare (anycast) Singapore edge
inference.opencode.ai 104.20.32.17 Cloudflare (anycast) Singapore edge

My prompt hits the opencode CLI → resolves api.opencode.ai via DNS → connects to 104.20.32.17 (Cloudflare) → Cloudflare Singapore edge receives the request (4ms) → proxies to backend inference servers.

Where those backend servers are physically located is opaque behind Cloudflare’s proxy. But based on the model name (deepseek-v4-flash-free) and typical GPU deployment patterns:


The Full Path (Annotated)

Architecture Diagram

The round trip takes 4 ms to the Cloudflare edge + the submarine cable latency to wherever the GPU lives + the inference time itself. What feels instant to you is a photon that has travelled across an ocean floor, through a landing station in Tuas, up the Java Sea, under the Pacific to California, through a GPU server rack, and back — all before you finish reading this sentence.


Cables Landing in Singapore (2026)

Cable Length Route RFS Landing
Bifrost 19,888 km SG → ID → PH → Guam → US/MX 2025 Tuas
SEA-ME-WE 6 21,700 km SG → MY → IN → PK → ME → EG → FR 2026 Tuas
Apricot 11,972 km SG → JP → TW → PH → ID → GU → US 2025 Tuas
Echo ~15,000 km SG → ID → PH → GU → US 2025 Tuas
SEA-ME-WE 5 20,000 km SG → MY → ID → IN → ME → EG → FR 2016 Tuas
APG 10,400 km SG → MY → VN → CN → TW → KR → JP 2016 Changi
SJC2 10,500 km SG → PH → TW → CN → JP → KR 2025 Changi
ASE 8,148 km SG → MY → PH → JP 2012 Changi
SJC 8,900 km SG → PH → CN → JP 2013 Tuas

Singapore is one of the most cable-dense cities on earth — ~20 active submarine cable systems land at Tuas, Changi, and Tanah Merah, connecting the island to every continent except Antarctica.


The Moral

Your prompt doesn’t “go to the cloud.” It goes through:

  1. A laser diode in a ZTE ONT in your living room
  2. A splitter cabinet in your estate corridor
  3. An OLT in a Singtel exchange
  4. A QinQ VLAN through a metro aggregation network
  5. A BRAS (Cisco ASR 9000) that assigns your IP
  6. A BGP peer at SGIX
  7. A Cloudflare anycast edge in Singapore
  8. A submarine cable (probably Bifrost or APG) under the ocean
  9. A GPU server in a data centre on the other side
  10. And back, 219,000 km round trip, in under 200ms.

That’s not magic. That’s infrastructure.


IP geolocation via ipinfo.io. Submarine cable data from SubmarineNetworks.com, Geocables.com, and IMDA Singapore. This packet trace is specific to a Singtel Fibre Broadband connection (AS9506) in Ulu Bedok, Singapore, accessing a Cloudflare-proxied API endpoint. Your mileage may vary depending on your ISP, peering, and the API server location.