Open In App

Payload in Computer Networks

Last Updated : 14 Apr, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

During the transmission of data using Internet Protocol from sender to receiver, data is sent in the form of packets. Each packet contains a header and data, which is referred to as payload. Headers are appended to payload for transport and are discarded once they successfully reach their destination. If this payload is malicious it can infect the systems.

Payload length

Payload length is simply the size of actual data being sent in a packet, not including extra information like headers or control data. When data is sent over a network, it’s broken into smaller pieces called packets. Each packet contains two main parts: the header (which holds information about how to route and control data) and the payload (which contains actual data you want to send).

  • Total packet length = Header length + Payload length.
  • Payload length = Total packet length – Header length.
  • The 16-bits size of this field limits its maximum value to 65,535 (64KB), which applies to payload length.

Payload length is important because it indicates the size of useful data that is being transported and can affect network performance and efficiency.

Payload in IPv6 Format

  • IPv6 Header – Fixed size of 40 bytes.
  • Payload – This includes:
    • Any extension headers (optional but important).
    • The upper-layer data (e.g., TCP, UDP, ICMPv6).
    • The application data (like the contents of a web page or an email).

This is the format of the latest IPv6 Header Format. The length of the payload is 16bits.

Payload in IPv4 Format

frame_2995

IPv4 Format

An IPv4 packet is divided into two main parts:

  • Header: Contains metadata and control information such as source and destination IP addresses, protocol type, time-to-live (TTL), and others. Minimum 20 bytes, but can be longer if options are use.
  • Payload: The actual data being transmitted (e.g., HTTP data, file contents, etc.), which follows the header. The rest of the packet, up to a total size of 65,535 bytes.
  • The size of the payload can vary depending on the total size of the packet and the size of the header.


Next Article

Similar Reads