1 of 4

Your RightSignal

How the internet works · 1 of 101 / 3

Packets and IP

The concept

Why a 5 MB photo crosses the internet as thousands of tiny pieces

The internet never sends a file in one go. It cuts it into packets: chunks of at most about 1,500 bytes, each with an address label called the IP header (IP, the Internet Protocol, is the rulebook all connected devices follow).

A 5 MB photo becomes about 3,400 packets. Each header holds the source and destination IP addresses and a TTL (time to live): a counter cut by one at every router. At zero the packet is dropped, so it can't loop forever.

IP is best effort. Packets can be dropped, duplicated or arrive out of order, and IP itself doesn't fix that. It only promises to try to deliver each packet to its address.

What it’s forWorks out how many packets a file is split into.

n = ⌈S ÷ (MTU − H)⌉

S
size of the data to send, in bytes
MTU
the largest packet a link carries, typically 1,500 bytes on Ethernet and Wi-Fi
H
header size, 20 bytes for a basic IPv4 header
⌈ ⌉
round up, since a leftover scrap still needs its own packet

What it givesThe number of packets, each with its own copy of the address header.

  1. S = 3,000 bytes, MTU − H = 1,500 − 20 = 1,480
  2. 3,000 ÷ 1,480 ≈ 2.03, rounded up → 3 packets
  3. They carry 1,480 + 1,480 + 40 bytes of data