Computer Networks
CN Part-1
- What is a Computer Network?
- Goals and Applications of Computer Networking
- Computer Network Components
- Types of Computer Networks
- Network Topology
- Difference between Client Server and Peer to Peer Network
- Layered Architecture in Computer Networks
- Protocol Hierarchy in Computer Networks
- Interfaces and Services in Computer Networks
- Connection Oriented and Connectionless Services
- Service Primitives
- OSI Model
- TCP/IP Model
- Difference between OSI Model and TCP/IP Model
- Encapsulation and Decapsulation in Computer Networks
- Queueing Models in Computer Network
CN Part-2
- Physical Layer in Computer Networks
- Transmission Media in Computer Networks
- Analog and Digital Signals
- Data Rate and Bandwidth
- Encoding Techniques
- Multiplexing in Computer Networks
- Transmission Modes in Computer Networks
- Data Link Layer
- Framing in Data Link Layer
- Flow Control in Data Link Layer
- Error Control in Data Link Layer
- Error Detection and Correction in Computer Networks
- Stop and Wait Protocol
- Sliding Window Protocol
- SDLC(Synchronous Data Link Control) Protocol
- High-Level Data Link Control (HDLC) Protocol
- Point-to-Point Protocol (PPP)
CN Part-3
- MAC Sublayer and MAC Addressing
- Channel Allocation Methods
- ALOHA Protocol (Pure and Slotted ALOHA)
- CSMA/CD and CSMA/CA in Computer Networks
- Ethernet (IEEE 802.3)
- Wireless LANs (IEEE 802.11, Wi-Fi, and Bluetooth Basics)
- Network Layer and Design Issues
- IPv4 and IPv6 Protocols
- Addressing: IP Address, Subnetting, and Supernetting
- Routing Algorithms: Static vs Dynamic, Distance Vector, and Link State
- Routing Protocols: RIP, OSPF, and BGP
- Packet Switching and IP Fragmentation
- Network Layer Protocols: ICMP, ARP, RARP, DHCP, and NAT
CN Part-4
- Transport Layer and Functions
- Process-to-Process Delivery, Ports, and Sockets
- TCP Segment and Three-Way Handshake Connection Establishment
- UDP (User Datagram Protocol): Format and Features
- Flow Control and Error Control in Transport Layer
- Congestion Control: Leaky Bucket, Token Bucket, and TCP Congestion Control
CN Part-5
- Application Layer Architecture and Principles
- Domain Name System (DNS)
- Email Protocols: SMTP, POP3, and IMAP
- File and Web Protocols: FTP, HTTP, and HTTPS
- Remote Access Protocols: Telnet and SSH
- World Wide Web (WWW) and Web Architecture
- Network Security Basics: SSL, TLS, and Cryptography Fundamentals
File and Web Protocols: FTP, HTTP, and HTTPS in Computer Networks
Overview: Data Sharing on the Internet
Internet par information exchange ke do sabse common use cases hain: Files transfer karna (FTP) aur Web pages access karna (HTTP/HTTPS).
Yeh sabhi Application Layer protocols reliable transport ke liye TCP par rely karte hain.
1. FTP (File Transfer Protocol)
FTP ek standard client-server protocol hai jo ek host se doosre host par computer files upload aur download karne ke liye use hota hai (RFC 959).
Two-Connection Architecture (Exam High-Yield!):
FTP ki sabse unique baat yeh hai ki yeh do alag-alag parallel TCP connections use karta hai:
Client FTP Server | | |====== 1. Control Connection (Port 21 - Commands/Login) =====>| (Out-of-band: Stays OPEN throughout session) | | |<===== 2. Data Connection (Port 20 - Actual File Transfer) ==>| (In-band: Opens per file & CLOSES when file finishes) | |
A. Control Connection (Port 21): Commands (USER, PASS, LIST, RETR) aur server responses ke liye. Poore session ke dauran hamesha open rehta hai.
B. Data Connection (Port 20): Actual file bytes ko transfer karne ke liye. Har file transfer shuru hone par open hota hai aur file khatam hote hi close ho jaata hai.
(Control information ko data stream se alag rakhne ki is property ko Out-of-Band Control kaha jaata hai).
2. HTTP (HyperText Transfer Protocol)
HTTP World Wide Web (WWW) ka foundation protocol hai, jiska use web servers se HTML web pages, images, stylesheets aur APIs fetch karne ke liye hota hai (RFC 2616).
Port 80 par TCP connection establish karta hai.
Core Properties:
- Request-Response Model: Client HTTP Request bhejta hai, server HTTP Response return karta hai.
- Stateless Protocol: Server har request ko completely independent maanta hai aur purani requests ka koi record nahi rakhta. Sessions maintain karne ke liye Cookies aur Tokens use hote hain.
Common HTTP Methods:
GET(data read karna),POST(data submit karna/form fill),PUT(update karna),DELETE(remove karna).HTTP Status Codes:
200 OK,301 Moved Permanently,404 Not Found,500 Internal Server Error.
3. HTTPS (HyperText Transfer Protocol Secure)
HTTP ka sabse bada drawback yeh tha ki saara data (passwords, credit card numbers, chats) Plaintext mein network par travel karta tha. Koi bhi hacker Wi-Fi par packet sniffing karke aapka password chura sakta tha (Man-in-the-Middle Attack).
Is security problem ko solve karne ke liye HTTPS banaya gaya:
HTTPS communication start hone par TLS Handshake karta hai jisme:
- Server Authentication: Server apna digital certificate show karta hai taaki client verify kar sake ki wo genuine website se baat kar raha hai.
- Encryption: Asymmetric cryptography ke through ek symmetric session key exchange hoti hai. Iske baad saara data strong AES encryption ke saath travel karta hai.
- Data Integrity: Hashing (SHA-256) use hoti hai jisse koi beech mein web page content ko modify na kar sake.
HTTP vs HTTPS Comparison Table
| Feature | HTTP | HTTPS |
|---|---|---|
| Security & Encryption | Unencrypted Plaintext (Insecure). | Encrypted using SSL/TLS (Highly Secure). |
| Default Port | TCP Port 80 | TCP Port 443 |
| Digital Certificate | Not required. | SSL/TLS Certificate issued by a CA required. |
| Browser Icon | “Not Secure” warning indicator. | Secure Padlock icon. |
| Performance | Fast (zero encryption overhead). | Minor cryptographic handshake latency (modern HTTP/2 & HTTP/3 optimize this). |
Summary Table
| Protocol | Ports | Summary |
|---|---|---|
| FTP | 21 (Control), 20 (Data) | Dual TCP connections: Out-of-band commands on 21, raw file data on 20. |
| HTTP | Port 80 | Stateless request-response web protocol over plaintext TCP. |
| HTTPS | Port 443 | Encrypted HTTP over TLS providing Confidentiality, Integrity, and Authentication. |