9.2 Packets
A computer transmits data over a network in small chunks called packets, which consist of two parts: a header and a payload. The header contains identifying information such as the source and destination host machines and p. 225 the basic protocol. The payload, on the other hand, is the actual application data that the computer wants to send (for example, HTML or image data).
A host can send, receive, and process packets in any order, regardless of where they came from or where they’re going, which makes it possible for several hosts to communicate “simultaneously.” For example, if a host needs to transmit data to two others at once, it can alternate between the destinations in outgoing packets. Breaking messages into smaller units also makes it easier to detect and compensate for errors in transmission.
For the most part, you don’t have to worry about translating between packets and the data that your application uses, because the operating system does this for you. However, it is helpful to know the role of packets in the network layers that you’re about to see.