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
- Connection Establishment: Using 3-way handshake (SYN, SYN-ACK, ACK).
- Data Transfer: Data is divided into segments and sent.
- 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
| Feature | TCP | UDP |
|---|---|---|
| Type | Connection-oriented | Connectionless |
| Reliability | Reliable | Unreliable |
| Speed | Slower | Faster |
| Error Checking | Yes | No |
| Order of Packets | Maintained | Not guaranteed |
| Use Cases | Web, Email, FTP | Games, Streaming, DNS |
π Summary
| Protocol | Full Form | Type | Purpose | Examples |
|---|---|---|---|---|
| TCP | Transmission Control Protocol | Reliable | Transfers data with accuracy | HTTP, HTTPS, FTP |
| UDP | User Datagram Protocol | Unreliable but Fast | Real-time data transfer | Gaming, Streaming, VoIP |
| FTP | File Transfer Protocol | TCP-based | File uploading/downloading | Web 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.
What is a Server? β The Foundation of the Internet and Cloud
Understand what servers are, how they evolved, why we need them, and how cloud computing changed everything.
What is AWS? β The Complete Beginner Guide
Learn what AWS (Amazon Web Services) is, why it became popular, and how it powers modern cloud computing and DevOps.