How Do Data Packets Travel Across the Internet? | How It Works
On this page
What is the short answer?
Almost nothing crosses the internet in one piece. A message, a photo or a video call is cut into small blocks called packets, each with a header holding where it came from and where it is going. Every router on the way reads the destination, looks it up in its forwarding table and passes the packet one step closer; no router knows the whole route. The separately run networks of the internet tell one another which addresses they can reach, and software on the two end computers checks that every packet arrived, asks again for lost ones and puts them back in order.
Definition: A packet is a block of data with a header in front, telling each router where the packet came from, where it is going and how many more hops it may make.
Why does the internet send packets instead of holding a line open?
The old telephone network used circuit switching. Dialling reserved a path through the exchanges for the whole call, and that capacity stayed booked even during silences.
Packet switching shares every link instead. Packets from many users queue at each router and leave in turn, so a link carries whoever has data at that moment. If a link fails, the next packets can go another way.
Paul Baran at the RAND Corporation in the United States and Donald Davies at the National Physical Laboratory in the United Kingdom developed the idea independently in the 1960s, and Davies gave the packet its name.
The price is that nothing is guaranteed. The Internet Protocol (IP), the shared rule for addressing and forwarding, does not promise that packets arrive, or arrive in order. Full queues drop packets, and the end computers must repair the damage.
What does a packet carry besides the data?
The header is a short block of fixed fields: at least 20 bytes in IPv4 and a fixed 40 bytes in IPv6.
Table: The main fields in an IP packet header
| Field | What it does |
|---|---|
| Source and destination addresses | 32 bits each in IPv4, 128 bits each in IPv6. |
| Time to live (IPv4), hop limit (IPv6) | A counter every router lowers by one. At zero, the packet is discarded. |
| Protocol (IPv4), next header (IPv6) | Names the contents, such as TCP or UDP, so the receiver hands them to the right software. |
| Header checksum (IPv4 only) | Lets each router spot a damaged header. |
The time to live exists because a routing mistake can trap a packet in a loop between routers. The counter is 8 bits, so it starts no higher than 255; the value recommended in 1994 was 64.
How do IP addresses work, and why did IPv4 run out?
An IPv4 address is 32 bits, written as four numbers from 0 to 255, such as 192.0.2.10. That allows 4,294,967,296 addresses.
The Internet Assigned Numbers Authority (IANA) hands large blocks to five Regional Internet Registries, such as APNIC in Australia and the RIPE NCC in the Netherlands, which pass them on to providers. The free supply ran out in stages, for example:
- 3 February 2011. IANA gave its last five large blocks to the registries, one each.
- 15 April 2011. APNIC reached its final block and began rationing.
- 14 September 2012. The RIPE NCC began allocating from its last block.
- 24 September 2015. ARIN, the registry for Canada, the United States and parts of the Caribbean, ran out.
- 25 November 2019. The RIPE NCC ran out.
Network address translation stretched the supply. Devices in a home use private ranges first set aside in 1994 and confirmed in 1996, such as 192.168.0.0 to 192.168.255.255, and the router swaps in one shared public address on the way out.
The lasting fix is IPv6. Its 128-bit addresses, written like 2001:db8::1, allow about 340 trillion trillion trillion addresses.
How does a computer find the address behind a name?
Routers need numbers, but people type names. The Domain Name System (DNS) links them. To find www.example.org, a name reserved for examples, a device asks a recursive resolver, usually run by its provider or a public service.
With no saved answer, the resolver asks a root server, which points it to the servers for .org. A .org server points it to the authoritative servers for example.org, which return the address.
The root is 13 named authorities, A to M, run by 12 organisations, including Netnod in Sweden and the WIDE Project in Japan, on more than 2,000 servers around the world. Each answer says how many seconds it may be kept, so resolvers can reuse it instead of asking the root again.
What happens, step by step, as a packet crosses the internet?
- Look up the name. DNS turns it into an address.
- Build the packet. The device writes its own address as the source and the server's as the destination, and sets the time to live.
- Hand it to the first router. For any address off the local network, the device sends the packet to its default gateway, usually the home router.
- Find the longest match. Each router compares the destination with its forwarding table. A route for a narrow block of addresses beats one for a broad block.
- Lower the counter and forward. The router lowers the time to live by one, recomputes the IPv4 checksum and sends the packet on. At zero, it drops the packet and usually sends a "time exceeded" message back to the source.
- Cross between networks. The packet passes to other networks over paid transit links or at an internet exchange point, such as DE-CIX in Frankfurt, Germany. Between continents it rides undersea fibre-optic cables.
- Deliver. The server reads the protocol field and passes the contents to TCP or UDP.
Each packet is forwarded on its own, so after a link failure, or where routers spread traffic over several links, packets can arrive out of order.
How do networks tell each other which addresses they can reach?
The internet is a network of networks. Each independently run network, such as a provider, a university or a large company, is an autonomous system with its own number. On one day in May 2025, the global routing table held 83,739 of them.
Neighbours swap routes with the Border Gateway Protocol (BGP). A network announces the blocks it holds, such as 203.0.113.0/24, where /24 means the first 24 bits are fixed: 256 addresses. Each network passing the announcement on adds its number to the AS path.
A router that finds its own number in that path rejects the route, which prevents loops. Shorter paths usually win, but each network applies its own policy, so business deals can outweigh path length.
What happens when an announcement goes wrong?
The base protocol does not check that a network really holds the addresses it announces.
- Pakistan and YouTube, 24 February 2008. Pakistan Telecom, trying to block YouTube inside Pakistan, announced 208.65.153.0/24, a narrower block inside YouTube's 208.65.152.0/22. Its provider, PCCW Global, passed it on at 18:47 UTC. Routers prefer the longest match, so much of YouTube's traffic worldwide went to Pakistan. YouTube answered with even narrower announcements, and PCCW withdrew the false route at 21:01 UTC.
- Facebook, 4 October 2021. A maintenance command cut off Facebook's backbone. Its DNS servers, unable to reach the data centres, withdrew their BGP announcements, leaving no route to them. Facebook, Instagram and WhatsApp were unreachable from about 15:40 UTC until routes began to return at about 21:00 UTC.
Signed records in a system called RPKI now let networks check which network may announce a block.
How do TCP and UDP turn packets into something useful?
IP only moves packets. Two protocols on the end computers decide what they mean, and each packet carries a port number naming the program it belongs to.
The Transmission Control Protocol (TCP) gives a reliable stream. A three-way handshake opens it: the client sends SYN with a starting sequence number, the server answers SYN-ACK and the client replies ACK. Every byte is then numbered, so the receiver can reorder late packets.
The receiver's acknowledgements name the next byte it expects. If none arrives before a timer runs out, or three duplicate acknowledgements reveal a gap, the sender resends the missing data.
The User Datagram Protocol (UDP) adds only ports, a length and a checksum, in an 8-byte header, and promises neither delivery nor order. That suits a video call or an online game, which would rather skip a lost moment than wait.
DNS queries normally use UDP because one small packet each way is cheaper than opening a connection. QUIC, standardised in 2021 and used by HTTP/3, builds its own reliability and encryption on top of UDP.
How does this work with real numbers?
Both examples use illustrative numbers, and addresses from private ranges or ranges reserved for documentation, so they describe no real network. The methods are real.
How many packets does one photo need?
Take a photo of 1,500,000 bytes sent over Ethernet, where a packet holds at most 1,500 bytes. IPv4 and TCP headers take at least 20 bytes each, leaving at most 1,460 bytes of photo per packet. Then 1,500,000 ÷ 1,460 ≈ 1,027.4, so the photo needs at least 1,028 packets.
Table: The same illustrative photo over IPv4 and IPv6
| Per packet | IPv4 with TCP | IPv6 with TCP |
|---|---|---|
| Header bytes | 40 | 60 |
| Photo bytes | 1,460 | 1,440 |
| Packets needed, at least | 1,028 | 1,042 |
If one packet is lost, TCP resends the missing data, not the whole photo.
What does a traceroute show?
The tool traceroute sends a probe with a time to live of 1. The first router drops it and sends back "time exceeded", revealing its address. The next probe starts at 2, then 3, until the destination answers.
Table: An illustrative traceroute
| Hop | Address | Round trip | What it is |
|---|---|---|---|
| 1 | 192.168.1.1 | 2 ms | Home router (private address) |
| 2 | 203.0.113.1 | 9 ms | Provider's local router |
| 3 | 203.0.113.65 | 14 ms | Provider's core network |
| 4 | 198.51.100.7 | 31 ms | Link into another network |
| 5 | * * * | No reply | Router that ignores probes |
| 6 | 192.0.2.10 | 33 ms | Destination server |
The jump at hop 4 suggests a long stretch of fibre. Stars usually mean only that a router did not reply, not that packets were lost.
Where can the student go deeper in World 101?
This page follows one packet. The World 101 subject Networks and the Internet covers the wider field, from who runs and governs the internet to the careers it offers.
Three related subjects go further. Cybersecurity covers how networks, routing included, are attacked and defended. Cryptography and Digital Security explains how encryption hides what packets carry while their headers stay readable. Internet Censorship looks at how governments block sites, the aim behind the 2008 YouTube case.
Two Resources pages, How the Internet Travels Under the Sea: Submarine Cables and Satellite Internet, follow the physical links, glass fibre and radio, that packets ride on.
Sources
The standards, records and reports behind this page:
- RFC 791, Internet Protocol (IPv4), September 1981.
- RFC 8200, IPv6 Specification, July 2017.
- RFC 9293, Transmission Control Protocol, August 2022; RFC 6298, TCP retransmission timer, June 2011; RFC 5681, TCP congestion control, September 2009.
- RFC 768, User Datagram Protocol, 28 August 1980; RFC 3550, RTP over UDP, July 2003; RFC 9000, QUIC, May 2021; RFC 9114, HTTP/3, June 2022.
- RFC 1034 and RFC 1035, Domain Names, November 1987; IANA, Root Servers list, and root-servers.org (2,048 instances), both read 7 November 2026.
- RFC 4271, Border Gateway Protocol 4, January 2006; RFC 6480, RPKI, February 2012.
- G. Huston, "A Day in the Life of BGP", The ISP Column, June 2025: the routing table of 8 May 2025.
- RFC 792, ICMP time exceeded, September 1981; RFC 894, IP over Ethernet, April 1984; RFC 1700, Assigned Numbers (default time to live), October 1994.
- RFC 1597, private addresses, March 1994, replaced by RFC 1918, February 1996; RFC 3022, network address translation, January 2001.
- RFC 5737, January 2010, and RFC 3849 (2001:DB8::/32), July 2004: documentation addresses; RFC 2606, June 1999: example.org.
- Number Resource Organization, "Free Pool of IPv4 Address Space Depleted", 3 February 2011.
- APNIC, "APNIC IPv4 Address Pool Reaches Final /8", 15 April 2011; ARIN, "ARIN IPv4 Free Pool Reaches Zero", 24 September 2015.
- RIPE NCC, "RIPE NCC Begins to Allocate IPv4 Address Space From the Last /8", 14 September 2012, and "The RIPE NCC has run out of IPv4 Addresses", 25 November 2019.
- RIPE NCC, "YouTube Hijacking: A RIPE NCC RIS case study", 17 March 2008.
- S. Janardhan, "More details about the October 4 outage", Engineering at Meta, 5 October 2021; Cloudflare, "Understanding How Facebook Disappeared from the Internet", 4 October 2021.
- P. Baran, "On Distributed Communications", RAND, August 1964; D. W. Davies, "Proposal for a Digital Communication Network", National Physical Laboratory, June 1966.
Common errors and misconceptions
- Misconception: The internet is one network run by one company or government. Correct: It is more than 83,000 separately run networks that agree to exchange traffic using shared protocols.
- Misconception: All the packets of a message follow one fixed path. Correct: Each packet is forwarded on its own; some can take other routes and arrive out of order, and TCP reorders them.
- Misconception: UDP is a broken version of TCP. Correct: UDP is chosen on purpose where speed matters more than resending, as in video calls, games and DNS lookups.
- Misconception: An IP address identifies one person. Correct: Many devices can share one public IPv4 address through network address translation; an address marks a point on a network, not a person.
Key takeaways
- Data crosses the internet as packets, each with a header holding its source, destination and time to live.
- Routers forward each packet one hop at a time, choosing the longest matching entry in their forwarding tables.
- IANA's free IPv4 pool ran out in 2011 and the regional registries followed in stages; IPv6, with 128-bit addresses, is the lasting fix.
- DNS turns names into addresses through resolvers, root servers and authoritative servers, saving answers along the way.
- Independent networks announce their address blocks with BGP, which trusts what it is told unless routes are checked.
- TCP adds a handshake, numbered bytes, acknowledgements and resending; UDP skips them when speed matters more.
Test yourself
Why does every IP packet carry a time to live or hop limit?
So that a packet caught in a routing loop is discarded after a bounded number of hops instead of circling forever.
How does a router choose where to send a packet next?
It matches the destination against its forwarding table, picks the longest matching entry and sends the packet out of that link.
Why did YouTube traffic go to Pakistan on 24 February 2008?
Pakistan Telecom announced a narrower block inside YouTube's addresses, and routers prefer the longest match, so they followed the false route.
What happens in TCP's three-way handshake?
The client sends SYN with a starting sequence number, the server replies SYN-ACK, and the client confirms with ACK.
Go deeper in World 101: Networks & the Internet
Write about it
Turn a question from this chapter into a paper.
The Writing Studio has a structure guide, a rubric and citation tools for 15 formats, from essays to research papers. A free account keeps up to five drafts. Learnacy Essential adds feedback from an AI writing coach and submission to The OYI Review.
Publication depends on review and is not guaranteed.
