How the Internet Actually Works
Submarine fiber cables, autonomous systems, BGP path routing, and the physics of packet switching
“When you send a message or stream a video from a server across the world, what physical and logical path does it actually travel?”
The internet is not a mystical cloud or a satellite mesh. It is a physical lattice of 500+ undersea fiber-optic cables and 115,000 independent commercial networks called Autonomous Systems, dynamically routing 1,500-byte packets via Border Gateway Protocol (BGP).
Quick Answer
The internet is not a celestial cloud floating in the sky, nor is it primarily broadcast through satellites. Over 99% of all international internet data travels through a hidden, physical lattice of roughly 550 transoceanic submarine fiber-optic cables laid across the ocean floor.
When you stream a video or open a webpage hosted on another continent, your device does not establish a single, continuous wire to that server. Instead:
- Your computer chops your request into microscopic chunks called packets (typically no larger than 1,500 bytes each).
- Each packet is stamped with a digital envelope: the sender's IP address, the destination IP address, and a sequence number.
- The internet has no central brain or master switchboard. It is a federation of over 115,000 independent networks called Autonomous Systems (AS)—operated by universities, corporations, governments, and internet service providers.
- These independent networks agree to talk using a single routing language: the Border Gateway Protocol (BGP).
- Routers along the way read each packet's destination IP and flick it along the fastest known path, hopping from local fiber, across national backbones, through an Internet Exchange Point (IXP), down onto the seabed floor, and into a distant datacenter.
- The receiving server reassembles the scrambled packets in order, computes the answer, chops the response back into packets, and flings them across the oceans back to your screen in a fraction of a second.
The Physical Layer: Glass, Photons, and the Ocean Floor
To understand the internet, you must begin with physical geography. The modern global economy runs on threads of ultra-pure silica glass no thicker than a strand of human hair.
[ Smartphone / Laptop ]
│ Wi-Fi Radio / 5G (Airwaves)
▼
[ Local Home Router / Cell Tower ]
│ Gigabit Ethernet / GPON Fiber
▼
[ ISP Optical Line Terminal (OLT) & Central Office ]
│ Dense Wavelength Division Multiplexing (DWDM)
▼
[ Internet Exchange Point (IXP) / National Backbone ]
│ Terrestrial High-Capacity Fiber Trunk
▼
[ Subsea Cable Landing Station (CLS) ]
│ Power Feed Equipment (PFE) + Submarine Terminal
▼
════════════════════════════════════════════════════════════════════════
TRANSOCEANIC SUBMARINE FIBER CABLE (Seabed Floor, up to 8,000 km)
• 12 to 24 optical fiber pairs encased in copper, steel & polyethylene
• Optical repeaters (EDFA) boost laser photons every 60–80 km
════════════════════════════════════════════════════════════════════════
│
▼
[ Destination Subsea Landing Station & Core Datacenter Switch ]
│ Top-of-Rack Switch
▼
[ Destination Server Blade (RAM / NVMe SSD) ]
1. Total Internal Reflection and Infrared Lasers
Inside a fiber-optic strand, data travels as pulses of infrared light (typically at wavelengths of 1310 nm or 1550 nm). Light injected into the core reflects off the boundary between the inner glass core and outer glass cladding through total internal reflection.
Because the speed of light in silica glass ($c / n$, where the refractive index $n \approx 1.468$) is roughly 204,000 kilometers per second—about two-thirds the speed of light in a vacuum—a photon takes roughly 32 milliseconds to cross the 6,600-kilometer Atlantic Ocean.
2. Dense Wavelength Division Multiplexing (DWDM)
A single strand of glass does not carry just one signal. Using Dense Wavelength Division Multiplexing (DWDM), telecom engineers shine dozens of different colored infrared lasers down the exact same physical fiber simultaneously without them interfering with each other.
By slicing the light spectrum into 96 or more distinct frequency channels spaced just 50 GHz apart, a modern subsea cable system (like Google's Dunant or Grace Hopper) can transmit upwards of 250 to 350 Terabits per second across a single cable bundle.
3. Erbium-Doped Fiber Amplifiers (EDFA)
Light loses energy as it traverses thousands of kilometers of glass (attenuation, typically 0.16 dB/km at 1550 nm). Without amplification, signals would fade into indecipherable thermal noise after 100 kilometers.
To solve this, submarine cables feature cylindrical titanium housings called repeaters spliced into the cable every 60 to 80 kilometers along the sea bottom:
- Each repeater contains a length of optical fiber doped with ions of the rare-earth element Erbium.
- An onboard 980 nm or 1480 nm "pump laser" excites the erbium ions.
- When the weakened 1550 nm signal photons strike the energized erbium ions, the ions undergo stimulated emission, releasing duplicate photons of the exact same phase, frequency, and direction.
- This amplifies all 100+ optical wavelengths simultaneously without converting the optical light into electricity and back.
The high-voltage electricity needed to power these undersea lasers (often 10,000 volts DC) is pumped through a solid copper conductor ring surrounding the fiber core from Power Feed Equipment (PFE) located at coastal Cable Landing Stations.
The Political Geography: Autonomous Systems and BGP
The internet is not owned by any single company, consortium, or government. It is a loose, self-organizing federation of roughly 115,000 independent networks called Autonomous Systems (AS).
An Autonomous System is a collection of IP networks and routers under the administrative control of a single entity that presents a unified routing policy to the outside world.
- Google operates AS15169.
- Cloudflare operates AS13335.
- State Bank of India operates AS131238.
- Tata Communications operates AS6453.
Each AS receives a globally unique Autonomous System Number (ASN) assigned by regional registries (such as ARIN in North America, RIPE NCC in Europe, or APNIC in Asia).
┌────────────────────────────────────────────────────────┐
│ HOW NETWORKS INTERCONNECT │
├─────────────────────────┬──────────────────────────────┤
│ Interconnection Model │ Commercial & Physical Nature │
├─────────────────────────┼──────────────────────────────┤
│ Settlement-Free Peering │ Mutual exchange of traffic │
│ (At Internet Exchanges) │ between equal networks. │
│ │ Neither party pays the other.│
├─────────────────────────┼──────────────────────────────┤
│ Transit (Paid Upstream) │ A smaller network pays a │
│ (Tier 1 Backbones) │ Tier 1 carrier to reach the │
│ │ entire global routing table. │
└─────────────────────────┴──────────────────────────────┘
The Internet Exchange Point (IXP)
How do two rival internet providers—say, Airtel and Reliance Jio, or Comcast and Netflix—exchange gigabytes of video traffic without paying massive long-distance bills?
They plug into an Internet Exchange Point (IXP) (such as DE-CIX in Frankfurt, AMS-IX in Amsterdam, or NIXI in Mumbai). An IXP is a physical datacenter housing a massive, high-speed switching fabric. Networks route physical fiber cables into the building, plug into shared Ethernet switches, and peer directly with one another.
Border Gateway Protocol (BGP-4)
To stitch these 115,000 independent networks into a cohesive planetary fabric, edge routers run the Border Gateway Protocol (BGP-4), defined in IETF RFC 4271.
BGP is a path-vector protocol. Unlike internal routing protocols that measure millisecond link latency, BGP calculates routing paths based on policy, commercial contracts, and network hops (AS-Path).
When an AS wants the world to reach its servers, it sends a BGP announcement to its neighbors:
"I am AS15169 (Google). I own the IP range 142.250.0.0/15. If you want to reach these addresses, send your packets to me."
Each neighboring AS prepends its own number to the path and broadcasts it to its peers:
"To reach 142.250.0.0/15, send traffic through path: AS6453 -> AS15169."
Across the world, border routers listen to millions of these announcements and compile a Global BGP Routing Table (which currently contains over 950,000 individual prefix routes).
The System Architecture
The diagram below traces how a single data packet leaves a personal device, navigates the hierarchical topology of the internet, crosses ocean floors via submarine fiber cables, and enters a target cloud datacenter:
The Logical Layer: Packet Switching vs. Circuit Switching
The foundational design choice of the modern internet—pioneered by Paul Baran, Donald Davies, and the creators of ARPANET—was the decision to replace circuit switching with packet switching.
The Flaw of Circuit Switching
In the traditional telephone network, when you placed a phone call from London to New York, the telephone exchange reserved a physical copper circuit dedicated exclusively to your voice for the entire duration of the call:
- Even when you were silent, that circuit remained locked.
- No other human could use that wire.
- If a single cable was severed mid-call, the connection collapsed instantly.
Building a planetary digital network on circuit switching would have required trillions of dollars in redundant wires, and the network would have clogged within seconds.
Packet Switching: Statistical Multiplexing
Packet switching takes the opposite approach: data is shredded into small, self-contained fragments called packets, typically restricted to an Ethernet MTU (Maximum Transmission Unit) of 1,500 bytes.
Original High-Definition Video File (50 MB)
│
▼ Shredded into ~35,000 discrete packets
┌─────────────────────────────────────────────────────────────┐
│ AN IPV4 PACKET (MTU: 1500 B) │
├─────────────────────────────────────────────────────────────┤
│ IP Header (20 Bytes): │
│ • Version (4) │
│ • Total Length (1500) │
│ • Time-to-Live / TTL (e.g. 64) │
│ • Protocol (6 = TCP, 17 = UDP) │
│ • Source IP Address (e.g. 49.37.112.45) │
│ • Destination IP Address (e.g. 142.250.190.46) │
├─────────────────────────────────────────────────────────────┤
│ TCP Header (20 Bytes): │
│ • Source Port (54128) -> Destination Port (443 - HTTPS) │
│ • Sequence Number & Acknowledgment Number │
│ • SYN / ACK / FIN Flags & Window Size │
├─────────────────────────────────────────────────────────────┤
│ Payload Data (1460 Bytes): │
│ • Encrypted TLS Application Data (Chunk #1048) │
└─────────────────────────────────────────────────────────────┘
Because every packet carries its own source and destination address, packets from thousands of different users can interleave across the exact same physical fiber strand like cars merging onto a multi-lane expressway:
- When you stop typing, your device stops transmitting packets, immediately releasing bandwidth for someone else.
- Packets belonging to the same web page can take completely different geographic routes across the planet if a transit link experiences congestion.
The Life of an IP Packet Header (RFC 791)
Every IPv4 packet begins with a mandatory 20-byte header:
- Time-to-Live (TTL): To prevent stray packets from looping forever through misconfigured routers, each packet has an 8-bit TTL field (typically initialized to 64 or 128). Every router that forwards the packet decrements the TTL by 1. If the TTL hits zero, the router discards the packet and sends an ICMP
Time Exceededmessage back to the sender (the mechanism behindtraceroute). - Protocol Number: Tells the operating system kernel which protocol owns the payload (
6for TCP,17for UDP,1for ICMP). - Source and Destination IP: 32-bit addresses determining the originating socket and ultimate terminus.
The Router's Brain: FIBs, TCAMs, and Longest Prefix Match
When a packet arrives at an enterprise or core backbone router, how does the machine decide which outgoing fiber port to fling it down?
A core router does not consult an operating system CPU for routing decisions; general-purpose CPUs are far too slow. A router handling 400 Gbps must process over 30 million packets every single second, leaving less than 30 nanoseconds per packet.
1. The Separation of Planes
High-performance networking separates duties into two distinct architectures:
- Control Plane: Operates in software. It runs BGP, exchanges network topology with peers, and builds the Master Routing Information Base (RIB).
- Data Plane (Forwarding Plane): Operates entirely in hardware silicon. It takes the active routes from the RIB and flattens them into a specialized Forwarding Information Base (FIB) stored in high-speed memory.
2. Ternary Content Addressable Memory (TCAM)
Standard computer RAM takes a memory address and returns the data stored at that address in $O(1)$ time.
Routers use TCAM (Ternary Content Addressable Memory), which operates in reverse: you present the destination IP address, and the TCAM searches its entire database of 900,000 prefix rules simultaneously in a single clock cycle, returning the matching outgoing interface.
3. Longest Prefix Match (LPM)
Because IP routing is hierarchical, multiple rules might match a single IP:
- Route 1:
142.0.0.0/8-> Out interfaceeth1(broad rule covering 16 million IPs) - Route 2:
142.250.0.0/16-> Out interfaceeth2(narrower rule) - Route 3:
142.250.190.0/24-> Out interfaceeth3(most specific rule, covering 256 IPs)
If a packet arrives for 142.250.190.46, the router applies the universal law of IP networking: Longest Prefix Match (LPM). The router always picks the most specific prefix (Route 3) and switches the packet to interface eth3.
The Transport Layer: Why TCP Tames Packet Chaos
The Internet Protocol (IP) makes only one promise: best-effort delivery.
IP does not guarantee that a packet will arrive. It does not guarantee that packets will arrive in the order they were sent. If a router's hardware buffer overflows during peak traffic, the router simply dumps incoming packets into the digital trash bin (packet drop).
To build reliable applications (such as loading web pages, downloading files, or executing bank transfers) over an unreliable packet network, computers wrap IP packets in the Transmission Control Protocol (TCP), standardized in IETF RFC 9293.
Client Handset Web Server
│ │
│── 1. SYN (Seq = 1000) ────────────────────────────────►│
│ "I want to connect. My starting byte counter is 1000"│
│ │
│◄─ 2. SYN-ACK (Seq = 5000, Ack = 1001) ─────────────────│
│ "I accept. My counter is 5000; I expect byte 1001" │
│ │
│── 3. ACK (Seq = 1001, Ack = 5001) ────────────────────►│
│ "Acknowledged. Socket connection established." │
│ │
══════╪════════════════════════════════════════════════════════╪══════
│ ESTABLISHED STATE: SECURE DATA TRANSMISSION │
══════╪════════════════════════════════════════════════════════╪══════
│── Data Packet 1 (Seq = 1001, 1460 Bytes) ─────────────►│
│── Data Packet 2 (Seq = 2461, 1460 Bytes) ──[DROPPED]──X│ (Lost in router buffer)
│── Data Packet 3 (Seq = 3921, 1460 Bytes) ─────────────►│
│ │
│◄─ Cumulative ACK (Ack = 2461) ─────────────────────────│
│ "I received up to 2460, but I am still missing 2461!"│
│ │
│── Fast Retransmit: Packet 2 (Seq = 2461) ─────────────►│
│ │
│◄─ Cumulative ACK (Ack = 5381) ─────────────────────────│
│ "Received Packet 2! Buffer complete up to byte 5381."│
1. Sequence Numbers and Reassembly
Every byte of data sent over TCP is assigned an incremental 32-bit sequence number. If a 100-packet image arrives out of sequence (Packet 1, 3, 2, 5, 4) because intermediate routers took different geographic paths, the receiver's TCP stack buffers the out-of-order chunks and reassembles them sequentially before handing the data to the browser.
2. Sliding Windows and Congestion Control
If a fast server connected to 100 Gbps fiber blasted data at a smartphone on a weak cellular connection, the phone's buffer would saturate instantly, resulting in massive packet drop.
TCP prevents this using flow control and congestion control:
- Receive Window (
rwnd): The client continuously advertises how many free bytes its memory buffer currently has. The server is mathematically forbidden from transmitting more unacknowledged bytes than the client can hold. - Congestion Window (
cwnd): Algorithms like CUBIC or Google's BBR (Bottleneck Bandwidth and RTT) probe the network. They start slowly, ramp up speed until packet delay or loss is detected, and back off gracefully to avoid congesting core routers.
Failure Modes: Undersea Cuts, BGP Hijacks, and Route Leaks
Because the internet is a decentralized system spanning physical oceans and untrusted corporate entities, it encounters spectacular failure modes:
1. Undersea Cable Cuts
Roughly 100 to 150 submarine cable faults occur every year. Despite popular imagination, shark bites are virtually non-existent; nearly all cable cuts are caused by:
- Commercial fishing trawlers dragging heavy bottom-trawl nets across the ocean bed.
- Ship anchors accidentally dropped or dragged across cable routes during storms.
- Underwater earthquakes and submarine landslides (such as the 2006 Hengchun earthquake, which severed eight subsea cables south of Taiwan and paralyzed Asian financial communications).
When a cable snaps, automated monitoring equipment at the coastal landing station measures the electrical resistance and optical reflection time (Optical Time-Domain Reflectometry, or OTDR) to pinpoint the exact break down to the meter. Specialized cable repair ships navigate to the site, lower grappling hooks to retrieve the broken ends from the seabed, splice microscopic glass fibers in sterile cleanrooms onboard, and lower the armored cable back to the ocean floor.
2. BGP Route Hijacking and Route Leaks
Because BGP was designed in 1989 on a model of mutual trust between university and government operators, routers historically trusted any route announcement they received.
In a BGP Hijack, a rogue or misconfigured Autonomous System announces an IP prefix it does not own. If the rogue AS announces a more specific prefix (e.g., announcing /24 instead of a provider's /21), border routers worldwide obey the Longest Prefix Match rule and direct traffic to the wrong network:
- In 2008, Pakistan Telecom attempted to block YouTube domestically by announcing a bogus BGP route for YouTube's IP space. Within minutes, the announcement leaked to global upstream providers, blackholing YouTube traffic worldwide for two hours.
- In 2018, attackers used BGP hijacking against Amazon's Route 53 DNS servers to redirect traffic destined for cryptocurrency service MyEtherWallet to malicious phishing servers.
To eliminate this vulnerability, the industry is deploying RPKI (Resource Public Key Infrastructure)—a cryptographic framework where network owners publish digitally signed Route Origin Authorizations (ROAs), allowing routers to cryptographically discard illegitimate BGP announcements.
Why This Architecture Matters
The internet's survival over fifty years of exponential scaling is a triumph of a single design philosophy: The End-to-End Principle.
Formulated by Jerome Saltzer, David Reed, and David Clark in 1981, the End-to-End Principle states:
The network core should be dumb, simple, and stateless. Intelligence should live exclusively at the endpoints (the computers connected to the edges).
Because core internet routers only care about moving 1,500-byte envelopes as fast as possible without knowing or caring what is inside:
- When the World Wide Web was invented in 1989, the physical internet did not need to be redesigned.
- When voice calling moved to VoIP, the physical internet did not need to be redesigned.
- When 4K video streaming and autonomous AI agents emerged, the physical internet did not need to be redesigned.
The dumb, resilient glass lattice simply carries photons. The software on our screens provides the meaning.
To discover how domain names like google.com get translated into IP addresses and negotiated via cryptographic sockets in the first 200 milliseconds, read the companion explainer on What Happens When You Type a Website Address. You can also discover how interbank settlement relies on secure optical networks in How Money Moves Between Indian Banks or explore how contactless chips negotiate cryptographic sessions in How Credit Cards Actually Work.
To trace how individual data payloads are sliced into 1,500-byte MTUs, routed via BGP core tables, and pulsed across undersea fiber cables, explore the deep dive on How Packets Actually Travel Across the Internet. To discover how domain names like google.com get translated into IP addresses and negotiated via cryptographic sockets in the first 200 milliseconds, read the companion explainer on What Happens When You Type a Website Address. You can also discover how interbank settlement relies on secure optical networks in How Money Moves Between Indian Banks or explore how contactless chips negotiate cryptographic sessions in How Credit Cards Actually Work.
Where to Go From Here
Explore companion architectures or dive deeper into downstream mechanisms.
How Packets Actually Travel Across the Internet
When you click a link, what physical journey does a single digital packet take across copper wires, routing tables, and undersea fiber glass to cross the planet?
What Happens When You Type a Website Address
What actually happens behind the scenes from the moment you hit Enter on a URL to the moment the webpage appears on your screen?
Verified Specifications & Architectural References
This explainer is grounded in primary-source engineering specifications, regulatory circulars, and standard documentation.
RFC 791: Internet Protocol Specification
Foundational standard defining IPv4 packet framing, addressing, fragmentation, and header checksum verification.
RFC 4271: A Border Gateway Protocol 4 (BGP-4)
The core routing protocol specification enabling inter-autonomous system path vector exchange across the global internet.
RFC 9293: Transmission Control Protocol (TCP) Specification
Comprehensive standard governing connection state machines, sequence numbering, sliding window flow control, and acknowledgment reliability.
Recommendation ITU-T G.977: Characteristics of optically amplified submarine cable systems
International engineering standard governing erbium-doped optical repeaters, chromatic dispersion, and DWDM physical transmission over transoceanic distances.