What Is a Packet? How Data Travels Across the Internet
See what a packet contains, why data is split up, how routers move it and what loss, delay and reordering mean for the apps you use.
Key takeaways
- A packet is a header plus a payload, and each router uses the header to decide where to send it next.
- Splitting data into packets lets many conversations share the same links at once.
- IP does not promise delivery or order, so protocols such as TCP detect gaps and repair them.
- Packet size is limited by each link, and common Ethernet carries up to 1,500 bytes of IP packet at a time.
A packet is a small, self-describing chunk of data. It has a header that says where it came from, where it is going and how to handle it, followed by a payload, which is a slice of whatever you're sending. A photo, a web page or a minute of conversation is cut into many packets, sent across shared links and put back together at the far end.
That one idea explains a lot: why a download can slow down when the household is busy, why a call can sound choppy while a file transfer finishes perfectly, and why the internet keeps working when individual links fail.
Why split data at all
Picture a single cable shared by a household. If one 2-gigabyte download had to go as one unbroken block, nobody else could send anything until it finished. Cutting everything into small pieces lets the link take turns, so a chat message can slip between two slices of that download.
Small pieces are also cheaper to recover. If one packet is damaged, only that packet needs to be sent again, not the whole file. And because each packet carries its own addressing, the network can send later packets a different way if a link goes down.
The older alternative, circuit switching, reserved a path through the network for the length of a call, as the traditional telephone system did. A reserved circuit gives predictable quality but wastes capacity whenever nobody is talking. Packet switching trades some predictability for far better sharing.
What's inside a packet
On a typical home connection, your data gets wrapped several times. The application produces content, the transport layer adds a header, IP adds another and the link layer (Ethernet or Wi-Fi) puts a frame around the whole thing. This wrapping is called encapsulation.
Some typical header sizes are fixed by the standards. A basic IPv4 header is 20 bytes, the IPv6 header is 40 bytes, a basic TCP header is 20 bytes and a UDP header is 8 bytes. Options can make some of them longer.
The Ethernet header only matters for one link. At each router, that outer wrapping is removed and a new one is added for the next link, while the IP addresses inside stay the same (home routers doing address translation are the common exception).
The size limit: MTU
Every link has a maximum transmission unit (MTU), the largest packet it will carry in one piece. For standard Ethernet it is 1,500 bytes. Some connections use less, because they add their own wrapping; PPPoE, used by some DSL and fiber providers, commonly leaves 1,492, and VPN tunnels reduce it further.
With a 1,500-byte MTU, IPv4 and TCP basic headers leave up to 1,460 bytes of data per packet. So a 1,000,000-byte file needs at least 685 full-sized packets, before counting acknowledgments, encryption overhead or options.
If a packet is too big for a link, IPv4 routers can fragment it unless the sender forbids that. IPv6 routers never fragment; they send back a "packet too big" message, and the sender adjusts. When firewalls block those messages, you can get a strange failure where small pages load and large transfers stall. MTU, MSS and fragmentation explains the fix, and the MTU and payload planner does the arithmetic.
How a packet crosses the network
Your device first asks whether the destination is on the local network. If it isn't, the packet goes to the default gateway, normally your router. From there each router repeats the same short routine:
- Check the frame and strip the link wrapping.
- Read the destination IP address.
- Find the most specific matching route in its table.
- Reduce the hop counter, called TTL in IPv4 and hop limit in IPv6, and drop the packet if it reaches zero.
- Wrap the packet for the next link and queue it for sending.
The hop counter is a safety net. If a configuration mistake sends packets in a circle, they expire instead of circulating forever. Traceroute exploits this behavior on purpose, sending packets with small counters so that each router along the way reports back.
Loss, delay, jitter and reordering
Because the network makes only a best effort, packets can misbehave in four ordinary ways.
| Problem | What causes it | What you notice |
|---|---|---|
| Loss | Full queues, radio interference, faulty cables | Slow transfers, gaps in audio |
| Delay | Distance, queuing, slow links | Sluggish response, people talking over each other |
| Jitter | Delay that varies from packet to packet | Choppy voice, stuttering video |
| Reordering | Packets taking different paths or queues | Usually hidden, occasionally slows transfers |
Loss is not always a sign of something broken. TCP has traditionally used it as a signal that a link is full and it should slow down. Persistent loss on an idle connection, though, points to a real fault: weak Wi-Fi, a damaged cable or a problem on the provider's side. The measurements are explained in ping, jitter and packet loss.
TCP, UDP and who fixes problems
TCP gives applications a reliable stream. It numbers data, waits for acknowledgments, retransmits what's missing, puts everything in order and paces itself according to network conditions. Web pages, downloads and email rely on that.
UDP adds little more than port numbers and a checksum. If something is lost, UDP does nothing about it. That suits live audio, many games and DNS queries, where a fresh packet or a quick retry by the application is better than waiting. QUIC, which carries HTTP/3, is built on UDP and handles reliability and encryption itself. See TCP versus UDP.
Ports decide which program gets the payload. Your computer might receive packets for a browser, a music app and a backup tool at the same moment, and the port numbers keep them apart.
Queues: where packets wait
A router can send only so fast. When packets arrive for a link faster than it can transmit them, they wait in a queue. A short queue absorbs bursts. A long one that stays full adds delay to everything behind it, a problem known as bufferbloat. It explains why a video call can fall apart the moment someone in the house starts a big upload, even though nothing is technically broken.
Better queue management helps. Some routers offer smart queue management or quality of service settings that keep queues short and share the link fairly between conversations. Menu names vary a lot between makers. Bufferbloat shows how to test for it.
Packets also carry a few bits that let networks mark priority or report congestion. Explicit Congestion Notification lets a router flag a packet instead of dropping it, so the sender can slow down without losing data. It only works when both ends and the router in between support it.
A worked example: sending a photo
Say you upload a 3-megabyte photo over a connection with a 1,500-byte MTU. With about 1,460 bytes of data in each packet, the photo needs a little over 2,000 packets. Your device doesn't send them all at once. TCP starts cautiously, sends a small group, and as acknowledgments return it sends progressively larger groups until it nears the capacity of the slowest link.
If one packet in the middle is lost, the rest still arrive. The receiver notes the gap, the sender repeats the missing piece and the sender reduces its rate for a while. The server hands the application a complete file only when every byte is present and in order. From your side, the progress bar simply paused for a moment.
Looking at packets yourself
You can learn a lot with built-in tools. ping example.com sends small test packets and reports round-trip time and loss (on macOS and Linux, add -c 10 to stop after ten; Windows sends four by default). To check whether larger packets pass without fragmentation, Windows uses ping -f -l 1472 example.com, and Linux uses ping -M do -s 1472 example.com. The 1,472 bytes of data plus 28 bytes of IP and ICMP headers make 1,500.
For a closer view, a packet analyzer such as Wireshark can show each header field on your own machine. Capture only on networks and devices you own or are authorized to examine, because captures can contain other people's private information. A beginner's guide to packet capture walks through a safe first session.
Common questions
Do all packets of one file take the same route?
Routers often keep the packets of one conversation on one path to avoid reordering, but nothing requires it. Routes can change in the middle of a transfer.
Can someone read my packets on the way?
Equipment on the path can see the headers it needs for delivery. If the payload is encrypted with TLS, QUIC or a VPN, its contents are protected from those intermediaries, although addresses, sizes and timing still reveal something.
Is a frame the same as a packet?
In careful usage, a frame belongs to the link layer (Ethernet, Wi-Fi) and a packet belongs to IP. The transport pieces are called segments (TCP) or datagrams (UDP). In casual talk, "packet" often covers all of them.