What IIX and OpenIXP actually do at the packet level
How a cable flap causes silent rerouting
- Cable degradation causes packet loss or increased latency on one or more links between Indonesian cities and the IXP, or between the IXP and certain peers.
- BGP hold timers expire (default is typically 90 seconds for the hold timer, with keepalives every 30 seconds). If three consecutive keepalives are missed, the BGP session drops.
- When the BGP session to the IXP peer drops, the router withdraws those routes from its forwarding table.
- The router's BGP decision process selects the next-best path. If the only remaining path is through an international transit provider, traffic now exits Indonesia, hits Singapore, and comes back.
- From the server's perspective, nothing changed. The interface is up, the IP is reachable, HTTP returns 200. But every packet now takes an extra 30-80ms round trip through Singapore.
Detecting reroutes with traceroute and MTR
mtr (My Traceroute) combines traceroute and ping into a continuous probe. It shows each hop, its hostname (which often contains location hints like sgp for Singapore, jkt for Jakarta, sub for Surabaya), and per-hop latency statistics.
BASH
# Run MTR to a known domestic IP, 100 cycles, report mode
mtr -r -c 100 -w 203.0.113.1203.0.113.1 with an actual domestic target — your DNS resolver at the IXP, a domestic CDN node, or another server you operate in a different Indonesian data center. The -r flag produces a report after all cycles complete. The -w flag shows full hostnames instead of truncating them.
What to look for in the output:
- Hostnames containing
sin,sgp,sg,singapore, or AS numbers belonging to Singaporean transit providers appearing in the middle of what should be a domestic path. - A sudden latency jump of 20ms or more between consecutive hops, which often indicates a submarine cable crossing.
- The path should stay within Indonesian AS numbers for domestic destinations. If you see AS numbers belonging to international transit providers (you can check AS ownership at whois services), traffic left the country.
Building a cron-based monitoring script
BASH
#!/bin/bash
# Save as /usr/local/bin/check-domestic-path.sh
# Runs MTR to domestic targets and flags if path leaves Indonesia
TARGETS='203.0.113.1 198.51.100.1' # Replace with real domestic IPs
LOGDIR='/var/log/path-monitor'
ALERT_PATTERNS='sin|sgp|\\.sg\\.|singapore'
mkdir -p "$LOGDIR"
for target in $TARGETS; do
OUTFILE="LOGDIR/mtr-(date +%Y%m%d-%H%M%S)-$target.txt"
mtr -r -c 30 -w "target" > "OUTFILE" 2>&1
if grep -qiE "ALERT_PATTERNS" "OUTFILE"; then
echo "[ALERT] Domestic path to $target appears to route through Singapore" \\
| mail -s 'Path reroute detected' [email protected]
fi
doneBASH
*/15 * * * * /usr/local/bin/check-domestic-path.shtraceroute -A (if your version supports it) show AS numbers per hop. You can then check whether any AS in the path is outside Indonesia.
For a more robust setup, consider integrating with a monitoring system that can track latency baselines. If your normal domestic RTT is 3ms and it suddenly jumps to 40ms, that's a signal worth alerting on regardless of what the hostnames say.
BGP looking glass checks for peering visibility
show ip bgp <prefix> from a router you don't control. Several Indonesian ISPs and APJII have historically operated looking glass services. The availability of these tools changes over time, so search for "IIX looking glass" or "OpenIXP looking glass" to find current endpoints.
What to check:
- Is your destination prefix visible at the IXP at all? If it disappeared, traffic will take the transit path.
- What is the AS path length? A domestic path through IIX typically has 1-2 AS hops. If the looking glass shows a path with 4+ hops going through international ASes, something changed.
- Are there multiple paths? If the IXP path and the transit path are both present, check which one is preferred (marked with
>in BGP output) and why.
