AlgoViz
← Back to trail

A Packet's Journey

Easy+10 XP

Follow one packet as it hops router to router across the internet — routing made visible, one local decision at a time.

No visualization loaded.

Watch

i

Press Run to begin.

There's no single wire from your laptop to a faraway server. Your message is chopped into packets, and each packet hops from router to router, every router reading the destination and passing it one step closer. Press Run and follow one packet's trip — watch the route light up behind it.

How does each router know where to send the packet?

Every packet carries the destination IP address, like an address on an envelope. Each router keeps a table of 'for destinations like this, the closest neighbor is that way.' It doesn't know the whole route — just the next best hop. String enough of those local decisions together and the packet finds its way across the world.

Do all my packets take the same path?

Not necessarily! Each packet is routed independently, so two packets of the same message can take different routes — whichever is clear at that moment. That's why they can arrive out of order. Putting them back in the right order is TCP's job, not the routers'.

What if a router or cable goes down mid-trip?

The network just routes around it. Because each router only picks the next hop, if one path breaks, routers start forwarding to a different neighbor instead. This is the internet's superpower: no single point everyone depends on — packets flow around damage.

Isn't all this hopping slow?

Each hop adds a tiny delay, and more hops (or longer distances) mean more total delay — that's latency. It's why a server physically closer to you feels faster, and why CDNs keep copies near users: fewer, shorter hops. But each individual hop happens in a fraction of a millisecond.

🧠A packet crosses the internet by hopping router to router, each one making a local 'next best hop' decision from the destination address. No router knows the whole path — and that's exactly why the internet routes around failures so well.
endpoints (you & the server)the packet, hoppingarrived at the server