A network packet is a formatted unit of data carried by a packet-switched network. 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 packet switching, the bandwidth of the communication medium is shared between multiple communication sessions, in contrast to circuit switching, in which circuits are preallocated for the duration of one session and data is typically transmitted as a continuous bit stream.
In the seven-layer OSI model of computer networking, packet strictly refers to a protocol 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 segment or datagram. For 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.
Different communications protocols use different conventions for distinguishing between the elements of a packet and for formatting the user 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.
An analogy of the packet concept is the postal letter: the header is like the envelope, and the payload is the entire content inside the envelope.
Network design can achieve two major results by using packets: error detection and multiple host addressing. A packet consists of the following components.
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, non-duplication 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.
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.
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.
Data in a frame is typically protected from channel errors by error-correcting codes.
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.
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.
|Packet start code prefix||3 bytes||0x000001|
|Stream id||1 byte||Examples: Audio streams (0xC0-0xDF), Video streams (0xE0-0xEF) |
|Note: The above 4 bytes is called the 32-bit start code.|
|PES Packet length||2 bytes||Can be zero as in not specified for video streams in MPEG transport streams|
|Optional PES header||variable length|
|Stuffing bytes||variable length|
|Data||See elementary stream. In the case of private streams the first byte of the payload is the sub-stream number.|
|Name||Number of Bits||Description|
|Marker bits||2||10 binary or 0x2 hex|
|Scrambling control||2||00 implies not scrambled|
|Data alignment indicator||1||1 indicates that the PES packet header is immediately followed by the video start code or audio syncword|
|Copyright||1||1 implies copyrighted|
|Original or Copy||1||1 implies original|
|PTS DTS indicator||2||11 = both present, 10 = only PTS|
|ES rate flag||1|
|DSM trick mode flag||1|
|Additional copy info flag||1|
|PES header length||8||gives the length of the remainder of the PES header|
|Optional fields||variable length||presence is determined by flag bits above|
|Stuffing Bytes||variable length||0xff|
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.
Packet: A group of bits that includes data plus control information. Generally refers to a network layer (OSI layer 3) protocol data unit.