curl -sL ip.guide/AS19551 | jq .routes305 karma · joined August 9, 2012
curl -sL ip.guide/AS19551 | jq .routesThe site is hosted on Neptune Networks, another side project of mine for people to learn and experiment with BGP.
I don't think there's a strong reason to keep it closed-source.
> Were you already comfortable in Rust or is there a reason you selected Rust for this project?
This was a big learning opportunity for me to learn Rust. I had done two small projects in Rust before this one.
> How often are RIPE info and MaxMind data updated these days?
The MRT dumps where it gets its BGP data are updated every 8 hours, and MaxMind appears to be updated twice a week.
$ curl -sL ip.guide/bulk/networks.csv | head -n 2
prefix,asn,organization,country
1.0.0.0/24,13335,"Cloudflare, Inc.",USNo rate limits or auth for requests, but as mentioned below the api starts to load shed at 2k concurrent requests.
At a 30,000ft view, the site works by building an in-memory routing table at boot time that has an entry for every route on the internet and which ASN (autonomous system number) announces it. From there, it stitches together data on the organization that the ASN belongs to, and geolocation data, and then exposes it in the API/UI. Under the hood it's using a treebitmap[1] data structure, which means that it can do _very_ fast lookups when given a particular ip address or ip address range.
Zooming in a little more, the main data source is MRT dumps from the RIPE RIS project[2]. There are a number of routers that RIPE (one of the 5 regional internet registries that hand out ASNs and IPs) that rely on network operators to share their view of every route on the internet. These routers are probably some of the most well-connected routers in the world. For the purposes of this service, MRT dumps are effectively a point-in-time snapshot of the routing table of that router. IP Guide parses that file, rebuilds it in memory, and attaches other relevant data to each IP range (also known as a "prefix").
This allows the service to stay fast and stateless, which was one of the main things I was trying to optimize for when building it.
[1]: https://blog.apnic.net/2021/06/04/storing-and-retrieving-ip-... [2]: https://ris.ripe.net/docs/10_routecollectors.html
That's a great idea. I'll add a tooltip over some of the less obvious fields describing what they are.
> Is there any way at all to do this for IPv6?
Indeed! It's supported natively, so if you have an IPv6 address you should see it automatically. Here's an example <https://ip.guide/2600::>
> If the IP is associated with hostnames that would be nice to know.
I dig that idea, I'll have to think of the best way to pull that data while keeping the app stateless and fast.
LoginLlama looks super helpful, what else would you like to see from IP Guide to help? Would a boolean attribute on whether or not the IP is a known tor exit node be helpful?