Jump to content

Network packet: Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
Reverting edit(s) by 201.175.156.138 (talk) to rev. 989662757 by Kajjul: Unexplained content removal (RW 16)
m avoid unnec redirect
 
(48 intermediate revisions by 32 users not shown)
Line 2: Line 2:
{{Refimprove|date=August 2014}}
{{Refimprove|date=August 2014}}


In [[telecommunication]]s and [[computer network]]ing, a '''network packet''' is a formatted unit of [[Data (computing)|data]] carried by a [[packet-switched network]]. A packet consists of control information and user data;<ref>{{cite book|last=Stallings|first=William|title=Business Data Communication|date=2001|publisher=Prentice-Hall, Inc.|location=Upper Saddle River, New Jersey, USA|isbn=0-13-088263-1|page=[https://archive.org/details/businessdatacomm00stal/page/632 632]|edition=4|chapter=Glossary|quote="Packet: A group of bits that includes data plus control information. Generally refers to a network layer (OSI layer 3) protocol data unit."|url-access=registration|url=https://archive.org/details/businessdatacomm00stal/page/632}}</ref> the latter is also known as the ''[[Payload (computing)|payload]]''. Control information provides data for delivering the payload (e.g., source and destination [[network address]]es, [[error detection]] codes, or sequencing information). Typically, control information is found in packet [[Header (computing)|headers]] and [[Trailer (computing)|trailers]].
In [[telecommunications]] and [[computer network]]ing, a '''network packet''' is a formatted unit of [[Data (computing)|data]] carried by a [[packet-switched network]]. A packet consists of control information and user data;<ref>{{cite book|last=Stallings|first=William|title=Business Data Communication|date=2001|publisher=Prentice-Hall, Inc.|location=Upper Saddle River, New Jersey, USA|isbn=0-13-088263-1|page=[https://archive.org/details/businessdatacomm00stal/page/632 632]|edition=4|chapter=Glossary|quote=Packet: A group of bits that includes data plus control information. Generally refers to a network layer (OSI layer 3) protocol data unit.|chapter-url-access=registration|chapter-url=https://archive.org/details/businessdatacomm00stal/page/632}}</ref> the latter is also known as the ''[[Payload (computing)|payload]]''. Control information provides data for delivering the payload (e.g., source and destination [[network address]]es, [[error detection]] codes, or sequencing information). Typically, control information is found in packet [[Header (computing)|headers]] and [[Trailer (computing)|trailers]].


In [[packet switching]], the [[Bandwidth (computing)|bandwidth]] of the [[transmission 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 [[packet switching]], the [[Bandwidth (computing)|bandwidth]] of the [[transmission 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]].


== Terminology ==
== Terminology ==
In the seven-layer [[OSI model]] of [[computer networking]], ''packet'' strictly refers to a [[protocol data unit]] at layer 3, the [[network layer]].{{Citation needed|date=July 2020}} A data unit at layer 2, the [[data link layer]], is a ''[[Frame (networking)|frame]]''. In layer 4, the [[transport layer]], the data units are ''segments'' and ''datagrams''. Thus, in the example of TCP/IP communication over [[Ethernet]], a [[TCP segment]] is carried in one or more [[IP packet (disambiguation)|IP packets]],<!--intentional link to disambig, could be either IPv4 or IPv6 packet--> which are each carried in one or more [[Ethernet frame]]s.
In the seven-layer [[OSI model]] of [[computer networking]], ''packet'' strictly refers to a [[protocol data unit]] at layer 3, the [[network layer]].<ref>{{Cite web|title=OSI Model|url=https://www.cloudflare.com/en-in/learning/ddos/glossary/open-systems-interconnection-model-osi/}}</ref> A data unit at layer 2, the [[data link layer]], is a ''[[Frame (networking)|frame]]''. In layer 4, the [[transport layer]], the data units are ''segments'' and ''datagrams''. Thus, in the example of TCP/IP communication over [[Ethernet]], a [[TCP segment]] is carried in one or more [[IP packet (disambiguation)|IP packets]],<!--intentional link to disambig, could be either IPv4 or IPv6 packet--> which are each carried in one or more [[Ethernet frame]]s.


== Architecture ==
== Architecture ==
The basis of the packet concept is the postal letter: the header is like the envelope, the payload is the entire content inside the envelope, and the footer would be your signature at the bottom.<ref>{{citation |url=http://www.tcpipguide.com/free/t_UnderstandingTheOSIReferenceModelAnAnalogy.htm |title=Understanding The OSI Reference Model: An Analogy |work=The TCP/IP Guide |accessdate=2014-08-09 |url-status=live |archiveurl=https://web.archive.org/web/20140809215056/http://www.tcpipguide.com/free/t_UnderstandingTheOSIReferenceModelAnAnalogy.htm |archivedate=2014-08-09 }}</ref>
The basis of the packet concept is the postal letter: the header is like the envelope, the payload is the entire content inside the envelope, and the footer would be your signature at the bottom.<ref>{{citation |url=http://www.tcpipguide.com/free/t_UnderstandingTheOSIReferenceModelAnAnalogy.htm |title=Understanding The OSI Reference Model: An Analogy |work=The TCP/IP Guide |access-date=2014-08-09 |url-status=live |archive-url=https://web.archive.org/web/20140809215056/http://www.tcpipguide.com/free/t_UnderstandingTheOSIReferenceModelAnAnalogy.htm |archive-date=2014-08-09 }}</ref>


[[Network design]] can achieve two major results by using packets: ''error detection'' and ''multiple host addressing''.{{cn|date=June 2018}}
[[Network design]] can achieve two major results by using packets: ''error detection'' and ''multiple host addressing''.<ref>{{Cite web|title=Chapter 5 Link Layer|url=http://www.msc.uky.edu/ken/cs471/notes/chap5.htm|access-date=2021-10-23|website=www.msc.uky.edu}}</ref>


== Framing ==
== Framing ==
Different [[communications protocol]]s 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.
[[Communications protocol]]s use various conventions for distinguishing 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 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.<ref>{{Cite web |title=Computer Networking : Principles,Protocols and Practice — CNP3www 2014 documentation |url=https://www.computer-networking.info/index.html |access-date=2024-08-05 |website=www.computer-networking.info}}</ref>


== Contents ==
== Contents ==
Line 21: Line 21:


;Addresses
;Addresses
:The routing of network packets requires two [[network address]]es, the source address of the sending host, and the destination address of the receiving host.
:The [[routing]] of network packets requires two [[network address]]es, the source address of the sending host, and the destination address of the receiving host.<ref name=":0">{{Cite web |date=2019-09-22 |title=Network Packet (fundamental unit of information) |url=https://networkencyclopedia.com/network-packet/ |access-date=2024-08-05 |website=NETWORK ENCYCLOPEDIA |at=Network Packet Content |language=en-US}}</ref>


;Error detection and correction
;Error detection and correction
:[[Error detection and correction]] is performed at various layers in the protocol stack. Network packets may contain a [[checksum]], [[parity bit]]s or [[cyclic redundancy check]]s to detect errors that occur during transmission.
:[[Error detection and correction]] is performed at various layers in the [[protocol stack]]. Network packets may contain a [[checksum]], [[parity bit]]s or [[cyclic redundancy check]]s to detect errors that occur during transmission.<ref name=":0" />


: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]] due to these discards is dealt with by the network protocol.
: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]] due to these discards 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.
:In some cases, modifications of the network packet may be necessary while routing, in which cases checksums are recalculated.


;Hop limit
;Hop limit
:Under fault conditions, packets can end up traversing a [[Cycle (graph theory)|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. [[Time to live]] is a field that is decreased by one each time a packet goes through a [[network hop]]. If the field reaches zero, routing has failed, and the packet is discarded.
:Under fault conditions, packets can end up traversing a [[Cycle (graph theory)|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. [[Time to live]] is a field that is decreased by one each time a packet goes through a [[network hop]]. If the field reaches zero, routing has failed, and the packet is discarded.<ref name=":0" />


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


;Length
;Length
: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 the transmission.
: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 the transmission.<ref name=":0" />

;Protocol identifier
:It is often desirable to carry multiple communication protocols on a network. A protocol identifier field specifies a packet's protocol and allows the protocol stack to process many types of packets.


;Priority
;Priority
: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.
: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. <ref name=":0" />


;Payload
;Payload
:In general, the 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. When necessary, some networks can break a larger packet into smaller packets.
:In general, the 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. When necessary, some networks can break a larger packet into smaller packets.<ref name=":0" />


== Examples ==
== Examples ==


=== Internet protocol ===
=== Internet protocol ===
[[IP packet (disambiguation)|IP packets]] are composed of a header and payload. The header consists of fixed and optional fields. The payload appears immediately after the header. 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.
IP packets are composed of a header and payload. The header consists of fixed and optional fields. The payload appears immediately after the header. 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.


Per the [[end-to-end principle]], IP networks do not provide guarantees of delivery, non-duplication, or in-order delivery of packets. However, it is common practice to layer a [[Reliability (computer networking)|reliable]] [[transport protocol]] such as [[Transmission Control Protocol]] on top of the packet service to provide such protection.
Per the [[end-to-end principle]], IP networks do not provide guarantees of delivery, non-duplication, or in-order delivery of packets. However, it is common practice to layer a [[Reliability (computer networking)|reliable]] [[transport protocol]] such as [[Transmission Control Protocol]] on top of the packet service to provide such protection.
Line 60: Line 63:


=== NICAM ===
=== NICAM ===
In order to provide [[Monaural|mono]] "compatibility", the [[NICAM]] signal is transmitted on a [[subcarrier]] alongside the sound carrier. This means that the [[Frequency modulation|FM]] or [[Amplitude modulation|AM]] regular mono sound carrier is left alone for reception by monaural receivers. 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.
In order to provide [[Monaural|mono]] ''compatibility'', the [[NICAM]] signal is transmitted on a [[subcarrier]] alongside the sound carrier. This means that the [[Frequency modulation|FM]] or [[Amplitude modulation|AM]] regular mono sound carrier is left alone for reception by monaural receivers. 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 ==
== See also ==
{{Div col|colwidth=25em}}
{{Div col|colwidth=25em}}
*[[Anti-replay]]
*[[Anti-replay]]
*[[Donald Davies]]
*[[DHCP server]]
*[[Fast packet switching]]
*[[Fast packet switching]]
*[[Louis Pouzin]]
*[[Mangled packet]]
*[[Mangled packet]]
*[[Packet analyzer]]
*[[Packet analyzer]]
*[[Packet generation model]]
*[[Packet generation model]]
*[[Statistical multiplexing]]
*[[Statistical time-division multiplexing]]
*[[Tail drop]]
*[[Tail drop]]
{{div col end}}
{{div col end}}

Latest revision as of 00:09, 16 September 2024

In telecommunications and computer networking, a network packet is a formatted unit of data carried by a packet-switched network. A packet consists of control information and user data;[1] the latter is also known as the payload. Control information provides data for delivering the payload (e.g., source and destination network addresses, error detection codes, or sequencing information). Typically, control information is found in packet headers and trailers.

In packet switching, the bandwidth of the transmission 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.

Terminology

[edit]

In the seven-layer OSI model of computer networking, packet strictly refers to a protocol data unit at layer 3, the network layer.[2] A data unit at layer 2, the data link layer, is a frame. In layer 4, the transport layer, the data units are segments and datagrams. Thus, in the example 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.

Architecture

[edit]

The basis of the packet concept is the postal letter: the header is like the envelope, the payload is the entire content inside the envelope, and the footer would be your signature at the bottom.[3]

Network design can achieve two major results by using packets: error detection and multiple host addressing.[4]

Framing

[edit]

Communications protocols use various conventions for distinguishing 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 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.[5]

Contents

[edit]

A packet may contain any of the following components:

Addresses
The routing of network packets requires two network addresses, the source address of the sending host, and the destination address of the receiving host.[6]
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.[6]
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 due to these discards 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 limit
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. Time to live is a field that is decreased by one each time a packet goes through a network hop. If the field reaches zero, routing has failed, and the packet is discarded.[6]
Ethernet packets have no time-to-live field and so are subject to broadcast radiation in the presence of a switching loop.
Length
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 the transmission.[6]
Protocol identifier
It is often desirable to carry multiple communication protocols on a network. A protocol identifier field specifies a packet's protocol and allows the protocol stack to process many types of packets.
Priority
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. [6]
Payload
In general, the 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. When necessary, some networks can break a larger packet into smaller packets.[6]

Examples

[edit]

Internet protocol

[edit]

IP packets are composed of a header and payload. The header consists of fixed and optional fields. The payload appears immediately after the header. 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.

Per the end-to-end principle, IP networks do not provide guarantees of delivery, non-duplication, or in-order delivery of packets. However, it is common practice to layer a reliable transport protocol such as Transmission Control Protocol on top of the packet service to provide such protection.

NASA Deep Space Network

[edit]

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.

MPEG packetized stream

[edit]

Packetized elementary stream (PES) is a specification associated with 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 between 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 transmitted using broadcasting techniques, such as those used in an ATSC and DVB.

NICAM

[edit]

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. 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

[edit]

References

[edit]
  1. ^ Stallings, William (2001). "Glossary". Business Data Communication (4 ed.). Upper Saddle River, New Jersey, USA: Prentice-Hall, Inc. p. 632. ISBN 0-13-088263-1. Packet: A group of bits that includes data plus control information. Generally refers to a network layer (OSI layer 3) protocol data unit.
  2. ^ "OSI Model".
  3. ^ "Understanding The OSI Reference Model: An Analogy", The TCP/IP Guide, archived from the original on 2014-08-09, retrieved 2014-08-09
  4. ^ "Chapter 5 Link Layer". www.msc.uky.edu. Retrieved 2021-10-23.
  5. ^ "Computer Networking : Principles,Protocols and Practice — CNP3www 2014 documentation". www.computer-networking.info. Retrieved 2024-08-05.
  6. ^ a b c d e f "Network Packet (fundamental unit of information)". NETWORK ENCYCLOPEDIA. 2019-09-22. Network Packet Content. Retrieved 2024-08-05.