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
IP Addressing, Subnetting, and Supernetting in Computer Networks
IP Address kya hota hai? (What is an IP Address?)
IP Address (Logical Address) ek unique numeric identifier hota hai jo internet ya local network se jude har device (computer, phone, router) ko assign kiya jaata hai.
IP address do parts se milkar banta hai: Network ID (NetID) jo batata hai device kis network mein hai, aur Host ID (HostID) jo us specific network ke andar particular device ko identify karta hai.
Real-life analogy: Network ID shehar ka pin-code jaisa hai, aur Host ID colony ke andar aapke ghar ka house number hai.
1. Classful IP Addressing
Shuruat mein IPv4 addresses (32-bit) ko 5 classes mein classify kiya gaya tha:
| Class | IP Range | NetID / HostID | Default Subnet Mask | Use Case |
|---|---|---|---|---|
| Class A | 1.0.0.0 – 126.255.255.255 | 8 bits NetID / 24 bits HostID | 255.0.0.0 (/8) | Very large networks (16 million hosts per network). |
| Class B | 128.0.0.0 – 191.255.255.255 | 16 bits NetID / 16 bits HostID | 255.255.0.0 (/16) | Medium to large organizations (65,534 hosts). |
| Class C | 192.0.0.0 – 223.255.255.255 | 24 bits NetID / 8 bits HostID | 255.255.255.0 (/24) | Small networks (254 hosts per network). |
| Class D | 224.0.0.0 – 239.255.255.255 | No NetID / HostID | N/A | Multicasting applications. |
| Class E | 240.0.0.0 – 255.255.255.255 | No NetID / HostID | N/A | Experimental and Research purposes. |
Note: 127.0.0.0 se 127.255.255.255 range Loopback testing (localhost) ke liye reserved hoti hai.
2. Subnetting kya hai? (Dividing a Large Network)
Subnetting ek bade physical network ko do ya do se zyada chote logical sub-networks (Subnets) mein divide karne ki process hai.
Subnetting kyu karte hain?
- Address wastage rokne ke liye.
- Network traffic aur broadcast storm ko control karne ke liye.
- Security aur network management improve karne ke liye (HR department aur Engineering department ko alag subnets mein rakhna).
Subnetting kaise hoti hai?
Subnetting mein hum Host ID ke bits ko borrow karke unhe Subnet ID banate hain.
Subnetting Example:
Maan lijiye hamare paas Class C network hai: 192.168.1.0/24.
Default mask: 255.255.255.0 (Host bits = 8).
Agar hume is network ko 4 subnets mein divide karna hai:
Hume 4 subnets ke liye bits borrow karni hongi:
2^n >= 4 ===> n = 2 bits.New Subnet Mask: Pehle 24 bits 1 the, ab 2 extra bits 1 ho gaye = 26 bits =
/26.
Binary:11111111.11111111.11111111.11000000= 255.255.255.192.Remaining Host bits =
8 - 2 = 6 bits.
Number of usable hosts per subnet =2^6 - 2 = 64 - 2 = 62 hosts.
(2 addresses minus karte hain: first address = Network ID, last address = Broadcast ID).
3. Supernetting (CIDR – Classless Inter-Domain Routing)
Supernetting Subnetting ka theek ulta hota hai. Isme multiple contiguous chote networks ko aapas mein combine (aggregate) karke ek bada single network banaya jaata hai.
Is technique ko Route Aggregation ya Route Summarization bhi kehte hain.
Fayda: Internet routers ki routing table size bohot choti ho jaati hai kyunki router ko 100 alag-alag routes yaad rakhne ke bajaye sirf 1 single aggregated supernet route store karna padta hai.
Subnetting vs Supernetting Comparison
| Feature | Subnetting | Supernetting |
|---|---|---|
| Core Action | Bade network ko chote subnets mein todna (Splitting). | Chote networks ko jodkar bada network banana (Combining). |
| Mask Effect | Mask bits badhti hain (e.g., /24 se /26). |
Mask bits ghati hain (e.g., chaar /24 networks milkar /22 banate hain). |
| Bits Borrowing | Host bits borrow karke Network bits banayi jaati hain. | Network bits release karke Host bits mein convert hoti hain. |
| Main Objective | IP address wastage rokna aur traffic isolate karna. | Router routing tables ka size reduce karna. |
Summary Table
| Addressing Concept | Exam Formula & Rule |
|---|---|
| Subnets Created | 2^n (jahan n = borrowed bits). |
| Usable Hosts per Subnet | 2^h - 2 (jahan h = remaining host bits). |
| CIDR Notation | Slash notation (e.g. /24 = 24 consecutive 1s in mask = 255.255.255.0). |