A network packet is a bounded, formatted unit of data transmitted across a computer network. It ordinarily contains a payload—the information being carried—and control information that identifies how the unit should be interpreted, delivered, or checked. Packets allow many communications to share transmission links, making them fundamental to packet switching and to the operation of the Internet.
“Packet” is used both broadly, for units exchanged by network protocols, and more narrowly, for network-layer units such as Internet Protocol packets. The precise format and delivery guarantees depend on the protocol. A packet may be forwarded through several networks, encapsulated within other packets, discarded when resources are unavailable, or delivered out of order. Reliable communication, confidentiality, and application-level meaning are supplied by additional mechanisms rather than by packetization alone.
Meaning, boundaries, and protocol layers
A packet is a logical unit, not a particular electrical pulse, optical signal, or radio transmission. Its contents are represented as bits, usually organized into octets, or eight-bit bytes. Physical transmission converts those bits into signals appropriate to a medium. A packet may therefore cross copper wiring, optical fiber, and wireless links while retaining its identity at the network layer, even though its physical representation and link-layer packaging change along the route.
Terminology distinguishes units at different layers. In conventional descriptions of the TCP/IP protocol suite, an application produces messages or a byte stream; a transport protocol carries data in segments or datagrams; the Internet Protocol carries packets or datagrams; and a link protocol carries frames. These names are useful conventions rather than a universally enforced vocabulary. “TCP packet,” for example, commonly means an IP packet containing a TCP segment, although the TCP segment and the enclosing IP packet are different protocol units.
The central organizing mechanism is encapsulation. A lower layer treats a higher-layer unit as its payload and adds its own control information. An Ethernet frame can contain an IP packet, whose payload contains a TCP segment, whose payload contains application data. At the destination, protocol processing removes or interprets these layers in reverse order. An intermediate IP router normally processes the link-layer frame and IP header without needing to interpret the application message.
Packet boundaries do not necessarily coincide with application boundaries. A single application message may occupy many packets, and one packet may carry pieces of several messages. Transmission Control Protocol (TCP) exposes an ordered byte stream: an application write does not establish a boundary that the receiving application must observe. By contrast, User Datagram Protocol (UDP) preserves datagram boundaries at its interface, subject to delivery and implementation limits. Protocols layered above either transport may define additional message boundaries.
“Packet” also does not imply an independently routed or self-sufficient object in every network architecture. Some packet networks use pre-established virtual circuits or labels rather than a complete destination address interpreted at each step. Some packets carry only control information, such as acknowledgments or routing updates, rather than user content. The common feature is a recognizable unit that network equipment can delimit and process according to a protocol.
Origins and historical development
Packet communication developed as an alternative to allocating a dedicated communication circuit to each conversation. In circuit switching, resources can remain reserved even while a participant is silent. Computer traffic is often bursty: a machine transmits a request, waits for computation or a response, and then transmits again. Dividing communications into independently handled units enables statistical multiplexing, in which active users share available capacity without each receiving a continuously reserved channel.
During the early 1960s, Paul Baran at the RAND Corporation developed proposals for distributed communications using what he called message blocks. His work examined how a network with redundant interconnections could continue communicating despite failures. Independently, Donald Davies at the United Kingdom’s National Physical Laboratory developed packet-switching ideas in the mid-1960s and introduced the term “packet.” Both approaches made the subdivision and interleaving of traffic central to network design, although their institutional settings and immediate objectives differed.
The ARPANET, which began operation in 1969, provided a major early implementation of packet networking. Its Interface Message Processors formed a packet-switching subnetwork connecting host computers. The French CYCLADES project, led by Louis Pouzin in the early 1970s, explored a datagram architecture in which end systems carried substantial responsibility for reliable communication. These projects helped establish distinctions among host messages, subnet packets, routing, and end-to-end transport that remain important in later networks.
Vinton Cerf and Robert Kahn’s 1974 paper on internetwork communication described mechanisms for connecting heterogeneous packet networks. The original Transmission Control Program subsequently evolved into separate TCP and IP protocols. IPv4 and TCP specifications published in 1981 helped consolidate this separation, and ARPANET’s transition to TCP/IP on 1 January 1983 was an important operational milestone. IP supplied a common packet format across unlike networks, while transport protocols could provide services suited to different applications.
Packet formats subsequently evolved to address scale, performance, and deployment constraints. Ethernet, developed during the 1970s, became a dominant local-network framing technology. X.25 networks offered virtual-circuit packet services, while Asynchronous Transfer Mode used fixed-size 53-byte cells, illustrating that packet-like units need not have variable length. IPv6, initially standardized in 1995 and revised thereafter, expanded addressing and reorganized the IP header. More recent transports such as QUIC retain the packet-based Internet substrate while moving encryption, connection management, and multiple logical streams into newer endpoint protocols.
Packet anatomy and representation
Most packet formats separate control information from carried data, commonly as a header followed by a payload. Some protocols also use a trailer. Header fields may identify the protocol version, source and destination, payload type, length, priority, fragmentation state, or integrity check. These fields are metadata relative to the payload, but they are still ordinary transmitted bits. Their interpretation depends on the protocol specification, including field widths, permitted values, and rules for handling unknown or malformed combinations.
IPv4 illustrates a compact but extensible network-layer format. Its header is at least 20 bytes and can grow to 60 bytes when options are present. It contains 32-bit source and destination addresses, a Total Length field, an identification value and fragmentation fields, a Time to Live field, a Protocol field, and a header checksum. Total Length includes both header and payload and has a maximum representable value of 65,535 bytes. The Protocol field identifies the next protocol, such as TCP, UDP, or ICMP.
IPv6 uses a fixed 40-byte base header and 128-bit source and destination addresses. Its base header includes Traffic Class, Flow Label, Payload Length, Next Header, and Hop Limit fields. Additional information can be placed in extension headers. Unlike IPv4, IPv6 has no base-header checksum. Its ordinary 16-bit Payload Length field describes the bytes following the base header; a separately defined jumbogram mechanism supports larger payloads under particular conditions. A fixed base header does not mean that the complete chain of headers always has a fixed size.
A concrete encapsulation example shows how overhead accumulates. Suppose a UDP datagram carries 1,000 bytes of application data over IPv4 without IP options. The UDP header adds 8 bytes and the IPv4 header adds 20, producing a 1,028-byte IP packet. A basic Ethernet frame adds a 14-byte header and a 4-byte frame check sequence, yielding 1,046 bytes from destination address through frame check sequence. Physical-link occupancy is larger still because Ethernet also uses a preamble, start-frame delimiter, and an interpacket gap.
Interpretation requires more than knowing field sizes. A receiver must establish which protocol applies, check available lengths before reading fields, and distinguish padding from meaningful data. Multibyte integer fields in IP and many related protocols use network byte order, conventionally most-significant byte first. A packet is therefore not simply a memory image of a program’s internal data structure: compiler alignment, native byte order, and representation choices cannot safely substitute for explicit serialization rules.
Addressing, routing, and forwarding
Packets carry identifiers that operate at different scopes. An IP destination address identifies a network-layer destination, while an Ethernet destination address identifies a receiver on a particular link. A transport-layer port identifies an endpoint within a host’s transport processing. These are not interchangeable identities. A host name resolved through the Domain Name System can produce an IP address, but ordinary IP forwarding does not look up the original name for every packet.
A router receives a packet on one interface and chooses an outgoing interface and next hop. In conventional IP forwarding, it examines the destination address and searches a forwarding table for the most specific matching address prefix, a procedure called longest-prefix matching. Routing protocols and administrative configuration establish the information from which that table is built. For example, Open Shortest Path First distributes topology information within a routing domain; the data-plane forwarding decision uses the resulting table rather than rerunning the entire routing protocol for each packet.
At each routed Ethernet hop, the incoming frame is removed and a new outgoing frame is constructed. The link-layer source and destination addresses therefore generally change, while the IP source and destination ordinarily remain the same. The router reduces the IPv4 Time to Live or IPv6 Hop Limit, preventing packets caught in forwarding loops from circulating indefinitely. Because the IPv4 checksum covers its header, changing Time to Live also requires updating that checksum. Address translation, tunneling, and other middlebox functions are important exceptions to the simplest unchanged-address model.
Packets may be addressed for unicast delivery to one destination, multicast delivery to a receiver group, or, in suitable network technologies, broadcast delivery across a local domain. Anycast assigns the same address to multiple service instances, with routing selecting an instance according to network policy and topology. These mechanisms differ in where replication occurs and how receivers are selected. IPv6 does not define broadcast; multicast fulfills several functions that use broadcast in IPv4 networks.
A sequence of related packets is often treated as a flow. Devices commonly classify a transport flow using source and destination addresses, source and destination ports, and a transport protocol number, although other definitions are used. Load balancing across equal-cost paths often hashes these fields to keep a flow on one path and reduce reordering. Nevertheless, IP does not guarantee that every packet in a flow follows the same route. Failures, routing changes, policy, and different scheduling decisions can alter the path during communication.
Packet size, fragmentation, and path constraints
Packet size reflects a trade-off between efficiency and flexibility. Larger payloads amortize the cost of headers, per-packet processing, and medium access. Smaller packets reduce the time for which one transmission occupies a link and can limit the amount of data affected by a single loss. The governing link constraint is the maximum transmission unit (MTU): the largest network-layer packet that can be carried in one link-layer unit under the applicable configuration. A common Ethernet IP MTU is 1,500 bytes, although other sizes are widely used.
The path MTU is the smallest relevant MTU along a route. A packet that fits the sender’s first link may still be too large for a later link. In IPv4, a router can fragment a packet when necessary if fragmentation is permitted. Each fragment receives an IP header and carries a portion of the original payload. Fragment offsets are expressed in units of eight bytes, constraining the payload lengths of nonfinal fragments. Reassembly normally takes place at the destination, not at each router along the path.
IPv6 handles this differently: routers do not fragment forwarded packets. If a packet exceeds the next link’s MTU, the router discards it and normally returns an ICMPv6 Packet Too Big message. A source that uses IPv6 fragmentation supplies a Fragment extension header. IPv6 also requires links to support an MTU of at least 1,280 bytes at the IPv6 layer; technologies with smaller underlying units need an adaptation mechanism. This requirement does not mean that every IPv6 packet must be 1,280 bytes long.
Path MTU discovery allows a source to learn a usable packet size. Classical mechanisms use appropriately constrained packets and error messages from Internet Control Message Protocol (ICMP). IPv4 commonly uses the Don’t Fragment flag for this purpose. If required error messages are filtered, a connection may establish successfully but stall when it begins sending larger packets, a failure often called an MTU black hole. Packetization-layer approaches instead use probes and transport feedback to discover sizes that actually succeed, reducing dependence on ICMP delivery.
Encapsulation creates additional size constraints. A tunnel adds an outer header, leaving less space for an inner packet if the physical path MTU is unchanged. TCP’s Maximum Segment Size option concerns TCP payload, not the total size of an IP packet, and therefore must be distinguished from MTU. Fragmentation also amplifies loss consequences: without a protocol-specific recovery mechanism, losing one fragment prevents reconstruction of the complete original datagram. Reassembly consumes memory and requires timers, so packet sizing affects both transmission efficiency and receiver resource use.
Delivery semantics, errors, and transport services
IP provides a best-effort datagram service. Packets can be lost, duplicated, reordered, delayed, or corrupted before delivery, and the protocol does not promise a maximum delivery time. Routers generally do not retain forwarded packets until the final destination confirms receipt. This division of responsibility permits heterogeneous networks to interoperate without imposing one reliability mechanism on every link and application, but it means that applications needing stronger semantics must obtain them elsewhere in the protocol stack.
Error detection occurs at several layers with different coverage. Ethernet uses a cyclic redundancy check in its frame check sequence. IPv4 checks only its header, while TCP and UDP checksums cover transport information and data together with a pseudo-header incorporating selected IP-layer information. A UDP checksum may be omitted under IPv4 by using a zero value; for ordinary UDP over IPv6 it is required, with narrowly specified exceptions. Checksums detect classes of accidental corruption but do not provide adversarial integrity. That requires cryptographic mechanisms such as a message authentication code.
TCP builds reliable ordered delivery using sequence numbers, acknowledgments, retransmission, and receiver buffering. Its sequence numbers identify positions in a byte stream rather than assigning an immutable number to each network packet. A retransmission can cover a different division of bytes from the original transmission. Duplicate data is recognized by its sequence-space position, while missing ranges can be reported through selective acknowledgments. Receiver flow control limits the amount of unacknowledged data according to available receiving capacity.
UDP provides a much smaller service: datagram boundaries, ports, length information, and a checksum mechanism, without built-in reliable delivery or ordering. This does not make every UDP application unreliable in the broader sense. An application can add acknowledgment and recovery rules, or use a protocol built above UDP. QUIC, for example, supplies encrypted transport, loss recovery, congestion control, and multiple streams over UDP. Its packet numbers support packet acknowledgment and loss detection, while stream offsets separately identify positions within stream data.
The distinction between network delivery and application success remains essential. A transport acknowledgment does not necessarily establish that an application processed a request, committed a database transaction, or retained the result durably. After a connection failure, a sender may not know whether a request was executed before communication stopped. Applications therefore use request identifiers, deduplication, idempotent operations, and explicit transaction protocols where appropriate. Reliable packet or byte delivery is one component of a larger distributed interaction, not a general guarantee that an operation occurs exactly once.
Delay, congestion, and service differentiation
Packet delay has several components: processing at devices, waiting in queues, serialization onto links, and signal propagation. For a packet of bits transmitted over a link with rate bits per second, serialization delay is
A 1,500-byte packet takes 120 microseconds to serialize at 100 megabits per second, or 12 microseconds at 1 gigabit per second, excluding link-specific overhead. Propagation delay instead depends on distance and signal speed; increasing link rate does not eliminate the travel time through a long fiber.
Queueing delay varies with traffic and scheduling. When packets arrive faster than an outgoing link can serve them, they accumulate in a buffer. A buffer holding 1 megabyte ahead of a packet on a 10-megabit-per-second link represents about 0.8 seconds of serialization backlog. Large buffers can absorb bursts, but persistently occupied buffers produce high latency, often called bufferbloat. Under suitable steady-state conditions, Little’s law relates average occupancy , arrival rate , and average time in the system :
Congestion control attempts to keep offered traffic compatible with network capacity. TCP and QUIC senders use acknowledgments, inferred losses, timing measurements, and sometimes explicit congestion signals to adjust transmission. Congestion control is distinct from receiver flow control: a receiver can have ample memory while an intermediate link is overloaded. Packet loss can result from congestion, but it can also arise from wireless errors, equipment faults, policing, or other causes, so a loss observation does not uniquely identify its origin.
Routers can influence delay and loss through scheduling and queue management. First-in, first-out service is simple, while fair-queueing approaches separate traffic into queues to limit domination by individual flows. Active queue management can drop or mark packets before a buffer becomes completely full. Explicit Congestion Notification permits compatible network devices to mark congestion in IP headers rather than requiring a packet drop for every congestion signal. Such marks must be interpreted and acted upon by the transport endpoints.
Traffic differentiation uses classifications such as the Differentiated Services Code Point in IP headers, but a marking alone is not an end-to-end service guarantee. Its effect depends on configured policies along the route. Voice and interactive video are particularly sensitive to variable delay, or jitter, whereas large file transfers emphasize sustained throughput and completion time. Packet size also matters: a small high-priority packet may still wait for a large lower-priority frame already being transmitted on a nonpreemptive link. These interactions make packet performance a property of the complete path, traffic mix, and endpoint behavior.
Packet processing, offload, and observation
A packet traverses both hardware and software processing paths. At a receiving computer, a network interface typically transfers data into memory and records completion information in descriptor rings. The device driver and operating-system kernel arrange protocol processing and delivery to a socket or another consumer. Implementations use interrupts, polling, batching, and combinations of these mechanisms. The best arrangement depends on traffic volume, latency requirements, processor availability, and the cost of moving data between devices and memory.
Packet rate can be as important as bit rate. A 10-gigabit-per-second Ethernet link carrying minimum-size 64-byte frames can approach 14.88 million frames per second when the preamble and interpacket gap are included in the calculation. At that rate, even modest per-packet work becomes substantial. Forwarding systems therefore use specialized hardware, efficient lookup structures, batching, and multicore processing. Receive-side scaling commonly distributes flows among processor queues so that packets belonging to one flow can be processed with useful locality.
Offload mechanisms shift work between software and hardware. Transmit checksum offload lets an interface complete checksums after software has prepared a packet. Segmentation offload allows a host to submit a large logical block that hardware divides into wire-sized packets. Receive coalescing performs a complementary operation by combining compatible incoming segments before upper-layer processing. These mechanisms improve efficiency but complicate the notion that every packet visible inside a host corresponds one-to-one with a packet transmitted on the link.
Packet capture records traffic at a particular observation point. Tools such as tcpdump and Wireshark decode headers and payloads according to protocol definitions, making packet inspection central to fault diagnosis and protocol development. A host capture can show an apparently invalid outgoing checksum because capture occurred before hardware filled it in. It can also show apparently oversized packets because segmentation has not yet occurred or receive coalescing has already combined data. Such records describe the capture interface’s view, not necessarily the exact physical transmission.
Observation has additional limits. A busy capture system can drop packets; a mirrored switch port can be oversubscribed; timestamps may reflect software scheduling rather than precise arrival at the medium. Sampling and flow records reduce collection costs but omit packet-level detail. Encryption prevents ordinary observers from interpreting protected application content, while leaving some delivery metadata visible. Accurate analysis therefore distinguishes packet contents, capture artifacts, measurement loss, and clock behavior, rather than treating a trace as an automatically complete account of network events.
Security, privacy, and middlebox behavior
Packet headers are instructions to protocol implementations, and malformed inputs can expose defects in those implementations. Incorrect lengths, inconsistent fields, unexpected extension-header chains, and pathological fragment patterns require careful handling. A parser that trusts an advertised length without checking the actual available data may read beyond a buffer or trigger a buffer overflow. These risks make packet parsing an important part of cybersecurity, particularly in operating systems, network appliances, and high-speed forwarding hardware that process untrusted traffic continuously.
Source addresses are not, by themselves, authenticated identities. In some network settings an attacker can transmit packets containing a forged source address. Such spoofing can conceal the apparent origin of traffic or support reflection attacks, in which services send responses toward a victim whose address was supplied in the request. A denial-of-service attack can exhaust link bandwidth, packet-processing capacity, connection state, or reassembly memory. Filtering inappropriate source addresses near their point of entry reduces spoofing opportunities but does not turn an IP address into a cryptographic identity.
Fragmentation and inconsistent interpretation can complicate security enforcement. If a firewall and destination interpret overlapping fragments or unusual header sequences differently, traffic judged harmless by one component may be reconstructed differently by another. Stateful firewalls therefore track relevant connection information and may reassemble or normalize traffic before applying policy. This adds resource costs and creates trade-offs between strict validation, interoperability, latency, and resistance to resource-exhaustion attacks.
Encryption protects selected content rather than making a packet entirely invisible. Transport Layer Security protects application communication above its underlying transport; IPsec can protect IP traffic in transport or tunnel configurations. QUIC encrypts most transport control information as well as application data, while still exposing information necessary for packet delivery and parts of connection handling. Protection against modification depends on authenticated cryptographic construction, not merely on concealing bytes. Outer addresses, packet lengths, timing, and direction can still reveal traffic patterns.
Firewalls, address translators, proxies, and other middleboxes may filter or modify packet handling between endpoints. Network address translation commonly changes addresses and transport ports, maintaining mappings that allow return traffic to reach an internal host. Such devices can also impede new protocols when they assume only familiar header values or packet patterns are valid. This tendency, often called protocol ossification, influences protocol design: newer transports sometimes encrypt control information or use widely supported substrates to reduce unintended interference. The resulting boundary between network visibility and endpoint control affects troubleshooting, traffic management, privacy, and the deployment of protocol changes.