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
Stop and Wait Protocol
Stop-and-Wait Protocol kya hota hai?
Stop-and-Wait Protocol ek basic flow control technique hai jo Data Link Layer mein use hoti hai.
Is protocol mein sender ek time par sirf ek frame bhejta hai, aur phir receiver se uska acknowledgment (ACK) aane ka wait karta hai. Jab tak ACK nahi milta, next frame send nahi hota.
Kaise kaam karta hai – Step by Step
-
Sender Frame 0 send karta hai Receiver ko.
-
Sender ACK 0 ka wait karta hai.
-
Jab ACK milta hai, tabhi next Frame 1 bheja jaata hai.
-
Ye process repeat hoti rehti hai.
Diagram: Stop-and-Wait Protocol
Sender Receiver
| |
| -- Frame 0 ------------> |
| |
| <----------- ACK 0 ----- |
| |
| -- Frame 1 ------------> |
| |
| <----------- ACK 1 ----- |
-
Ek samay mein sirf ek frame bheja jaata hai.
-
Sender hamesha ACK milne ka wait karta hai.
Example:
Maan lo sender ko message “ABC” bhejna hai.
Toh ye teen frames mein divide hoga:
-
Frame 0: A
-
Frame 1: B
-
Frame 2: C
Communication aise hoga:
Sender Frame 0 (A) bhejega → ACK 0 ka wait karega
Sender Frame 1 (B) bhejega → ACK 1 ka wait karega
Sender Frame 2 (C) bhejega → ACK 2 ka wait karega
Agar Acknowledgement (ACK) lost ho jaaye toh?
Agar ACK ya data frame lost ho jaye, toh sender kuch time wait karta hai (timeout hota hai) aur phir dobara same frame bhejta hai.
Lost ACK ka Example:
Sender ne Frame 0 bheja
ACK 0 lost ho gaya
Sender wait karta raha... fir timeout ho gaya
Sender ne dobara Frame 0 bheja
Receiver duplicate ko pehchan leta hai aur ACK dobara bhej deta hai
Timeout ka kya role hai?
Sender har frame bhejne ke baad ek fixed time tak ACK ka wait karta hai. Agar us time tak ACK nahi aata, toh sender assume karta hai ki frame ya ACK lost ho gaya aur same frame dobara send karta hai.
Advantages
-
Simple aur reliable protocol hai.
-
Data correct order mein receiver tak pahuchta hai.
Disadvantages
-
Bahut slow hota hai agar distance zyada ho.
-
Sender har frame ke baad idle ho jaata hai jab tak ACK nahi aata.
-
-
Bandwidth ka full use nahi hota, kyunki ek baar mein sirf ek frame send hota hai.
Kahan use hota hai?
Ye protocol directly zyada use nahi hota aaj ke time mein, lekin yahi base banata hai advance protocols ke liye, jaise:
-
Go-Back-N Protocol
-
Selective Repeat Protocol