How Does Internet Routing Work?
When you load a web page, your request does not travel along a single dedicated wire to the server. It is broken into packets, and each packet is handed from router to router across dozens of independently operated networks until it reaches its destination. Nobody controls the whole path, yet it normally takes a fraction of a second. This article follows a packet on its journey and explains the mechanisms that make global routing work.
The journey starts at your device
Suppose you open a site whose address your computer has just learned through DNS (see What Is DNS?), say 203.0.113.10. Your computer checks whether that address is on its own local network by comparing it with its subnet mask. It is not, so the computer sends the packet to its default gateway, which is normally your home router. The device never needs to know the route to the destination; it only needs to know the next hop.
What a router does with a packet
A router is a computer built to forward packets quickly. Each router keeps a routing table, a list of destination prefixes such as 203.0.113.0/24 together with the neighbor that should receive packets for them. When a packet arrives, the router looks for the most specific matching prefix, known as the longest-prefix match, decrements the packet's time-to-live (TTL) field by one, and sends it on to the chosen neighbor. If no entry matches and there is no default route, the packet is dropped and an error message is returned. If the TTL reaches zero the packet is also discarded, which prevents packets from circling forever.
From your home to your provider
Your home router uses a simple setup: everything not local goes to the provider. It also performs NAT so your private address becomes a public one. The provider's access network carries the packet to a regional router, then on to its backbone. The provider's network is an example of an autonomous system (AS): a collection of networks under one administrative policy that is identified by a number, the ASN. The internet is a network of roughly one hundred thousand such systems, including providers, universities, cloud companies and large content networks.
How autonomous systems learn routes: BGP
Inside an autonomous system, protocols such as OSPF or IS-IS distribute routes between the operator's own routers. Between autonomous systems, the Border Gateway Protocol (BGP) takes over. Each AS announces the IP prefixes it owns or can reach to its neighbors, and neighbors pass those announcements on with their own ASN added to a path list. A router receiving several announcements for the same prefix chooses among them using policy, such as business relationships and cost, and then path length and other tie-breakers. BGP is therefore not "shortest path" routing; it reflects agreements between companies.
Those agreements fall into two broad types. In transit, a smaller network pays a larger one to carry its traffic to everywhere. In peering, two networks exchange traffic for their own customers, often at an internet exchange point, without payment. Large content providers peer widely so that your request reaches them in few hops.
Why routes sometimes break
Because BGP largely trusts what neighbors announce, mistakes can have global effects. A misconfiguration can make a network announce prefixes it does not own, a "route leak" or "hijack", and traffic is diverted or lost until the announcement is withdrawn. Safeguards such as RPKI route origin validation are now being deployed to reduce such incidents. Everyday outages are more mundane: a cut fiber, a failed router or congested link triggers re-routing, and for a few seconds packets may take a longer path or be lost.
Seeing the path yourself
You can watch routing in action with traceroute (Linux and macOS) or tracert (Windows). The tool sends packets with increasing TTL values; each router that discards a packet reports back, revealing the hops. Typical output lists ten to twenty hops with round-trip times. Some hops show asterisks because the router does not answer these probes, which is normal. Keep in mind that forward and return paths often differ, and that different packets of one connection can occasionally take different routes.
Why this matters in everyday life
Routing explains why a site can be fast for your neighbor but slow for you if the two of you use different providers, why VPNs change your latency, and why a problem "somewhere on the internet" can affect only some users. It also explains why the IP address a website sees belongs to a network operator, not to your device. Our speed test and DNS checker can help you separate server problems from name resolution problems.
Conclusion
Internet routing is a cooperative system. Your device passes packets to a gateway, routers forward them hop by hop using longest-prefix matching, and autonomous systems exchange reachability information over BGP according to business agreements. It is remarkably robust, yet it depends on trust and good configuration. Knowing the basics makes network behavior, from slow pages to odd outages, far less mysterious.
Frequently asked questions
Who controls the internet's routing?
No single organization does. Each network operator controls its own routers and decides what to announce and accept, guided by shared standards and agreements.
Why do some traceroute hops show asterisks?
Those routers are configured not to reply to probe packets or are rate-limiting replies. Traffic usually still passes through them normally.