V9
Velocity9
Computer Network
Documentation

TCP, UDP, and FTP in Computer Networks

Simple notes explaining TCP, UDP, and FTP protocols with examples and easy-to-understand concepts.

🌐 TCP, UDP, and FTP β€” Computer Networks (Simple Notes)


βš™οΈ What Are Network Protocols?

Network protocols are rules that define how data is sent and received between devices in a network.
They ensure that all systems communicate properly and data reaches safely and accurately.

Three common protocols are:

  • TCP (Transmission Control Protocol)
  • UDP (User Datagram Protocol)
  • FTP (File Transfer Protocol)

πŸ”Ή TCP (Transmission Control Protocol)

🧠 What is TCP?

TCP is a connection-oriented protocol that ensures reliable data transfer between devices.
It means a connection is first established before data is sent, and every packet is checked to ensure it arrives correctly.

βš™οΈ Main Features

  • Reliable: Guarantees data delivery without loss or duplication.
  • Connection-Oriented: A handshake (connection setup) happens before data transfer.
  • Error Checking: Ensures data integrity using acknowledgment (ACK).
  • Ordered Delivery: Data packets arrive in the correct order.
  • Flow Control: Manages data speed to prevent congestion.

🧩 Process

  1. Connection Establishment: Using 3-way handshake (SYN, SYN-ACK, ACK).
  2. Data Transfer: Data is divided into segments and sent.
  3. Connection Termination: Connection ends after successful delivery.

πŸ’‘ Example

Used for:

  • Web browsing (HTTP/HTTPS)
  • Email (SMTP, IMAP, POP3)
  • File transfers (FTP)

πŸ”Ή UDP (User Datagram Protocol)

🧠 What is UDP?

UDP is a connectionless protocol used for fast and simple data transfer where reliability is not a major concern.
It does not check if data is received or not β€” this makes it faster but less reliable.

βš™οΈ Main Features

  • Unreliable but Fast: No acknowledgment, so no delays.
  • Connectionless: No setup before sending data.
  • No Flow Control or Error Recovery: If data is lost, it’s not resent.
  • Low Overhead: Ideal for real-time communication.

πŸ’‘ Example

Used for:

  • Video streaming
  • Online gaming
  • Voice calls (VoIP)
  • DNS queries

πŸ”Ή FTP (File Transfer Protocol)

🧠 What is FTP?

FTP is a standard protocol for transferring files between computers over a network.
It uses TCP to provide reliable communication between a client and a server.

βš™οΈ How It Works

  • Users connect to an FTP server using a username and password.
  • Once connected, they can upload, download, delete, or rename files.
  • Uses two TCP connections:
    • Control Connection (Port 21): For sending commands.
    • Data Connection (Port 20): For transferring files.

πŸ’‘ Example

Used for:

  • Uploading websites to a server.
  • Downloading software or large files.
  • Backing up data on remote servers.

πŸ”— Difference Between TCP and UDP

FeatureTCPUDP
TypeConnection-orientedConnectionless
ReliabilityReliableUnreliable
SpeedSlowerFaster
Error CheckingYesNo
Order of PacketsMaintainedNot guaranteed
Use CasesWeb, Email, FTPGames, Streaming, DNS

πŸ“˜ Summary

ProtocolFull FormTypePurposeExamples
TCPTransmission Control ProtocolReliableTransfers data with accuracyHTTP, HTTPS, FTP
UDPUser Datagram ProtocolUnreliable but FastReal-time data transferGaming, Streaming, VoIP
FTPFile Transfer ProtocolTCP-basedFile uploading/downloadingWeb servers, File sharing

βœ… In short:

  • TCP ensures accurate and ordered delivery.
  • UDP sends data quickly without checking reliability.
  • FTP helps transfer files using TCP for secure communication.

Need help with this topic?