Tools / BGP Tool

BGP Tool · MTR and traceroute with IP location

bgptool is a Linux command line tool that shows the ASN, location and ISP of every hop, powered by our IP database.

Install

Linux · amd64 / arm64
curl -fsSL https://bgp.cx/install.sh | sh

Detects the architecture, verifies the SHA-256, installs to /usr/local/bin/bgptool and grants cap_net_raw so it runs without sudo.

MTR diagnostics

Probes every hop continuously and shows loss, average / best / worst latency and jitter, with the ASN, location and ISP of each hop — find the faulty segment fast.

bgptool mtr 1.1.1.1
bgptool mtr -c 20 -6 example.com

Traceroute

Shows every hop to the target with latency, ASN, location and ISP, so you can see the route at a glance (premium lines, detours …).

bgptool trace 8.8.8.8
bgptool trace -q 1 --json example.com

Sample output

bash
$ bgptool trace 8.8.8.8
bgptool traceroute 8.8.8.8 (8.8.8.8), 30 hops max
 #  Host             RTT (ms)       ASN       Location / ISP
 1  192.168.1.1      0.6 0.5 0.5             private / reserved
 2  100.64.0.1       3.1 2.9 3.0             private / reserved
 3  61.140.0.1       4.2 4.0 4.1    AS4134    China Guangdong Guangzhou  China Telecom
 4  202.97.94.10     8.7 8.5 8.6    AS4134    China Guangdong Guangzhou  China Telecom
 5  202.97.12.1      12.1 12.0 12.3 AS4134    China Shanghai  China Telecom
 6  108.170.241.65   32.4 32.1 32.2 AS15169   Hong Kong  Google
 7  8.8.8.8          31.9 31.8 32.0 AS15169   United States  Google

Usage limits

  • Without signing in: 10 runs a day per IPv4 address / IPv6 /64, up to 64 hops each
  • Signed in: counted against your API plan, one query per hop address
  • Private / reserved addresses and repeats within a run are free
  • Everyone sees ASN and ISP; API members get every location field
  • When the runs or quota are used up the tool keeps tracing, showing the route and latency without IP information until you sign in or the next day
See API plans

Sign in

Run bgptool login and approve the code in your browser — no password in the terminal. On servers you can sign in with an API key.

bgptool login
bgptool login --key ipk_xxx
bgptool whoami

Requirements & downloads

Linux (amd64 / arm64), a single static binary. Sending ICMP probes needs root or cap_net_raw, which the installer sets.

FileSizeVersionSHA-256
bgptool-linux-amd646.2 MBdev-202610053080c1f60dd73fd8849c03a29e7cadd06d5371f8000a2681b9eb7c058d76be0e
bgptool-linux-arm645.7 MBdev-202610052035d220847893960569b7b2ce3641ce5fb68793f9bd83160c2955d88910eca2