Packet Definition

A packet is the fundamental unit of information transport in all modern computer networks, and increasingly in other communications networks as well.

Packets are transmitted over packet switched networks, which are networks in which each message (i.e., data that is transmitted), such as an e-mail, web page or program download, is cut up into a set small segments prior to transmission. Each packet is then sent individually and can follow the same route or a different route to the common destination. Once all the packets forming a message have arrived at the destination, they are automatically reassembled to recreate the original message.

This contrasts with circuit switched networks, in which a dedicated circuit is established for the duration of the transmission of each message or conversation. By far the largest circuit switched network is the ordinary telephone system, which is often referred to as POTS (plain old telephone system).

Packets can be a fixed size, such as 1,000 or 1,500 bytes, or variable sizes, depending on the system. Regardless of its size, each packet consists of three main parts: a header, a payload and a trailer.

One of the key features of packets is that each one contains a header that consists of instructions regarding its data. These instructions include the sender's IP address, the intended receiver's IP address, the number of packets into which the message has been divided, the identification number of the particular packet, the packet length (on networks that have variable length packets) and synchronization data (several bits that help the packet match up to the network). The protocol (included in headers on networks that carry multiple types of information, such as the Internet) defines what type of packet is being transmitted (e.g., e-mail, web page, audio or streaming video).

The payload, also called the body or data area, is the actual data (i.e., part of the message) that the packet is delivering to the destination. If the particular protocol calls for fixed-length packets, then the payload will be padded with extra bytes, if necessary, to make it the standard size.

The trailer, sometimes called the footer, contains several bits that tell the receiving device that it has reached the end of the packet. It may also include some type of error checking.

The most common type of error checking for packets is cyclic redundancy check (CRC), which adds together all the ones in the payload and stores the result as a hexadecimal (i.e., base 16) value in the trailer. The receiving device recounts the number of ones in the payload and compares the result to the value stored in the trailer. If the values match, the packet is accepted; if they do not match, the receiving device sends a request to the originating device to retransmit the packet.

Each packet is sent off to its destination by the best available route, and that route might be different for different packets. This makes the network more efficient because it can balance the load across various pieces of equipment on a millisecond-by-millisecond basis. Moreover, if a network equipment failure occurs (such as a malfunctioning router or a cut in an optical fiber cable) while a message is being transmitted, packets can be automatically routed around the problem, thereby ensuring delivery of the complete message.

A router is a device that connects at least two networks and transfers packets among them according to the information in the packet headers and in forwarding tables, which it creates and/or maintains. Routers use protocols such as ICMP (Internet control message protocol) to communicate with each other and to configure the most efficient routes between any two computers or other devices on the network.

Some network designs do not provide automatic protection against the loss, duplication or misdelivery of packets. However, it is possible to add a transport layer protocol on top of the packet service that can provide such protection. The most common example of such a protocol is TCP (transmission control protocol), which is fundamental to the Internet and most other modern networks.

Created September 14, 2005. Updated January 8, 2006.
Copyright © 2005 - 2006 The Linux Information Project. All Rights Reserved.