Hi! I'm Lexi. I'm 17, and one of the things I'm interested in right now is gaining a deeper understanding of how computers work and showing that in new ways.<p>A few months ago I published <a href="https://cpu.land" rel="nofollow noreferrer">https://cpu.land</a> (discussion: <a href="https://news.ycombinator.com/item?id=37062422">https://news.ycombinator.com/item?id=37062422</a>). After cpu.land, I felt a lot of pressure to make another Big Giant Thing but didn't really have anything compelling. So I just hacked away on personal projects and, through some coincidental learning on how the Internet works, ended up hacking together a traceroute program that could live stream to a website from scratch!<p>I realized I had never seen this sort of thing on the web before, and it was actually a kind of cool and novel way of visualizing the structure of the Internet, so I polished it up and built a pretty site around it. In the process, I learned some really interesting things about how BGP and the structure of The Internet, so I melted the traceroute tool with an article sharing that knowledge.<p>I'm still hacking on this and I'm sure my code will manage to break somehow, so please let me know if you have any suggestions! :)<p>(Side note: why Rust? I don’t think programming language choice matters that much, but I wanted to quickly write a very dependable low-level program, and I really like Rust’s error handling primitives.
Why do you care about this?)
> BGP is the protocol that gives the Internet its shape, and you can’t directly speak it yourself.<p>It's actually surprisingly easy to get an ASN for yourself and speak BGP. If you find building something like this tool interesting, you should give it a try. I wrote an introduction of sorts earlier (<a href="https://qt.ax/asn" rel="nofollow noreferrer">https://qt.ax/asn</a>) if that interests you.
This is "how your server reaches my computer but reversed" rather than "how my computer reaches your server". The routing in each direction will most likely be very different.
Here's a paper you might be interested in with regards to how traceroute works. One thing that many (non-network) folks miss is that traceroute is not necessarily symmetrical -- the return path may differ.<p><a href="https://archive.nanog.org/sites/default/files/traceroute-2014.pdf" rel="nofollow noreferrer">https://archive.nanog.org/sites/default/files/traceroute-201...</a>
> WHOIS is actually an... interesting protocol to make a parser for.<p>It's actually impossible. Responses are essentially free-form (if the server responds at all). I tried my hand at this; you can make an ad-hoc "parser" that works for 90% of addresses/domains (or you could, ten years ago when I tried). But the remainder are intractable.<p>Nowadays it's much worse; nearly everything is hidden behind privacy shields, which purport to protect PII. But WHOIS records aren't supposed to contain personal information; they're supposed to contain contact information for network operators.<p>This is ICANN's doing, I'm afraid. ICANN had a rule that networks should provide public WHOIS servers. They never enforced the rule, and now they've scrapped it.
You can go one step further and instead of separate ICMP ECHO trace, use existing HTTP TCP connection between client's browser and your web server. That way you can traverse client-side NAT and/or stateful firewall.
You might be interested to know that many times, packets in a TCP session take asymmetric routes across the internet. In my experience, the most common reasons for this are business rules related to cost and human error.<p>If you think about how IP works, you’ll see that this doesn’t particularly matter but that it can make understanding the routing more difficult.
I think it's also worth mentioning mtr, which is what I use much more frequently than traceroute. It can help diagnose intermittent packet loss, and gives you an averaged sense of how things flow.<p>This article from APNIC explains more about mtr and how to read it (plus some interesting details about how MPLS can obscure true paths)<p><a href="https://blog.apnic.net/2022/03/28/how-to-properly-interpret-a-traceroute-or-mtr/#:~:text=Traceroute%20is%20a%20one%2Dshot,is%20the%20tool%20to%20use" rel="nofollow noreferrer">https://blog.apnic.net/2022/03/28/how-to-properly-interpret-...</a>.<p>Also worth noting: It's also sometimes useful to trace with UDP, and many routers will drop ICMP selectively under strain.<p>Nice article, and excellent presentation!
As it was mentioned above, you are not measuring connection from the client to the server, but from the server to the client. It can be a completely different route, and internal routing behind the IP is hidden.
You should try 0trace to get the real route
Very cool way to present this. Obviously there's a lot of legwork here, but for major ISPs you could probably use some heuristics to give a little more detail on internal network structure. Comcast, for example, has their core network under ibone.comcast.net, but their HFC infrastructure directly under comcast.net. So you can tell when traffic makes the jump from their HFC consumer ISP network to their backbone. At one point I had some notes on patterns like this for a number of the majors but I think I've lost it. :(
> My claim that this website’s traceroute was the path your packets took to reach my server was a bit of a white lie. To calculate that, I would’ve had to be able to run a traceroute to my server from your computer. Instead, I ran the traceroute from my server to your computer and just reversed it. That’s also why the traceroute at the top seemingly loads in reverse order.<p>I was wondering if we'd address this. That was my first thought - how can you do this without initiating ICMP from my side?<p>> Does running a “reverse traceroute” sacrifice accuracy? A little, actually.<p>> As I said when describing Internet routing, each device a packet traverses makes a decision about where to send the packet next until it reaches its final destination. If you send a packet in the other direction, the devices might make different routing decisions… and if one device makes one different decision, the rest of the path will certainly be different.<p>> This reverse traceroute is still helpful. The paths will be roughly the same, likely differing only in terms of which specific routers see your packet.<p>Sure... But it's pretty common for multi pathed AS' to traverse in all sorts of different ways. My experience (non residential) is that more often than not, the trace and reverse trace were different. Your upstreams and my upstreams have very different commercial agreements, and both peer and transit in multiple places.<p>Still cool though, well done!
IPv6 support would be great for this. I run my own AS (AS200676) and one of my prefixes is actually announced at my home. I'm really curious as to what would the auto-generated green text say about that route.<p>I announce only IPv6, because I don't currently have access to any v4 blocks, they are expensive and I have little need for one.
There should be a traceroute protocol whereby a "specially marked packet" is understood to be traceroute, and generates an ICMP response even though its TTL is still positive. The ICMP response will carry the observed TTL value.<p>Then one packet will get all the echoes in one go instead of having to send a tirade of packets with increasing TTL values.
Great write up, thank you for making this! From a learning design perspective, the blend of static and dynamic prose based on my own packet’s journey was super cool, not something I’ve seen done quite that way before.<p>Makes me imagine an online programming textbook that could to walk you through what your own custom code is doing. Very cool!
Doesn't work at all with Enhanced Tracking Protection enabled in Firefox, and times out when it is disabled.<p>I guess it's supposed to do something like this: <a href="https://dnschecker.org/online-traceroute.php" rel="nofollow noreferrer">https://dnschecker.org/online-traceroute.php</a>
There's no possible way to guarantee that traceroute is accurate. The same route is not taken both directions.<p>A Practical Guide to (Correctly) Troubleshooting with Traceroute by Richard A Steenbergen explains it well
> <i>"Hi! I'm Lexi. I'm 17..."</i><p>Holy shit. This girl's going places. I just skimmed <a href="https://kognise.dev" rel="nofollow noreferrer">https://kognise.dev</a> and saw that in addition to the deep understanding of TCP/IP and all 7 layers of the OSI model she appears to posses, she also does front- and back-end development, embedded hardware, mobile apps, and compilers. She also rock climbs, can pilot a Cessna (all by herself), build robots, plays (<i>and</i> composes music for) the cello (since she was 5 years old apparently).<p>Do I need to keep going? This is nothing short of incredible. If I did 1/10 of the things this kid's already done by the time I kick the bucket I would have lived a full life.