Packet

From Free net encyclopedia

This article refers to the information technology term. For the historical use, see packet trade.

A packet is the fundamental unit of information carriage in all modern computer networks that use packet switching.

Contents

Connectionless packets: Datagrams

Some systems that use packets (e.g. ATM) require a connection setup stage before any packets can be sent, which is why they introduce the term datagram.

  • A datagram is a self-contained packet, one which contains enough information in the header to allow the network to forward it to the destination independently of previous or future datagrams.
  • Thus, no setup is needed before a computer tries to send datagrams to a computer with which it has not previously communicated, unlike with virtual circuit protocols. Other packet switched networks, for instance the Internet Protocol, do not require prior setup, and therefore the two terms are used interchangeably.

How packets work

A packet consists of three elements: the first element is a header, which contains the information needed to get the packet from the source to the destination, and the second element is a data area, which contains the information of the user who caused the creation of the packet. The third element of packet is a trailer, which often contains techniques ensuring that errors do not occur during transmission.

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.

The life of one connection will usually comprise a series of packets; in some network designs, they will not necessarily all be routed over the same path through the network.

Image:Packets-and-Frames illustration.png

IP packets

IP packets are composed of several components [1]. They are divided in 3 main parts: the header, data and trailer. The first 4 bits of a packet header is the version, that specifies if it's an IPv4 or IPv6 packet. The next 4 bits is the Internet Header Length which is the length of the header. The next 8 bits is the Type of Service, also referred to as Quality of Service (QoS), which describes what priority the packet should have. The next 16 bits is the length of the packet. The next 16 bits is an identification tag to help reconstruct the packet from several fragments. The next 3 bits is a flag that says if the packet is allowed to be fragmented or not. The next 13 bits is the fragment offset, a field to identify which fragment this packet is attached to. The next 8 bits is 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. The next 8 bits is the protocol (TCP, UDP, ICMP, etc..). The next 16 bits is the Header Checksum, a number used in error correction. The next 32 bits is the source IP address, and then 32 bits for the destination IP address. After those, optional flags can be added of varied length, which can change based on the protocol used, then the data that packet carries is added, and finally the trailer.

Delivery not guaranteed

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 which can provide such protection; TCP and UDP are the best examples of layer 4, the Transport Layer, of the seven layered OSI model.

The header of a packet specifies the data type, packet number, total number of packets, and the sender and receiver's IP addresses.

The term frame is sometimes used to refer to a packet exactly as transmitted over the wire or radio.

A practical illustration: 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 set 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.

  • Packetized data are transmitted via frames, which are fixed-length data blocks. The size of a frame, including frame header and control information, can range up to 2048 bytes.
  • Packet sizes are fixed during the mission development phase.
  • 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 typically are protected from channel errors by error-correcting codes.

  • Even when the channel errors exceed the correction capability of the error-correcting code, the presence of errors nearly always is detected by the error-correcting code or by a separate error-detecting code.
  • Frames for which uncorrectable errors are detected are marked as undecodable and typically are deleted.

Handling data loss

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

  • When errors are present in a frame, the bits of the subband pixels already decoded before the first bit error will remain intact, but all subsequent decoded bits in the segment usually will be completely corrupted; a single bit error is often just as disruptive as many bit errors.
  • Furthermore, compressed data usually are protected by powerful, long-blocklength error-correcting codes, which are the types of codes most likely to yield substantial fractions of bit errors throughout those frames that are 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.

  • If an erroneous frame escapes detection, the decompressor will blindly use the frame data as if they were reliable, whereas in the case of detected erroneous frames, the decompressor can base its reconstruction on incomplete, but not misleading, data.
  • Fortunately, it is extremely rare for an erroneous frame to go undetected.
  • For frames coded by the CCSDS Reed–Solomon code, fewer than 1 in 40,000 erroneous frames can escape detection.
  • All frames not employing the Reed–Solomon code use a cyclic redundancy check (CRC) error-detecting code, which has an undetected frame-error rate of less than 1 in 32,000.

See also

da:Datapakke de:Datenpaket es:Datagrama fr:Paquet (réseau) gl:Paquete he:חבילת מידע ja:パケット pl:Pakiet telekomunikacyjny pt:Pacote zh:分组