Network packet

A network packet is a formatted unit of data carried by a packet-switched network. Computer communications links that do not support packets, such as traditional point-to-point telecommunications links, simply transmit data as a bit stream. When data is formatted into packets, packet switching is possible and the bandwidth of the communication medium can be better shared among users than with circuit switching.

A packet consists of control information and user data, which is also known as the payload. Control information provides data for delivering the payload, for example: source and destination network addresses, error detection codes, and sequencing information. Typically, control information is found in packet headers and trailers.


In the seven-layer OSI model of computer networking, packet strictly refers to a data unit at layer 3, the Network Layer. The correct term for a data unit at Layer 2, the Data Link Layer, is a frame, and at Layer 4, the Transport Layer, the correct term is a segment or datagram. For the case of TCP/IP communication over Ethernet, a TCP segment is carried in one or more IP packets, which are each carried in one or more Ethernet frames.

Packet framing

Different communications protocols use different conventions for distinguishing between the elements and for formatting the data. For example, in Point-to-Point Protocol, the packet is formatted in 8-bit bytes, and special characters are used to delimit the different elements. Other protocols like Ethernet, establish the start of the header and data elements by their location relative to the start of the packet. Some protocols format the information at a bit level instead of a byte level.

A good analogy is to consider a packet to be like a letter: the header is like the envelope, and the data area is whatever the person puts inside the envelope.[1]

A network design can achieve two major results by using packets: error detection and multiple host addressing. A packet has the following components.


The routing of network packets requires two network addresses, the source address of the sending host, and the destination address of the receiving host.

Error detection and correction

Error detection and correction is performed at various layers in the protocol stack. Network packets may contain a checksum, parity bits or cyclic redundancy checks to detect errors that occur during transmission.

At the transmitter, the calculation is performed before the packet is sent. When received at the destination, the checksum is recalculated, and compared with the one in the packet. If discrepancies are found, the packet may be corrected or discarded. Any packet loss is dealt with by the network protocol.

In some cases modifications of the network packet may be necessary while routing, in which cases checksums are recalculated.

Hop counts

Under fault conditions packets can end up traversing a closed circuit. If nothing was done, eventually the number of packets circulating would build up until the network was congested to the point of failure. A time to live is a field that is decreased by one each time a packet goes through a network node. If the field reaches zero, routing has failed, and the packet is discarded.

Ethernet packets have no time-to-live field and so are subject to broadcast radiation in the presence of a switch loop.


There may be a field to identify the overall packet length. However, in some types of networks, the length is implied by the duration of transmission.


Some networks implement quality of service which can prioritize some types of packets above others. This field indicates which packet queue should be used; a high priority queue is emptied more quickly than lower priority queues at points in the network where congestion is occurring.


In general, payload is the data that is carried on behalf of an application. It is usually of variable length, up to a maximum that is set by the network protocol and sometimes the equipment on the route. Some networks can break a larger packet into smaller packets when necessary.

Example: IP packets

IP packets are composed of a header and payload. The IPv4 packet header consists of:[2]

00 01 02 03 04 05 06 07 08 09 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 (bit position)
Version IHL QoS Length  
ID   0  DF MF Fragment Offset  
TTL Protocol Checksum  
Source IP  
Destination IP  
  1. 4 bits that contain the version, that specifies if it's an IPv4 or IPv6 packet,
  2. 4 bits that contain the Internet Header Length, which is the length of the header in multiples of 4 bytes (e.g., 5 means 20 bytes).
  3. 8 bits that contain the Type of Service, also referred to as Quality of Service (QoS), which describes what priority the packet should have,
  4. 16 bits that contain the length of the packet in bytes,
  5. 16 bits that contain an identification tag to help reconstruct the packet from several fragments,
  6. 3 bits. The first contains a zero, followed by a flag that says whether the packet is allowed to be fragmented or not (DF: Don't fragment), and a flag to state whether more fragments of a packet follow (MF: More Fragments)
  7. 13 bits that contain the fragment offset, a field to identify position of fragment within original packet
  8. 8 bits that contain the Time to live (TTL), which is the number of hops (router, computer or device along a network) the packet is allowed to pass before it dies (for example, a packet with a TTL of 16 will be allowed to go across 16 routers to get to its destination before it is discarded),
  9. 8 bits that contain the protocol (TCP, UDP, ICMP, etc.)
  10. 16 bits that contain the Header Checksum, a number used in error detection,
  11. 32 bits that contain the source IP address,
  12. 32 bits that contain the destination address.

After those 160 bits, optional flags can be added of varied length, which can change based on the protocol used, then the data that packet carries is added. An IP packet has no trailer. However, an IP packet is often carried as the payload inside an Ethernet frame, which has its own header and trailer.

Many networks do not provide guarantees of delivery, nonduplication of packets, or in-order delivery of packets, e.g., the UDP protocol of the Internet. However, it is possible to layer a transport protocol on top of the packet service that can provide such protection; TCP and UDP are the best examples of layer 4, the Transport Layer, of the seven layered OSI model.

Example: the NASA Deep Space Network

The Consultative Committee for Space Data Systems (CCSDS) packet telemetry standard defines the protocol used for the transmission of spacecraft instrument data over the deep-space channel. Under this standard, an image or other data sent from a spacecraft instrument is transmitted using one or more packets.

CCSDS packet definition

A packet is a block of data with length that can vary between successive packets, ranging from 7 to 65,542 bytes, including the packet header.

Because packet lengths are variable but frame lengths are fixed, packet boundaries usually do not coincide with frame boundaries.

Telecom processing notes

Data in a frame is typically protected from channel errors by error-correcting codes.

Handling data loss

Deleted undecodable whole frames are the principal type of data loss that affects compressed data sets. In general, there would be little to gain from attempting to use compressed data from a frame marked as undecodable.

Thus, frames with detected errors would be essentially unusable even if they were not deleted by the frame processor.

This data loss can be compensated for with the following mechanisms.

Example: Radio and TV broadcasting

MPEG packetized stream

Packetized Elementary Stream (PES) is a specification defined by the MPEG communication protocol (see the MPEG-2 standard) that allows an elementary stream to be divided into packets. The elementary stream is packetized by encapsulating sequential data bytes from the elementary stream inside PES packet headers.

A typical method of transmitting elementary stream data from a video or audio encoder is to first create PES packets from the elementary stream data and then to encapsulate these PES packets inside an MPEG transport stream (TS) packets or an MPEG program stream (PS). The TS packets can then be multiplexed and transmitted using broadcasting techniques, such as those used in an ATSC and DVB.

PES packet header

Packet start code prefix3 bytes0x000001
Stream id1 byteExamples: Audio streams (0xC0-0xDF), Video streams (0xE0-0xEF) [3]

[4] [5][6]

Note: The above 4 bytes is called the 32-bit start code.
PES Packet length2 bytesCan be zero as in not specified for video streams in MPEG transport streams
Optional PES headervariable length
Stuffing bytesvariable length
Data See elementary stream. In the case of private streams the first byte of the payload is the sub-stream number.

Optional PES header

NameNumber of BitsDescription
Marker bits210 binary or 0x2 hex
Scrambling control200 implies not scrambled
Data alignment indicator11 indicates that the PES packet header is immediately followed by the video start code or audio syncword
Copyright11 implies copyrighted
Original or Copy11 implies original
PTS DTS indicator211 = both present, 10 = only PTS
ESCR flag1
ES rate flag1
DSM trick mode flag1
Additional copy info flag1
CRC flag1
extension flag1
PES header length8gives the length of the remainder of the PES header
Optional fieldsvariable lengthpresence is determined by flag bits above
Stuffing Bytesvariable length0xff


In order to provide mono "compatibility", the NICAM signal is transmitted on a subcarrier alongside the sound carrier. This means that the FM or AM regular mono sound carrier is left alone for reception by monaural receivers.

A NICAM-based stereo-TV infrastructure can transmit a stereo TV programme as well as the mono "compatibility" sound at the same time, or can transmit two or three entirely different sound streams. This latter mode could be used to transmit audio in different languages, in a similar manner to that used for in-flight movies on international flights. In this mode, the user can select which soundtrack to listen to when watching the content by operating a "sound-select" control on the receiver.

NICAM offers the following possibilities. The mode is auto-selected by the inclusion of a 3-bit type field in the data-stream

The four other options could be implemented at a later date. Only the first two of the ones listed are known to be in general use however.

NICAM packet transmission

The NICAM packet (except for the header) is scrambled with a nine-bit pseudo-random bit-generator before transmission.

Making the NICAM bitstream look more like white noise is important because this reduces signal patterning on adjacent TV channels.

See also


This article is issued from Wikipedia - version of the 11/14/2016. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.