Transport Layer (TCP IP) - buaamer81/IT130-Networking-Wiki GitHub Wiki

Transport Layer (TCP/IP Model)


πŸ“˜ Overview

The Transport Layer is the second layer in the TCP/IP Model.
Its job is to handle the delivery of data between devices and ensure it reaches the correct application on the correct device.

Think of it as:
β€œThe layer responsible for how data travels from App A on your computer to App B on another device.”


πŸ”§ Key Responsibilities

  • Reliable or Unreliable data delivery
  • Data segmentation and reassembly
  • Flow control (avoiding overload)
  • Error checking
  • Uses Port Numbers to identify applications
  • Provides end-to-end communication

πŸ“¦ Data Unit:

  • Segment β†’ when using TCP
  • Datagram β†’ when using UDP

πŸ” Protocols at the Transport Layer

Protocol Type Characteristics
TCP (Transmission Control Protocol) Reliable Connection-oriented, error correction, ordered delivery
UDP (User Datagram Protocol) Unreliable Connectionless, faster, no error recovery, no order guarantee

🧩 Port Numbers

Port Range Purpose
0 - 1023 Well-known ports (common protocols)
1024 - 49151 Registered ports (custom services)
49152 - 65535 Dynamic / Private ports (temporary use)

Examples:

  • HTTP β†’ Port 80
  • HTTPS β†’ Port 443
  • DNS β†’ Port 53
  • FTP β†’ Port 21

🧠 Real-Life Scenario

Downloading a file from a server:

  • TCP breaks the file into segments.
  • Adds sequence numbers.
  • Ensures segments arrive correctly and in order.
  • Reassembles them on your device.

Streaming a video in real-time:

  • UDP sends video data fast without waiting for acknowledgments.

πŸ§ͺ Troubleshooting at Transport Layer

Issue Possible Cause
Slow connections TCP windowing problems, congestion
Missing or out-of-order data UDP transmission (expected behavior)
Port unreachable Firewall blocking, misconfigured ports
Connection resets TCP errors, wrong app configuration

Tools to troubleshoot:

  • netstat
  • telnet IP port
  • nc (Netcat)
  • Wireshark (analyze TCP handshakes)

πŸ“Š Visual Aids


πŸ” Related Pages


Return to: TCP/IP Model Overview