📡

Understanding PDUs and Network Encapsulation

Mar 19, 2025

Network Data Transmission and Protocol Data Units (PDUs)

Introduction to PDUs

  • PDU (Protocol Data Unit): A unit of data specified in the protocol layer.
  • Transmission Units: Data transferred across the network as a single unit.
  • Ethernet Frames: Send data from one MAC address to another without caring about data content.

Data Encapsulation Across the OSI Model

  • Layer 2 (Data Link): Uses a DLC frame header and trailer.
  • Layer 3 (Network): Utilizes IP headers; doesn't care about internal data (e.g., UDP, TCP).
  • Layer 4 (Transport): Involves TCP or UDP headers.
  • Application Layers (5-7): Application data (e.g., web traffic).

Encapsulation and Decapsulation Process

  • Sending Device:
    • Application data is encapsulated with TCP, IP, and frame headers.
    • Ethernet transmits data across the network.
  • Receiving Device:
    • Decapsulates data by stripping frame, IP, and TCP headers.
    • Application data is then accessed.

Control Flags in Protocol Headers

  • TCP Flags:

    • Examples: SYN, PSH (push), RST (reset), FIN (finish).
    • Control data flow by setting bits in headers.
  • IP Flags:

    • Related to data fragmentation.
    • MTU (Maximum Transmission Unit): Determines packet size across a network.

MTU and Fragmentation

  • Fragmentation:

    • Occurs when packets exceed MTU limits.
    • Involves segmenting data to fit the network's MTU.
    • Fragmentation can slow network throughput.
  • MTU Considerations:

    • Know the MTU value throughout the network.
    • Adjust MTU settings for VPN tunneling or network changes.

Testing MTU with Ping Command

  • Ping Utility: Tests MTU using ICMP packets.
  • Windows Example:
    • Use ping -f for Don't Fragment bit.
    • Use -l to specify packet size.
    • Test against a server like Google's DNS 8.8.8.8.
  • Response Analysis:
    • Successful ping confirms MTU compatibility.
    • Adjust packet size if fragmentation is needed.

Practical Application of MTU

  • Design networks with consistent MTU values.
  • Adjust MTU for different network paths and conditions.
  • Use ping tests to determine optimal MTU settings.