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
ALOHA Protocol: Pure ALOHA and Slotted ALOHA in Computer Networks
ALOHA Protocol kya hai? (What is ALOHA?)
ALOHA pehla Random Access (Multiple Access) protocol tha jise 1970 mein Norman Abramson aur unke colleagues ne University of Hawaii mein design kiya tha.
Iska original maqsad tha Hawaii ke alag-alag islands par sthit computers ko ek common radio broadcast channel ke zariye central mainframe computer se connect karna.
ALOHA protocol ka basic principle bohot straightforward hai: “Transmit whenever you have data.” (Jab bhi station ke paas frame ready ho, bina kisi se puche turant send kar do).
Lekin agar do stations lagbhag ek hi time par frame bhejte hain, toh frames aapas mein takra jaate hain (jise Collision kehte hain) aur data corrupt ho jaata hai.
ALOHA do versions mein exist karta hai: Pure ALOHA aur Slotted ALOHA.
1. Pure ALOHA
Pure ALOHA ek continuous-time, uncoordinated protocol hai. Isme stations ke beech koi time synchronization nahi hota.
Pure ALOHA ka Working Mechanism:
Jab bhi kisi station ke paas frame ready hota hai, wo bina wait kiye turant channel par transmit kar deta hai.
Frame bhejne ke baad station receiver se Acknowledgment (ACK) ka wait karta hai.
Agar fixed timeout period ke andar ACK mil jaata hai, toh transmission successful maana jaata hai.
Agar timeout ho gaya aur ACK nahi mila, toh station assume karta hai ki Collision ho gaya hai. Ab station turant retransmit nahi karta (warna dubara collision hoga), balki ek Random Backoff Time (R) wait karta hai aur fir retransmit karta hai.
Max retransmission attempts limit (e.g. 15) reach hone par frame discard kar diya jaata hai.
Station 1: |--- Frame 1.1 ---| |--- Frame 1.2 ---| Station 2: |--- Frame 2.1 ---| (Collision!) Station 3: |--- Frame 3.1 ---| Time: --------------------------------------------------------------->
Vulnerable Time in Pure ALOHA
Vulnerable Time wo time interval hota hai jisme agar koi doosra station frame transmit shuru kar de, toh collision hona tay hai.
Agar ek frame ka transmission time Tt (Frame Time) hai, toh Pure ALOHA mein vulnerable period hota hai:
Kyu? Kyunki agar koi doosra station frame shuru hone se Tt pehle transmit kare ya frame chalte waqt Tt duration ke andar transmit kare, dono cases mein overlap (collision) ho jayega.
Throughput of Pure ALOHA
Throughput (S) batata hai ki kitne percent frames successfully bina collision ke deliver hote hain:
Jahan G = Total number of frames generated per frame time.
Maximum throughput tab milta hai jab G = 1/2 = 0.5:
S_max = 1 / (2e) ≈ 0.184 (yani sirf 18.4%)
Iska matlab yeh hai ki Pure ALOHA mein maximum sirf 18.4% bandwidth efficiently use hoti hai, baaki 81.6% capacity collisions ki wajah se waste ho jaati hai.
2. Slotted ALOHA
Pure ALOHA ke low throughput (18.4%) ko double karne ke liye 1972 mein Roberts ne Slotted ALOHA develop kiya.
Slotted ALOHA ka Rule:
Total time ko discrete intervals ya Slots mein divide kar diya jaata hai. Har slot ka duration exactly ek frame transmission time
Ttke barabar hota hai.Koi bhi station kabhi bhi beech mein transmit nahi kar sakta. Transmission sirf slot ke beginning (starting boundary) par hi start ho sakti hai.
Agar kisi station ka frame slot ke beech mein generate hota hai, toh use agle slot ke shuru hone ka wait karna padta hai.
Slot Boundaries: | Slot 1 | Slot 2 | Slot 3 | Slot 4 | Station 1: |--Frame 1-- | |--Frame 2-- | | Station 2: |--Frame A-- | | | Station 3: |--Frame B-- | (Collision)| |
Vulnerable Time in Slotted ALOHA
Kyunki transmission sirf slot ke start par hoti hai, isliye agar collision hoga toh sirf un stations ke beech hoga jinhone usi specific slot ke start par ek saath transmit kiya.
Slotted ALOHA ne vulnerable time ko aadha kar diya (2 * Tt se ghatakar Tt kar diya)!
Throughput of Slotted ALOHA
Slotted ALOHA ka throughput formula hai:
Maximum throughput tab milta hai jab G = 1:
S_max = 1 / e ≈ 0.368 (yani lagbhag 36.8%)
Slotted ALOHA ka maximum throughput Pure ALOHA se double (exact 2x) hota hai!
Pure ALOHA vs Slotted ALOHA Comparison
| Parameter | Pure ALOHA | Slotted ALOHA |
|---|---|---|
| Time Synchronization | Continuous time (No clock synchronization required) | Discrete time slots (Global clock synchronization required) |
| Transmission Rule | Kisi bhi waqt transmission start kar sakte hain | Sirf time slot ke shuruat par transmission start ho sakti hai |
| Vulnerable Time | 2 * Tt |
Tt |
| Throughput Formula | S = G * e^(-2G) |
S = G * e^(-G) |
| Maximum Throughput | 18.4% (at G = 0.5) | 36.8% (at G = 1.0) |
| Collision Probability | Bohot zyada (partial collision bhi fatal hota hai) | Pure ALOHA se lagbhag aadhi |
Advantages and Disadvantages
Advantages of ALOHA
-> Extreme Simplicity: Pure ALOHA implement karna bohot aasan hai kyunki na channel sensing chahiye aur na koi central coordinator.
-> Low Delay at Low Load: Jab network par traffic bohot kam hota hai, frame bina kisi delay ke turant chala jaata hai.
Disadvantages of ALOHA
-> Very Low Efficiency: 36.8% maximum efficiency ka matlab hai 63% se zyada bandwidth collisions mein waste hoti hai.
-> No Carrier Sensing: Stations transmit karne se pehle channel ko check nahi karte (“Listen before Talk” nahi karte), isliye collision chance bohot high rehta hai.
Summary Table
| Topic | Summary Point |
|---|---|
| ALOHA Protocol | Pehla random access protocol jo University of Hawaii mein develop hua tha. |
| Pure ALOHA Max S | 18.4% (Vulnerable time = 2 * Tt) |
| Slotted ALOHA Max S | 36.8% (Vulnerable time = Tt) |
| Next Evolution | ALOHA ki collision problem ko door karne ke liye CSMA (Carrier Sense Multiple Access) introduce kiya gaya. |