Nepedia
Back to Discover
Advanced Reader
💻

Network packet

technology Maturity 9-11 Next article →

A network packet is a formatted unit of data used in telecommunications and computer networking. These units move through packet-switched networks to transport information between devices. In a packet-switched network, the bandwidth of the transmission medium is shared among many different communication sessions. This is a major difference from circuit switching. In circuit switching, specific circuits are preallocated for the entire duration of one session.

This sharing makes packet-switched networks highly efficient for modern digital communication.

Every packet is structured with specific components to ensure it reaches its destination. A packet consists of control information and user data, which is called the payload. The control information provides the necessary instructions for delivering the payload. This information is typically found in packet headers and trailers. You can think of the header as a postal envelope. The payload is the actual content inside that envelope. The trailer acts like a signature at the bottom of a letter.

Detailed architecture allows packets to perform essential functions like error detection and addressing. To route a packet, the system requires two specific network addresses. One is the source address of the sending host. The other is the destination address of the receiving host. Packets also use error detection to ensure data remains accurate during transmission. This is often done using a checksum, parity bits, or cyclic redundancy checks. At the transmitter, a calculation is performed before the packet is sent. The receiver then recalculates this value and compares it to the one in the packet. If the numbers do not match, the packet may be corrected or discarded.

Networks also manage the lifespan of a packet to prevent congestion. If a packet enters a closed circuit, it could circulate indefinitely. This would cause a build-up of packets that could crash the network. To prevent this, packets use a field called Time to Live, or TTL. The TTL value decreases by one every time a packet completes a network hop. A hop is a single movement through a network device. If the TTL reaches zero, the packet is discarded because routing has failed.

Interestingly, Ethernet packets do not have a TTL field. This means they can be subject to broadcast storms if a switching loop occurs.

Different communication protocols use different rules for framing and formatting. In the seven-layer OSI model, the term "packet" specifically refers to a protocol data unit at layer 3, known as the network layer. At layer 2, the data link layer, these units are called frames. At layer 4, the transport layer, they are called segments or datagrams.

For example, in a TCP/IP system over Ethernet, a TCP segment is carried inside an IP packet. That IP packet is then carried inside an Ethernet frame. Protocols like the Point-to-Point Protocol use 8-bit bytes and special characters to mark the start and end of elements. Other protocols, such as Ethernet, use the specific location of data to identify the header.

Packets can also be managed based on their importance or type. Some networks implement a quality of service to prioritize certain packets. This uses a priority field to decide which queue a packet enters. In times of network congestion, high-priority queues are emptied much faster than lower-priority ones. Additionally, a protocol identifier field allows a network to carry many different types of communication protocols at once. This field tells the protocol stack exactly how to process the incoming data.

We see these principles applied in many complex real-world systems. The Internet Protocol (IP) uses packets composed of a header and a payload. While an IP packet has no trailer, it is often carried as a payload inside an Ethernet frame.

In deep space, NASA uses the CCSDS standard for packet telemetry. This allows spacecraft instruments to send images and data across massive distances. Video technology also relies on packets. The MPEG-2 standard uses a Packetized Elementary Stream to divide video and audio into manageable pieces. These are then encapsulated into transport stream packets for broadcasting.

676 words

Where will your curiosity go next?

Keep exploring at your chosen reading level.

More to explore

🪜 Step back

Simpler topics to build understanding

What is Nepedia?

A free, ad-free encyclopedia for children. Every article is written at five reading levels, so the same page works for a five-year-old and a fifteen-year-old — use the level switcher above to see this one change. No account needed to read.