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
Routing Algorithms: Static vs Dynamic, Distance Vector, and Link State
Routing kya hota hai? (What is Routing?)
Routing Network Layer ka wo core mechanism hai jiske zariye data packets ko Source se Destination tak pahunchane ke liye sabse optimal, fastest aur shortest path calculate kiya jaata hai.
Network mein hazaron routers interconnected hote hain. Jab kisi router ke paas packet aata hai, toh wo apni Routing Table check karta hai aur packet ko agle router (Next Hop) par forward kar deta hai.
Routing algorithms do broad categories mein divided hote hain: Static (Non-Adaptive) Routing aur Dynamic (Adaptive) Routing.
1. Static vs Dynamic Routing
| Parameter | Static Routing (Non-Adaptive) | Dynamic Routing (Adaptive) |
|---|---|---|
| Route Configuration | Network Administrator dwara routing table mein routes manually enter kiye jaate hain. | Routing protocols (RIP, OSPF, BGP) dwara routes automatically calculate aur update hote hain. |
| Topology Changes | Network topology ya cable cut hone par automatically update nahi hota. Manual intervention chahiye. | Agar koi router down ho jaye, toh naya alternative route automatically calculate kar leta hai. |
| Router Overhead | Zero CPU aur bandwidth overhead (routers ke beech koi routing update packets exchange nahi hote). | CPU aur bandwidth overhead hota hai (regular routing updates aur Dijkstra calculations). |
| Network Size | Small networks (2-5 routers) ke liye best hai. | Large networks aur global Internet ke liye essential hai. |
2. Distance Vector Routing (Bellman-Ford Algorithm)
Distance Vector Routing Bellman-Ford Algorithm par based hai. Iska basic principle hai: “Tell your neighbors about the entire world.”
Har router apni ek Distance Vector (Routing Table) maintain karta hai jisme har destination tak ka Distance (Cost / Metric jaise Hop Count) aur Next Hop (Vector) likha hota hai.
Working: Har router periodically (e.g. har 30 seconds mein) apni poori routing table apne direct padosi (neighbors) ke saath share karta hai. Padosi router apne table ko update karta hai:
D(x, y) = min { c(x, v) + D(v, y) }.
Count to Infinity Problem:
Distance Vector routing ki sabse badi kami Slow Convergence aur Count to Infinity Problem hai. Agar koi link fail ho jaye, toh routers aapas mein loop mein hop count 16 tak badhate rehte hain (16 ko infinity maana jaata hai).
Solutions: Split Horizon, Poison Reverse, aur Hold-down timers.
3. Link State Routing (Dijkstra’s Shortest Path Algorithm)
Link State Routing Dijkstra’s Shortest Path First (SPF) Algorithm par based hai. Iska basic principle hai: “Tell the entire world about your direct neighbors.”
Isme har router sirf apne directly connected links ki information (Link State) ek packet mein pack karta hai jise LSP (Link State Packet) kehte hain.
Working Steps:
- Har router apne neighbors ko discover karta hai (HELLO packets bhej kar).
- Neighbor tak ka delay ya cost measure karta hai.
- LSP packet create karta hai jisme uske sabhi active links aur costs hoti hain.
- Is LSP ko poore network mein Flooding ke zariye broadcast kar deta hai.
- Sabhi routers ke paas pure network ka identical complete topological map (Link State Database – LSDB) ban jaata hai.
- Har router apne local CPU par Dijkstra’s Algorithm run karke destination tak ka shortest path tree calculate karta hai.
Distance Vector vs Link State Routing Comparison
| Feature | Distance Vector Routing | Link State Routing |
|---|---|---|
| Underlying Algorithm | Bellman-Ford Algorithm | Dijkstra’s Algorithm (SPF) |
| Information Shared | Entire routing table share karta hai, lekin sirf direct neighbors ke saath. | Sirf directly connected links ka status share karta hai, lekin pure network mein flood karta hai. |
| Convergence Speed | Slow convergence (Count to Infinity issue). | Fast convergence (No routing loops). |
| Topology View | Router ko sirf padosi ka view pata hota hai (“Routing by Rumor”). | Har router ke paas pure network ka complete accurate map hota hai. |
| Standard Protocol | RIP (Routing Information Protocol) | OSPF (Open Shortest Path First), IS-IS |
Summary Table
| Algorithm | Core Punchline |
|---|---|
| Static Routing | Manual entries, no CPU overhead, rigid to topology failures. |
| Distance Vector | Shares whole table to neighbors. Bellman-Ford based. Simple but slow convergence. |
| Link State | Floods link status to all routers. Dijkstra based. Fast convergence and loop-free. |