📡

Understanding Protocol Data Units for Networking

May 23, 2025

Data Transfer and Protocol Data Units (PDUs)

Introduction to PDUs

  • A Protocol Data Unit (PDU) is essential for moving data across a network.
  • Sometimes referred to as transmission units, PDUs encapsulate a piece of data for transfer.

Layers of Data Transfer

Ethernet (Layer 2)

  • Data is sent within an Ethernet frame from one MAC address to another.
  • Ethernet does not interpret the data inside the frame; it simply encapsulates it.

IP Layer (Layer 3)

  • IP layer sends data between IP addresses.
  • It encapsulates UDP, TCP, or other data without concern for the content.

Transport Layer (Layer 4)

  • TCP or UDP headers are added to the data from the application layer before sending it.
  • Each layer adds its own header, encapsulating the data further.

Application Layers (Layer 5-7)

  • Application data can include web content, emails, etc.
  • Data is encapsulated in the TCP or UDP header for transfer.

Encapsulation Process

  • Sending Device:
    • Encapsulates application data with TCP header, IP header, and Ethernet frame header.
  • Receiving Device:
    • Decapsulates data by removing headers to access the original application data.

Control Information and Flags in Headers

TCP Header Flags

  • TCP flags indicate how data should be processed:
    • SYN: Synchronizes sequence numbers.
    • PSH: Pushes data to the application without buffering.
    • RST: Resets the connection.
    • FIN: Marks the last packet.

IP Header Flags

  • IP flags mainly deal with data fragmentation, crucial for navigating networks with varying MTUs (Maximum Transmission Units).

Maximum Transmission Unit (MTU)

  • MTU defines the largest packet size that can be sent without fragmentation.
  • Fragmentation can slow down network traffic and increase overhead.
  • MTU values can vary across network hops.

Fragmentation Example

  • If the MTU is set to 16 bytes, sending 44 bytes requires fragmentation into 3 packets.
  • Design Consideration: MTUs are typically set during network design and rarely change.

Testing MTU with Ping Command

  • Use the ping command to determine MTU values:
    • Windows Command: ping -f -l <size> <destination>
    • For example, ping -f -l 1472 8.8.8.8 tests MTU against Google DNS.
  • Adjust the size until the packet can be sent without fragmentation.

Conclusion

  • Understanding PDUs, MTUs, and encapsulation/decapsulation is essential for efficient data transfer in networks.