Packets and Protocols on a Network
Network data travels in packets carrying data and delivery information. Packets can be lost, damaged, duplicated or received out of order. Protocols define communication rules. TCP provides reliable ordered transport; UDP does not provide built-in retries or message ordering.
What a learner can do afterwards
- Explain why data is sent in packets, and what a packet carries besides the data
- Describe what happens when a packet is lost or arrives out of order
- Say what a protocol is, and what two named ones are for
1 · Read
You have learned that network delivery uses IP addresses. Large transfers can be divided into packets. An IP packet contains data and a header with delivery information, including source and destination addresses. Smaller packets let traffic from other users travel between a transfer's packets. Packets may follow the same route or different routes.
Packets can be lost, damaged, duplicated or received out of order. Sending order need not match arrival order. Missing data can sometimes leave unclear blocks or frozen images in compressed video. Those symptoms alone do not prove packet loss; other problems can affect a call.
TCP provides a reliable, ordered stream of bytes over IP. Sequence numbers identify byte positions, not packet counts. Acknowledgements report received data. TCP can hold later data while waiting for earlier bytes. If it expects byte 100 but receives data starting at 140, some earlier data is still missing. That data may be late rather than lost.
When unacknowledged data reaches its retransmission timeout, TCP sends the data again. The original data or its acknowledgement may have been delayed or lost. Repeated failure can end the connection; TCP cannot make every transfer succeed through an outage.
A protocol is an agreed set of communication rules. IP defines addressing and packet delivery. TCP adds reliable ordered transport. HTTP defines web requests and responses. Protocols can work together while doing different jobs. Published standards help different makers build compatible software, but joining a network can still require permission.
UDP is another transport protocol. Its checksum can detect damaged data, but UDP has no built-in retries or message ordering. An application can add recovery rules. TCP suits complete, ordered transfers such as email. Some live games use UDP for frequent updates when a new update matters more than a missing old one. UDP is not always faster.
Packets carry data and delivery information. TCP tracks byte positions and retries unacknowledged data. UDP leaves retries and ordering to applications.
The lesson, questions, worked solutions and flashcards about packets and communication protocols were written for this dataset.
Three readings and six flashcards were written for this dataset. The video reference is Khan Academy's "Packets, routers, and reliability". Video license terms have not been verified.
More to read
Delivery can change the order
An IP packet contains data and addressing information. Packets from a transfer may follow the same route or different routes. Dividing transfers into packets allows traffic from several users to share links; it does not guarantee fair sharing.
During delivery, packets can be lost, damaged, duplicated or reordered. Applications need rules for handling these possibilities. A file may need every byte to finish. A live conversation may continue using newer data while some old data is missing.
Unclear or frozen video is a clue, not a diagnosis. Network delivery, encoding and other application problems can affect the picture.
Tracking bytes with TCP
TCP gives an application an ordered stream of bytes. Sequence numbers locate data within that stream; they do not count packets. Acknowledgements report received data.
Suppose the receiver has every byte through 199 and no later bytes. Data for bytes 240-259 arrives next. Bytes 200-239 are still missing under those conditions. They may arrive later or need retransmission. If the receiver had already buffered some later bytes, the missing range could be smaller.
A retransmission timeout lets the sender retry unacknowledged data. The data or acknowledgement may have been lost or delayed. If communication cannot recover, the connection can fail.
Protocol jobs and application needs
IP specifies addressing and packet delivery. TCP adds reliable ordered byte transport. UDP does not supply built-in retransmission or message ordering. Its checksum can detect damaged data, and applications can add their own recovery rules.
HTTP defines web requests and responses. It can use different underlying transports; not every web transfer uses TCP. Published standards support compatible implementations without granting access to every network.
Choose transport behaviour to fit the task. A document transfer needs complete data. For frequent live updates, a fresh update may be more useful than retrying an old one. UDP does not promise faster delivery in every situation.
Explore more
2 · Watch
به انگلیسیTake it off screen
Where it sits
8 questions wait behind this lesson, each with its answer explained. Every answer feeds the sky: stars light as they are learned, and dim when it is time to come back.