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
Process-to-Process Delivery, Ports, and Sockets in Computer Networks
Process-to-Process Delivery kya hoti hai?
Network communication teen levels par hoti hai:
- Node-to-Node Delivery (Data Link Layer): Frame ko ek cable ke ek sire se doosre sire tak pahunchana (using MAC Address).
- Host-to-Host Delivery (Network Layer): Packet ko source computer se destination computer tak pahunchana (using IP Address).
- Process-to-Process Delivery (Transport Layer): Packet ko computer ke andar chal rahe specific running program (Process) tak deliver karna (using Port Address).
Ek operating system mein hazaron programs (processes) chal sakte hain. Jab koi message aata hai, toh Transport layer use sahi program (jaise browser tab ya WhatsApp app) tak route karti hai.
1. Port Numbers (Service-Point Addressing)
Har running application process ko identify karne ke liye ek 16-bit integer use hota hai jise Port Number kehte hain.
Port numbers ki total range
0se65,535(yani2^16 - 1) hoti hai.IANA (Internet Assigned Numbers Authority) ne port numbers ko teen ranges mein divide kiya hai:
| Port Category | Range | Description aur Popular Examples |
|---|---|---|
| Well-Known Ports | 0 – 1023 | Standard server services ke liye permanently assigned: – Port 20, 21: FTP (File Transfer) – Port 22: SSH (Secure Shell) – Port 25: SMTP (Email sending) – Port 53: DNS (Domain Name Resolution) – Port 80: HTTP (Web unencrypted) – Port 443: HTTPS (Web encrypted) |
| Registered Ports | 1024 – 49,151 | Specific software vendors ya user processes dwara IANA se register karwaye gaye ports (e.g., MySQL: 3306, MongoDB: 27017). |
| Dynamic / Private (Ephemeral) Ports | 49,152 – 65,535 | Temporary client-side ports jo OS browser ya app ko session ke duration ke liye dynamically allocate karta hai. Session close hote hi release ho jaate hain. |
2. Sockets aur Socket Address
Akela IP Address sirf device identify kar sakta hai, process nahi. Aur akela Port Number sirf process identify kar sakta hai, internet par device nahi.
Isliye dono ko jodkar ek unique global address banaya jaata hai jise Socket Address kehte hain:
Socket kya hota hai? (Network Endpoint):
Socket do network devices ke beech bidirectional communication channel ka software endpoint (doorway) hota hai. Ek connection hamesha ek Socket Pair (Source Socket + Destination Socket) se define hota hai:
Multiplexing and Demultiplexing
[ Browser (Port 52140) ] [ Spotify (Port 53200) ] [ WhatsApp (Port 54110) ]
\ | /
+------------------------+------------------------+
|
[ Multiplexing at Transport Layer ] <-- Appends Source/Dest Ports
|
[ Single Network Layer (IP) ]
|
( The Internet )
|
[ Single Network Layer (IP) ]
|
[ Demultiplexing at Transport Layer ] <-- Checks Dest Port
+------------------------+------------------------+
/ | \
[ Web Server (Port 443) ] [ Audio Server (Port 4070) ] [ Chat Server (Port 5222) ]
-> Multiplexing (Sender Side): Ek hi computer par multiple application processes ke data chunks ko collect karke, unpar respective port headers lagakar ek single IP stream mein transmit karna.
-> Demultiplexing (Receiver Side): Incoming packet ke header mein Destination Port Number check karke data ko theek usi specific running process ke socket buffer mein deliver karna.
Summary Table
| Addressing Concept | Summary Punchline |
|---|---|
| Port Number | 16-bit integer (0 to 65535) identifying a running process. |
| Socket | Combination of IP Address + Port Number. Acts as communication endpoint. |
| Well-Known Ports | 0 to 1023 (HTTP: 80, HTTPS: 443, DNS: 53, SSH: 22). |