At first, one might assume that data is sent as a continuous stream of ones and zeros from one computer to another. In fact, data is broken down into small, manageable packets, each wrapped with the essential information needed to get it from its source to the correct destination. This lesson introduces the concept of packets as the basic building blocks of network data communications.
After this lesson, you will be able to:
- Define the term "packet," including its function and components.
- Describe the contents and function of each packet component: header, data, and trailer.
Estimated lesson time: 30 minutes
Data usually exists as rather large files. However, networks cannot operate if computers put large amounts of data on the cable at the same time. As you see in Figure 3.5, a computer sending large amounts of data causes other computers to wait (increasing the frustration of the other users) while the data is being moved. This is not called "sharing"; it is called "monopolizing the network." There are two reasons why putting large chunks of data on the cable at one time slows down the network:
These effects are minimized when the large data units are reformatted into smaller packages for better management of error correction in transmission. This way, only a small section of data is affected, and, therefore, only a small amount of data must be retransmitted, making it relatively easy to recover from the error.
Figure 3.5 Large continuous streams of data slow down the network
In order for many users at once to transmit data quickly and easily across the network, the data must be broken into small, manageable chunks. This way, users each get their share of access to the network. These chunks are called packets, or frames. Although the terms "packet" and "frame" are often used interchangeably, there are some differences based on the type of network. This lesson uses the term "packet," meaning "a unit of information transmitted as a whole from one device to another on a network."
"Device" is a generic term for a computer subsystem. Printers, serial ports, and disk drives are often referred to as devices; such subsystems frequently require their own controlling software, called device drivers. Packets are the basic units of network communication. Figure 3.6 shows data that is being broken into packets. With data divided into packets, individual transmissions are speeded up so that every computer on the network has more opportunities to transmit and receive data. At the target (receiving) computer, the packets are collected and reassembled in the order of the original data.
Figure 3.6 Breaking data into packets
When the network operating system at the sending computer breaks the data into packets, it adds special control information to each frame. This makes it possible to:
Packets can contain several types of data including:
All packets have certain components in common. These include:
Figure 3.7 shows these packet components grouped into three sections: header, data, and trailer.
Figure 3.7 Packet components
The header includes:
This describes the actual data being sent. This part of the packet varies in size, depending on the network. The data section on most networks varies from 512 bytes—or 0.5 kilobytes (KB)—to 4 KB.
Because most original data strings are much longer than 4k, data must be broken into chunks small enough to be put into packets. It takes many packets to complete the transmission of a large file.
The exact content of the trailer varies depending on the communication method, or protocol. However, the trailer usually contains an error-checking component called a cyclical redundancy check (CRC). The CRC is a number produced by a mathematical calculation on the packet at its source. When the packet arrives at its destination, the calculation is made again. If the results of both calculations are the same, this indicates that the data in the packet has remained stable. If the calculation at the destination differs from the calculation at the source, this means the data has changed during the transmission. In that case, the CRC routine signals the source computer to retransmit the data.
A protocol is a set of rules or standards designed to enable computers to connect with one another and to exchange information with as little error as possible.
Different networks have differing formats for the packets and allow different-sized packets. The packet-size limits determine how many packets the network operating system can create from one large piece of data.
The following example illustrates, step-by-step, how packets are used in network communications.
A large print job must be sent from a computer to a print server.
Figure 3.8 Establishing a connection with a print server
Figure 3.9 Creating packets
Figure 3.10 Examining the receiver's address
Figure 3.11 Network interface card (NIC) accepts packets addressed to the print server
Figure 3.12 Reassembled packets sent to the printer
The following points summarize the main elements of this lesson: