TEZZ CONNECTBlog

Blog / Internet Technology & Updates

Internet Technology & Updates

What Is a Network Packet? Headers, Encapsulation, MTU and Fragmentation

Understand how data is divided into packets, how Ethernet, IP, TCP and UDP headers guide delivery, and why MTU and fragmentation matter when networks slow down or connections stall.

By Suraj Vishwakarma · Published by TEZZ CONNECT · Published 27 November 2026 · Updated 30 November 2026

Network infrastructure representing the movement of data packets across connected systems
Packets carry data through a layered set of network protocols

Every time a device loads a webpage, sends a message, joins a video call or downloads a file, information is transported through networks in structured units. These units are commonly called packets. A packet is more than a piece of content: it carries control information that helps network devices identify where it came from, where it is going and how it should be handled.

Understanding packets connects many networking concepts that are often taught separately. IP addresses, ports, routers, Ethernet, TCP, UDP, latency, packet loss and MTU describe different parts of the process that moves data from one application to another.

This guide follows data from an application to a local network and across routed links. It explains the difference between frames, packets and segments; the purpose of common headers; encapsulation and decapsulation; IPv4 and IPv6 fragmentation; Path MTU Discovery; and practical ways to inspect traffic safely.

1. What is a network packet?

A network packet is a formatted unit of data carried by a network-layer protocol. In an IP network, an IP packet consists of an IP header followed by a payload. The header contains information needed for delivery, while the payload carries the next protocol unit or data.

Imagine sending a parcel to another city. The item inside is the information you want to deliver. The address on the parcel helps the postal system route it. A network packet has a similar separation: payload is the carried information, and headers contain identifiers and instructions used by network software and equipment.

Packets allow a large communication to be divided into manageable units. A file transfer does not need to reserve one enormous continuous channel from sender to receiver. Data can be segmented, transmitted, forwarded and reassembled by endpoints. Different conversations can share network links, and routers can forward packets independently.

The word packet is sometimes used casually for an entire unit at several layers. Strictly, however, Ethernet uses frames, IP uses packets or datagrams, and TCP uses segments. Knowing which layer a diagnostic tool is discussing avoids confusion.

2. Packet, frame, segment and datagram: what is the difference?

Networking uses several names because each layer adds its own structure. The common TCP/IP mapping is:

  • Application data: content produced by an application, such as an HTTP request or DNS query.
  • TCP segment: a transport-layer unit containing a TCP header and application data. TCP provides sequencing, acknowledgements and retransmission.
  • UDP datagram: a transport-layer unit containing a UDP header and application data. UDP does not provide TCP-style delivery guarantees.
  • IP packet or datagram: an internet-layer unit with source and destination IP addresses. It is routed between networks.
  • Link-layer frame: a unit such as an Ethernet frame that carries an IP packet across one local link.
  • Physical signal: bits represented by electrical, optical or radio signalling on the medium.

Consider a browser sending an HTTPS request over TCP on Ethernet. The browser creates application data. TCP places it in a segment. IP wraps that segment in an IP packet. Ethernet then carries the IP packet inside a frame on the local link.

People sometimes say “TCP packet” or “Ethernet packet” in conversation. The meaning is usually clear from context, but packet-capture analysis benefits from precise terms. A Wireshark row may represent a captured frame containing an IP packet containing a TCP segment.

3. What information does a packet header carry?

A header is structured metadata placed before the payload. Network software reads it to make forwarding and delivery decisions. The fields differ by protocol, and not every device examines every field.

An IP header commonly identifies source and destination IP addresses, the upper-layer protocol, packet length and handling information. IPv4 includes a header checksum and fragmentation-related fields. IPv6 uses a simplified fixed base header and supports optional extension headers for additional functions.

A TCP header includes source and destination ports, sequence and acknowledgement numbers, control flags, a receive window and optional parameters. These fields help endpoints establish a connection, keep track of byte streams, acknowledge received data and regulate how much data can be in flight.

A UDP header is smaller. It includes source port, destination port, length and checksum. UDP does not establish a connection or retransmit missing data by itself. Applications using UDP decide what reliability, ordering or congestion behaviour they need.

An Ethernet header includes source and destination link-layer addresses and a type or length field. Ethernet also uses a frame check sequence (FCS) trailer for error detection on the link. A switch uses destination MAC information to forward a frame within a Layer 2 network; a router uses the destination IP address to make a Layer 3 forwarding decision.

4. How encapsulation works, layer by layer

Encapsulation is the process of wrapping data with protocol information as it moves down the network stack. Each layer treats data from the layer above as its payload and adds the fields needed for its own job. At the receiving end, decapsulation removes and interprets those headers in reverse order.

Ethernet frame
└── IP packet
    └── TCP segment
        └── TLS records
            └── HTTP request data

This is a conceptual view, not a promise that every capture shows exactly these boundaries. TLS can combine or divide application messages into records, TCP is a byte stream rather than a message-preserving transport, and offload features can make packet captures appear different from what travels on the wire.

When the sender creates an Ethernet frame, its destination MAC address normally identifies the next device on the local link. If the final IP destination is outside the local subnet, that next device is usually the configured default gateway. The IP destination remains the remote host, while the Ethernet destination is the local router interface.

At a router, the incoming link-layer frame is processed and removed. The router examines the IP packet, consults its forwarding information and sends the packet through an appropriate outgoing interface. It then builds a new link-layer frame suitable for the next link. The IP packet may be modified in defined ways, such as decrementing IPv4 TTL or IPv6 Hop Limit, but link-layer addresses are replaced for the next hop.

This explains why MAC addresses are link-local while IP addresses support communication across multiple networks. A packet may cross several routers and be carried in a different frame on each link.

5. What happens when a packet crosses a router?

A router is not simply a repeater that copies the same signal. It receives a frame, processes network-layer information, chooses a next hop and transmits a new frame on the outgoing interface.

The router uses a routing table or forwarding information base to determine where the destination prefix should go. The most specific matching route is normally preferred under longest-prefix matching. If no more specific route exists, a default route may be used. If there is no usable route, the packet may be dropped and an ICMP error may be generated, subject to policy.

Each routed hop has its own link-layer delivery. On an Ethernet LAN, ARP can map an IPv4 next-hop address to a MAC address; IPv6 uses Neighbor Discovery. The router does not normally need the destination device's MAC address if that device is several networks away. It needs the next-hop link-layer address on the local outgoing segment.

For IPv4, routers decrement Time to Live (TTL). For IPv6, they decrement Hop Limit. These fields prevent packets from circulating indefinitely in routing loops. When the value reaches the limit, a router discards the packet and may send an ICMP Time Exceeded message to the source.

Routing paths can change because of failures, policy, traffic engineering or load balancing. Packets from one application flow do not always experience identical paths or delays. TCP can handle reordering and retransmission at endpoints; real-time UDP applications may instead conceal loss or adapt media quality.

6. IPv4 packet header: the fields worth recognising

The minimum IPv4 header is 20 bytes, and options can make it longer. Its format is defined in RFC 791. For practical troubleshooting, several fields are particularly useful:

  • Version: identifies IPv4.
  • Internet Header Length (IHL): gives the header length in 32-bit words.
  • Total Length: gives the complete IPv4 datagram length, including header and payload.
  • Identification, Flags and Fragment Offset: support IPv4 fragmentation and reassembly.
  • Time to Live (TTL): limits the number of router hops.
  • Protocol: identifies the next protocol, such as TCP, UDP or ICMP.
  • Header Checksum: detects corruption in the IPv4 header and is recalculated when relevant header fields change.
  • Source and Destination Address: identify the sending and destination IPv4 addresses.

The Protocol field is an 8-bit identifier. The IANA registry assigns values such as 6 for TCP, 17 for UDP and 1 for ICMP. It is not the same as a TCP or UDP port. A port identifies an application endpoint within a transport protocol, while the IP Protocol field identifies which transport or control protocol follows the IP header.

IPv4 header checksum behaviour is easy to misunderstand. It covers only the IPv4 header, not the application payload. Ethernet FCS checks the frame on a link, while TCP and UDP checksums cover transport-layer information and data. These checks operate at different layers and protect different portions of a transmission.

7. IPv6 packet header: what changed?

IPv6 was designed with a fixed 40-byte base header and a different set of fields. The specification is RFC 8200. Its base header includes Version, Traffic Class, Flow Label, Payload Length, Next Header, Hop Limit, Source Address and Destination Address.

IPv6 does not include a base-header checksum. Link-layer and transport-layer mechanisms provide error detection at their respective layers, and removing the IPv4-style header checksum reduces per-hop processing. The IPv6 Next Header field identifies the header that follows, which may be a transport protocol or an extension header.

IPv6 extension headers carry optional information such as fragmentation, routing or destination options. They are linked together using Next Header values. This creates a chain that packet analysers can decode. The base header remains fixed in size even when extension headers are present.

IPv6 also changes fragmentation behaviour. A router does not fragment an IPv6 packet in transit. If a packet is too large for a link, the router drops it and can send an ICMPv6 Packet Too Big message. The source can then adjust packet size or use a Fragment extension header when required. This makes Path MTU Discovery important for IPv6 operation.

8. TCP and UDP: two different transport approaches

IP provides best-effort delivery between addresses. It does not promise that packets arrive, arrive once, arrive in order or arrive within a particular time. Transport protocols provide additional services for applications.

TCP establishes a connection and presents applications with a reliable, ordered byte stream. Sequence numbers identify byte positions; acknowledgements report received data; retransmissions recover from loss; and flow control protects a receiver from being overwhelmed. TCP congestion control also responds to network conditions so senders do not continuously overload paths.

UDP sends independent datagrams without a TCP-style connection handshake or built-in retransmission. It is useful when an application values low overhead, message boundaries or control over its own recovery strategy. DNS, voice, video, online games and real-time protocols may use UDP, although modern applications can also use QUIC over UDP.

Neither transport is automatically faster in every situation. TCP reliability mechanisms are valuable for file transfers and web content. UDP can avoid some transport delays, but an application must handle loss, congestion and ordering if it needs those properties. QUIC demonstrates that reliable streams and modern connection management can be built above UDP.

Ports help a host deliver incoming TCP or UDP data to the correct socket. A connection is often identified by source address, source port, destination address, destination port and transport protocol. Firewalls and network address translation devices use this information when applying policy and tracking flows.

9. What is MTU and why does packet size matter?

Maximum Transmission Unit (MTU) is the largest network-layer packet that a link can carry in one unit without link-layer fragmentation. For many Ethernet networks, the familiar IP MTU is 1500 bytes. This means the Ethernet payload can carry an IP packet up to 1500 bytes, not that the entire Ethernet frame is only 1500 bytes. Ethernet headers and FCS are outside that IP MTU figure.

MTU is a property of a link, while Path MTU (PMTU) is the smallest MTU across the path between two endpoints. A route may cross Ethernet, a VPN tunnel, a mobile network or another encapsulated service. The smallest effective limit can determine the maximum packet size that travels end to end without fragmentation or loss.

Tunnels add overhead because an outer header wraps the original packet. A VPN may add an outer IP header and security encapsulation. If the underlying link supports 1500 bytes, the inner packet may need to be smaller to leave room for tunnel headers. If it is not, fragmentation or packet drops may occur depending on protocol and configuration.

Jumbo frames are Ethernet frames with a larger payload MTU than the traditional 1500-byte IP MTU. They are useful in some data-centre and storage networks, but they must be supported consistently across the relevant path. Enabling a larger MTU on one switch port does not make every connected device or routed link support it.

10. MTU versus MSS: a practical calculation

MTU and Maximum Segment Size (MSS) are related but not interchangeable. MTU describes the maximum IP packet size. TCP MSS describes the maximum TCP data payload that a peer is willing to receive in one TCP segment; it excludes the IP and TCP headers.

For a simple Ethernet path with a 1500-byte IP MTU, minimum IPv4 and TCP headers are each 20 bytes. The basic MSS is therefore 1500 − 20 − 20 = 1460 bytes. For IPv6 with a 40-byte base header and a 20-byte TCP header, the corresponding basic MSS is 1500 − 40 − 20 = 1440 bytes.

These are common baseline calculations, not universal values. TCP options increase the actual TCP header size in individual packets, and tunnels or extension headers can reduce the effective payload available. MSS clamping on routers or firewalls can adjust the MSS advertised during the TCP handshake to help traffic fit through a smaller path.

For example, a VPN with additional encapsulation may have an effective inner MTU of 1400 bytes. A device that assumes a 1500-byte path could send packets that are too large. A correctly configured MSS adjustment can reduce TCP segment payload sizes, but it is not a substitute for understanding the actual path MTU or handling non-TCP traffic.

11. Packet fragmentation: IPv4 and IPv6 are different

Fragmentation divides one IP datagram into smaller pieces so it can cross a link with a smaller MTU. Reassembly takes place at the destination. Each fragment has information that allows the receiver to associate it with the original datagram and place its data in the correct position.

In IPv4, a router may fragment a packet when the outgoing link MTU is smaller than the packet and the Don't Fragment (DF) flag is not set. If DF is set, the router drops an oversized packet and can return an ICMP Destination Unreachable message with a fragmentation-needed indication. IPv4 fragmentation is described in RFC 791.

In IPv6, routers do not fragment packets in transit. The source node is responsible for adjusting packet size and may use a Fragment extension header when necessary. If a router encounters an oversized packet, it sends ICMPv6 Packet Too Big where permitted. This design encourages endpoints to discover the path MTU rather than relying on intermediate routers to split packets.

Fragmentation has costs. Every fragment needs its own IP header, and losing one fragment can prevent the receiver from reassembling the original datagram. Some middleboxes and firewalls handle fragments differently, and fragments can complicate filtering and security inspection. RFC 8900 explains why IP fragmentation is considered fragile and why network designs should avoid depending on it unnecessarily.

Fragmentation is not the same as TCP segmentation. TCP divides a byte stream into segments before IP encapsulation, usually selecting a size that fits the path. IP fragmentation splits an already-created IP packet. Correct MSS and PMTU handling can reduce the need for IP fragmentation.

12. Path MTU Discovery and the black-hole problem

Path MTU Discovery (PMTUD) allows endpoints to learn the largest packet size that can cross a path without fragmentation. In IPv4, classic PMTUD uses the DF flag and ICMP feedback. In IPv6, routers send ICMPv6 Packet Too Big messages when packets exceed the outgoing link MTU.

A PMTU black hole can occur when oversized packets are dropped and the necessary ICMP messages are filtered or fail to reach the sender. Small packets may still work, so a device can resolve DNS, establish some connections or load part of a website while larger transfers stall. The symptom can look like a server, browser or Wi-Fi problem even though the issue is packet size along the path.

Network operators should not indiscriminately block all ICMP. ICMP and ICMPv6 carry operational messages needed for error reporting and diagnostics, including PMTU feedback. Security policy should allow required messages while applying sensible filtering and rate limits. The exact rules depend on network role and threat model.

Modern transports can use techniques such as packetization-layer PMTU discovery to reduce dependence on network-layer ICMP feedback. For datagram transports, RFC 8899 specifies Datagram Packetization Layer PMTU Discovery (DPLPMTUD), which probes packet sizes and can detect black holes without relying solely on Packet Too Big messages. Operators still need to ensure required control messages are not broken and that tunnels, firewalls and load balancers handle packet sizes consistently.

13. How packet loss, latency and reordering affect applications

Packets are affected by queueing, congestion, wireless interference, faulty links, overloaded devices, routing changes and configuration errors. A packet can be delayed, dropped, duplicated or delivered out of order. The impact depends on the application and transport protocol.

TCP generally retransmits missing data and reorders received segments before presenting the byte stream to the application. This improves reliability but can increase delay when loss occurs. A missing portion can temporarily hold back later data in the same stream, a behaviour commonly called head-of-line blocking in TCP.

Real-time audio and video applications often use UDP-based media transport and cannot wait indefinitely for retransmission. They may conceal brief losses, use forward error correction, adjust bitrate or request a new key frame. High jitter can make packet arrival times uneven even when average latency seems acceptable.

Network speed tests measure throughput under particular conditions; they do not reveal every packet-level problem. A connection may have high download capacity but still perform poorly for gaming or calls if latency, jitter or packet loss is significant. Related TEZZ CONNECT explainers on latency and jitter and packet loss explore those performance symptoms in more detail.

14. How to inspect packets with Wireshark

Wireshark is a widely used packet analyser. It captures traffic from a selected network interface and decodes protocol fields so an analyst can examine how devices communicate. It is useful for learning, troubleshooting and validating network behaviour, but a capture is only a view of traffic visible at the chosen capture point.

A safe first exercise is to capture traffic generated by your own device on a network you are authorised to inspect. Start a capture, load a simple website or run a DNS lookup, then stop the capture and filter for a protocol such as dns, tcp, udp or icmp. Select a packet and expand the Ethernet, IP and transport sections to see how the headers are nested.

Useful display filters include:

  • ip — IPv4 traffic.
  • ipv6 — IPv6 traffic.
  • tcp or udp — transport traffic.
  • icmp or icmpv6 — network control and error messages.
  • tcp.port == 443 — TCP traffic using port 443.
  • ip.addr == 192.0.2.10 — IPv4 packets involving a particular address.
  • tcp.analysis.retransmission — packets Wireshark identifies as TCP retransmissions.

These filters are examples, not a complete diagnosis. A retransmission indication may be caused by capture loss, asymmetric visibility or offload behaviour as well as genuine network loss. Compare captures at appropriate points and correlate packet evidence with device counters, application logs and network telemetry.

Encryption changes what a capture can reveal. HTTPS and other encrypted protocols still expose some outer metadata, such as IP addresses, ports and packet sizes, but the protected application payload is not normally readable. Do not attempt to capture or decrypt other people's private communications. Follow organisational policy, consent requirements and applicable law.

15. Common packet-troubleshooting scenarios

Small requests work, but large transfers stall

Investigate PMTU, tunnel overhead, MSS values and ICMP filtering. Compare packet sizes and look for ICMP fragmentation-needed or Packet Too Big messages. Check whether the failure appears only across a VPN or a particular WAN path.

TCP retransmissions appear frequently

Check physical errors, Wi-Fi signal quality, congestion, queue drops, duplex or speed mismatches on legacy links, and overloaded interfaces. A capture at one endpoint alone may not reveal where the original packet was lost. Compare counters and captures at multiple points when possible.

One application fails while others work

Compare destination addresses, ports, transport protocols, DNS results and packet sizes. A firewall rule, proxy, application-layer gateway or path-specific MTU issue may affect one flow without disrupting all connectivity.

Packets arrive out of order

Look for multipath routing, load balancing, wireless retransmissions or route changes. Some reordering is recoverable, but severe or persistent reordering can affect TCP performance and real-time media quality.

Ping succeeds but a service is unavailable

Ping tests ICMP Echo behaviour, not the availability of every TCP or UDP service. A server may block Echo requests while HTTPS works, or allow ping while its application port is closed. Test the actual service and interpret ICMP results as one diagnostic signal.

16. Security and privacy: packets can reveal more than expected

Packet headers are necessary for communication, but they can also reveal metadata. IP addresses, ports, timing, packet sizes and communication patterns may help an observer infer which services are being used or when devices are active. Encryption protects content, but it does not automatically hide every traffic characteristic.

Firewalls inspect packets and flows according to configured rules. Stateless access control lists may match addresses, protocols and ports. Stateful firewalls also track connection state and can make decisions based on the direction and phase of a flow. Deep packet inspection can examine higher-layer protocol information where it is visible and permitted, but encryption limits access to protected content.

Fragmentation can create security complications because different devices may interpret fragments differently or lack enough information in non-initial fragments to apply the same policy. Modern network equipment uses reassembly, normalisation or fragment filtering strategies, each with operational trade-offs. Security controls should be tested against legitimate application requirements rather than relying on broad assumptions.

Packet captures can contain credentials, session identifiers, personal data or confidential business information, especially when traffic is unencrypted or captured before encryption. Store captures securely, restrict access, minimise retention and remove sensitive data before sharing examples publicly.

17. A practical mental model: follow the packet, not just the app

When a service fails, it is tempting to blame the browser, router or internet provider immediately. A packet-oriented approach breaks the journey into observable steps:

  1. Did the application generate traffic?
  2. Did the host resolve the destination name and choose an IP address?
  3. Did the transport connection begin, or did a UDP datagram leave?
  4. Was the packet sent to the correct local next hop?
  5. Did the first router receive and forward it?
  6. Did the return path deliver responses to the device?
  7. Were packets lost, delayed, fragmented or rejected because of size?
  8. Did the receiving application accept and process the data?

This sequence prevents a common troubleshooting mistake: assuming that a successful result at one layer proves that every layer is healthy. A Wi-Fi association does not prove DNS works. A DNS response does not prove a TCP connection succeeds. A TCP handshake does not prove the application server can complete a request. Each stage needs evidence.

For home users, useful first checks are simple: test another device, compare Wi-Fi with Ethernet, note the symptom before restarting equipment, and check whether the failure affects one service or all services. For network administrators, packet captures and interface counters add precision to those observations.

18. Key takeaways

  • A packet is a structured unit of network-layer data with a header and payload.
  • Frames, IP packets, TCP segments and UDP datagrams belong to different layers.
  • Encapsulation adds headers as data moves down the network stack; decapsulation interprets them at the receiver.
  • Routers forward IP packets between networks and create new link-layer frames for each outgoing link.
  • IPv4 and IPv6 have different header formats and fragmentation rules.
  • MTU describes a link's packet-size limit; PMTU is the smallest effective MTU across a path.
  • TCP MSS describes transport payload size, not the full IP packet size.
  • Packet captures help diagnose loss, retransmission, routing and protocol behaviour, but must be interpreted with context.
  • Encryption protects content while some traffic metadata remains visible.

Once you understand how headers and payloads fit together, network troubleshooting becomes less mysterious. Instead of treating the internet as one invisible connection, you can follow the units of data, identify which layer is responsible and test each part of the journey with evidence.

Frequently asked questions

1. What is a network packet?

A network packet is a formatted unit of data carried by a network-layer protocol. An IP packet contains an IP header and payload; that payload may contain a TCP segment, UDP datagram or another protocol.

2. What is the difference between a packet, frame and segment?

A frame is a link-layer unit such as an Ethernet frame, an IP packet is a network-layer unit, and a TCP segment is a transport-layer unit. The terms describe different protocol layers, although packet is often used informally for several of them.

3. What information is in an IP packet header?

An IP header carries information used for delivery, including source and destination IP addresses, protocol or next-header identification, and fields that support packet length and handling. IPv4 and IPv6 have different header formats.

4. What is packet encapsulation?

Encapsulation is the process of adding protocol headers, and sometimes trailers, around data as it moves down a network stack. For example, application data can be carried inside TCP, then IP, then an Ethernet frame.

5. What is MTU in networking?

Maximum Transmission Unit (MTU) is the largest network-layer packet that a particular link can carry in one unit without link-layer fragmentation. The common Ethernet IP MTU is 1500 bytes, but tunnels and other links can change the usable size.

6. What is the difference between MTU and MSS?

MTU describes the maximum packet size at the IP layer for a link or path. TCP Maximum Segment Size (MSS) describes the maximum TCP payload in a segment and normally excludes the IP and TCP headers.

7. Do IPv4 and IPv6 routers fragment packets?

IPv4 routers may fragment packets when permitted by the Don't Fragment setting. IPv6 routers do not fragment packets in transit; the source can use an IPv6 Fragment header after learning the path MTU.

8. Why can a website partially load because of an MTU problem?

A path MTU discovery failure can cause larger packets to be dropped while smaller packets still pass. This can make some connections stall or certain pages and transfers fail, especially when ICMP Packet Too Big messages are filtered.

9. What does Wireshark show in a packet capture?

Wireshark can decode visible protocol headers and payload fields in captured traffic, such as Ethernet, IP, TCP, UDP, DNS and TLS metadata. Encryption usually prevents it from displaying protected application content without authorised decryption keys.

10. Does every packet travel over the same route?

Not necessarily. Routing can change over time, and packets in a flow may take different paths depending on network design, load balancing, failures and policy. Transport protocols help endpoints handle ordering and loss where required.

Technical references and further reading

Standards describe protocol behaviour; real networks may also depend on vendor implementations, firewall policy, tunnel design and operating-system configuration. Use the relevant standard and current device documentation when making production changes.