City and region: how networks connect
The internet is a network of networks: tens of thousands of independent companies have agreed to forward packets for one another. A city is where this is easiest to see: a request from an apartment passes through the provider’s district node, its routers, an internet exchange point, and arrives at a data center. The demo compares two paths — from home over fiber and from a phone over 5G — and shows what the delay is made of.
The city and our building
The scale of this level is a city of 20 × 14 km: a schematic of districts, streets and parks, with stylized buildings. Our building is an apartment block with the window of our apartment lit up; double-clicking it takes you into the Local network.
The provider’s optical fiber comes out of the building. An apartment block usually has a shared optical distribution cabinet: a cable with dozens of fibers comes into it, and GPON splitters share the light among the apartments. In an older design (FTTB) the fiber only reaches a switch in the basement, and from there twisted pair runs to the apartments.
Beneath the city lies a whole communications infrastructure: cable ducts — pipes and manholes under the sidewalks — and utility tunnels where telecom cables run alongside power lines and district heating pipes. Cables cross rivers on bridges or along the riverbed, and in the suburbs they are sometimes strung on power-line poles.
A large provider in a city has thousands of kilometers of fiber, dozens of nodes and hundreds of thousands of subscribers. There are anywhere from a few to dozens of such providers, plus mobile operators, data centers, banks and universities with networks of their own. All of them have to connect to each other somehow — that is what the rest of the sections are about.
City fiber
A city trunk cable contains anywhere from dozens to hundreds of fibers (thousands in new ribbon cables) in plastic tubes, with a strength member in the center and protection against water and rodents. A single fiber can carry dozens of wavelengths at 100–400 Gbit/s each, but in a city one or two are often enough: there are plenty of fibers, and they are cheaper than multiplexing equipment.
Nodes are connected in rings: each one is linked in two directions by different routes along different streets. If an excavator cuts the cable on one street, the traffic goes around the ring the other way — within tens of milliseconds. Earthworks are the most common cause of cable cuts in a city.
Many companies don’t lay cable themselves; instead they lease “dark fiber” — unused fibers in someone else’s cable — and connect their own equipment to it. Building cable ducts and renting out space in them is a separate business.
The speed of light in glass is about 200,000 km/s (refractive index ≈ 1.47), which is 5 µs per kilometer. In the model, all the city segments together add up to 42 km one way: that is only 0.21 ms, or 0.42 ms there and back. Within a city, distance hardly affects delay; what matters more is how many devices are on the path and how loaded they are.
District node (OLT)
From the building, the fiber runs to the provider’s district node — 3 km away in the model. Here sits an OLT (optical line terminal): a chassis with line cards, each with 8–16 GPON or XGS-PON ports. Each port serves one tree of 32–64 subscribers, and the whole chassis serves thousands to tens of thousands of apartments.
The OLT is the conductor of the tree: it hands out time slots to the ONTs for upstream transmission and adjusts them dynamically to the load. If you aren’t sending anything, your slot goes to a neighbor. Waiting for your slot is the main addition to the delay on the “home — OLT” segment: 0.4 ms in the model, while light covers the 3 km in 15 µs.
The OLT is connected to the provider’s network by 10–100 Gbit/s links. The ratio of the sum of subscribers’ plans to the capacity of this link is called oversubscription: 2000 subscribers with 1 Gbit/s plans behind a 100 Gbit/s link is a 20:1 oversubscription. That is normal: everyone never downloads at full speed at the same time, and the provider monitors the load and upgrades the links when it approaches the limit at peak hours.
Phone, 5G tower and the mobile core network
A person on the street is connected not to Wi-Fi but to a cellular network. The phone talks over radio to a base station on a tower or a rooftop. It usually has three sectors of 120° each, each with an antenna array; in 5G this is often 32–64 transceivers that form narrow beams aimed right at particular phones (massive MIMO). In a city, base stations are spaced anywhere from a few hundred meters to a couple of kilometers apart.
The main 5G band in cities is around 3.5 GHz with channels up to 100 MHz: in practice, hundreds of megabits per second per phone. Millimeter waves at 26–28 GHz give gigabits but travel only hundreds of meters and don’t go through walls, while low frequencies (700–900 MHz) reach far but have narrow bandwidth. As with Wi-Fi, all subscribers share a sector’s airtime, but here the allocation is fully controlled by the base station: every fraction of a millisecond it decides who transmits and on which frequencies.
The radio segment is the slowest in terms of delay: the phone asks for permission to transmit, waits for its slot in the schedule, and lost blocks are retransmitted. The model allows 4 ms for this in each direction; in real 5G networks the delay to the nearest server is usually 10–30 ms. The radio signal itself covers the 800 m from the phone to the tower in 2.7 µs.
From the tower, data travels over fiber to the mobile core network. This is where the SIM card is checked: the secret key is stored only on the card and in the operator’s database and is never transmitted — the network sends a random “challenge”, and the card computes the response. The core keeps track of traffic, assigns the phone an IP address (almost always a private one, behind the operator’s NAT) and lets the traffic out to the internet through a gateway. When you move from tower to tower, the address and connections are kept: the core simply redirects the flow.
In the model, the phone’s path is 0.8 km of radio, 15 km of fiber to the core, then 10 km to the IX and 9 km to the data center. The RTT is about 9.4 ms versus 1.6 ms from home, and almost all of the difference comes from the radio segment.
Provider node (PoP)
A PoP (point of presence) is a provider’s presence node: a room or a hall in a data center with the core routers of its network. Links from the district OLTs converge here (in the model, 12 km at 100 Gbit/s), and from here links run to exchange points, other providers and upstream backbone networks.
For every packet, a core router looks up the longest prefix in its routing table that matches the destination address and sends the packet out the corresponding port. This is done by specialized chips at hundreds of millions to billions of packets per second. The full internet table — about a million IPv4 prefixes and more than 200 thousand IPv6 prefixes — is kept in special fast memory.
Caches of large services (CDNs) are often located here too: servers of video platforms, app stores and streaming services. A popular video is loaded into such a cache once, and after that thousands of subscribers watch it from their own city without loading the backbones. Thanks to this, most subscriber traffic never leaves the city at all.
The PoP also hosts the provider’s DNS servers and subscriber management systems. A network operations center monitors the load on links and routers around the clock.
Autonomous systems and BGP
The internet is made up of autonomous systems (AS) — networks under a single administration: a provider, a mobile operator, a cloud, a university. Each has a number (ASN) and its own address blocks. Today there are more than 75 thousand active ASes in the world.
Autonomous systems exchange routes with each other using the BGP protocol: “such-and-such prefixes are reachable through me, the path is such-and-such ASes”. Having received announcements from its neighbors, a router chooses the best route not by physical length but by policy: first commercial agreements, then the AS path length and other attributes. That is why a packet’s real path is sometimes unexpectedly long.
Agreements between networks come in two kinds. Transit is a paid service: a large operator promises to deliver a customer’s traffic to any point on the internet. Peering is an exchange on equal terms, usually free: two networks forward to each other only the traffic of their own customers. A small group of backbone networks (Tier 1) buys no transit at all — they peer with each other and together “see” the whole internet.
BGP is largely built on trust, and mistakes in it can be dramatic: if a network mistakenly announces someone else’s prefixes, part of the internet will start sending it other people’s traffic. Protection against this comes from filters and cryptographic verification of who owns the addresses (RPKI).
Internet exchange point (IX)
An internet exchange point (IX) is essentially a big, reliable Ethernet switch, or several switches in different data centers around the city, to which dozens or hundreds of networks connect. Each gets an address in the IX’s shared network and sets up BGP sessions with those it has agreed to peer with. Often, instead of hundreds of separate sessions, one is enough — with the exchange point’s route server.
Without an IX, two neighboring providers in the same city would exchange traffic through an upstream transit operator — for a fee and possibly via another country. This is called “tromboning”: the packet travels hundreds of kilometers away and comes back. Through an IX, traffic goes directly, within the city: cheaper, faster and more reliable.
The world’s largest exchange points carry more than 10 Tbit/s at peak, and large city ones a few terabits. IXes usually operate as non-profit associations of their members and are housed in large carrier-neutral data centers.
In the model, the PoP → IX segment is 18 km of fiber at 100 Gbit/s, followed by IX → data center, another 9 km at 400 Gbit/s. At each hop, the packet spends about 25 µs in a router.
Data center
This is where the website’s server lives. From the street, a data center is a gray building with almost no windows, a transformer substation, a row of diesel generators, and dry coolers or cooling towers on the roof. Double-click to go inside.
City data centers come in two kinds. Carrier-neutral ones are built close to the center and to exchange points: they host providers, CDNs, banks and everyone for whom latency and connectivity matter. Huge cloud campuses, on the other hand, are moved out of town — to where there is land, grid capacity and water.
In the model, the last segment runs from the data center entrance to the server — about 300 m of fiber inside the building at 25 Gbit/s — plus another 0.2 ms for the server itself to do its work.
Step by step: a request from an apartment to a city data center
Scenario “From home”. 1) Apartment → OLT: 3 km of GPON fiber — 15 µs for light, packet serialization (upstream GPON transmits at 1.25 Gbit/s — about 10 µs; for simplicity the model uses 2.5 Gbit/s, as downstream — 5 µs) and about 0.4 ms of waiting for its upstream transmission slot. 2) OLT → PoP: 12 km at 100 Gbit/s; the provider’s router looks up the table. 3) PoP → IX: 18 km; here the packet passes from the provider’s network into the network where the website lives. 4) IX → data center: 9 km at 400 Gbit/s. 5) Inside the data center — 300 m to the server and 0.2 ms to process the request.
In total, about 0.71 ms one way, and about 1.6 ms there and back including the server’s work. Of this, light in the fiber accounts for 0.42 ms and waiting for GPON slots for 0.8 ms (for simplicity the model counts 0.4 ms in both directions, although in reality only the upstream flow waits for slots, while downstream the OLT broadcasts to everyone without waiting — but the response is followed by a TCP acknowledgment that goes upstream again), routers about 0.2 ms, and the server 0.2 ms.
Scenario “From a phone”. 1) Phone → tower: 800 m of radio — 2.7 µs of propagation, 40 µs of serialization at 300 Mbit/s and 4 ms for radio resource allocation and retransmissions. 2) Tower → mobile core network: 15 km of fiber and 0.3 ms of processing — here the packet leaves the cellular network’s tunnel and enters an ordinary IP network. 3) Core → IX: 10 km. 4) IX → data center and server — the same as from home.
The total RTT is about 9.4 ms — almost six times more than from home, even though the wired path is actually shorter (35 km versus 42). Almost all the difference is the radio segment. Real delays are usually higher than the model’s: queues add to them, as does Wi-Fi in the apartment (another 1–5 ms), and the website’s server may not even be in your city.
What delay is made of
The delay of a packet on each segment consists of four parts. Propagation is the time it takes the signal to travel along the line: 5 µs per kilometer in fiber, 3.3 µs in air. Serialization is the time needed to “push” all the packet’s bits into the link: 1500 bytes is 12,000 bits, which takes 12 µs at 1 Gbit/s and 0.12 µs at 100 Gbit/s. Processing is the time it takes a node to make a decision. Queuing is waiting for packets that arrived earlier to leave.
The first three parts are predictable, and they are what the model calculates. Queuing is the most variable part. When a link is busy, packets wait in buffers, and if the buffer is huge, the delay grows to hundreds of milliseconds. This phenomenon is called bufferbloat: someone in the apartment is uploading a large file to the cloud, the upstream link is clogged — and everyone else’s game “lags”. Modern routers fight this with smart queues (fq_codel, CAKE) that keep the buffer from bloating.
Delay is measured with the ping command, and the path with the traceroute command. It sends packets with an increasing “time to live” (TTL): each router decrements the TTL by one and, when it reaches zero, reports itself to the sender. This reveals all the nodes along the way and the time to each one.
Delay matters more than it seems. Opening a website over HTTPS involves DNS, setting up TCP, the TLS key exchange and the request itself: 3–4 round trips, and a page also has dozens of resources. That is why a website in your own city with an RTT of 2 ms opens instantly, while one on another continent at 150 ms takes noticeably longer, even on a gigabit link. Bandwidth and latency are different quantities.
Common misconceptions
“The internet is my provider.” Your provider is just one of tens of thousands of networks. A website is almost always in someone else’s network, and the packet passes between them through peering or transit.
“5G is always faster than home internet.” 5G’s peak speed can be high, but a sector’s airtime is shared, and the radio segment adds milliseconds. For a stable connection at home, fiber is still unbeatable.
“Distance is what matters most for delay.” Within a city, distance means almost nothing: 40 km of fiber is 0.2 ms. Most of the delay comes from nodes, queues and radio. Distance becomes the main factor only at the scale of countries and continents.
“With a 1 Gbit/s plan, websites open 10 times faster than with 100 Mbit/s.” Small pages open at a speed set mainly by the number of round trips and the RTT, not by the link’s bandwidth. A big link makes a difference when downloading large files.