Urgent.News

600+ sources. One page. See who else covered it.

Editions

Tech

OSI Model - The Internet Is Just Envelopes Thrown Away at Every Router

The wrong mental model For a long time I pictured a packet as a thing. A little sealed capsule that leaves my laptop, hops from router to router, and arrives at a server on the other side of the planet — the same object the whole way, like a parcel with my address on it. That picture is wrong. Not slightly wrong. Structurally wrong. Start at the top When my browser sends an HTTP request, that…

The wrong mental model: Many people envision a packet as a sealed capsule that travels unchanged from one router to another, arriving at its destination. This is incorrect. The layers below the application layer, such as transport (TCP) and network (IP), are responsible for moving the data and wrapping it in their own headers. Data link (Ethernet, Wi-Fi) further wraps the data in frames containing destination and source MAC addresses and checksums.

Descend into the layers: The destination IP address on a packet remains constant throughout its journey, even though the packet passes through multiple routers. The frame around the packet, on the other hand, is only addressed to the next router's MAC address, knowing only about the immediate device on the wire. Each router receives the frame, strips it off, and discards it.

It then reads the packet inside, decides where to send it next, decrements the TTL, and builds a new frame addressed to the next hop's MAC. This process occurs at every single router, often dozens of times.

Frame born, frame dead: The packet goes through numerous frames, each of which is discarded upon arrival at its destination. Each wire gets its own envelope, and the packet is born and dead multiple times as it traverses the internet.

A single NAT exception: Although the IP addresses remain constant throughout the journey, with one exception. My home router performs Network Address Translation (NAT), replacing my private source IP address (192.168.x.x) with the public address assigned by my ISP. It also rewrites the source port and recomputes the TCP checksum, as the original checksum covers the private IPs. After this single rewrite, the addressing becomes fixed for the rest of the packet's journey.

The click: The packet, in reality, doesn't travel. It's merely a pattern—a description of the packet that gets re-serialized into a fresh frame at every hop. At each step, signals travel along wires, and frames are shredded upon arrival, only to be rebuilt anew. The HTTP request sent across the ocean doesn't traverse the physical distance; it gets reconstructed hop by hop, often thirty times over, and the destination receives the same request because each router faithfully copies the layers above the frame into the next envelope.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

More from Friday 14 August →