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
Packet Switching and IP Fragmentation in Computer Networks
Packet Switching kya hoti hai?
Packet Switching ek modern digital network communication method hai jisme continuous data message ko chote-chote blocks mein break kiya jaata hai jinhe Packets kehte hain.
Traditional Circuit Switching (jaise puraane landline telephone) mein baat shuru karne se pehle dedicated physical path reserve karna padta tha jo call khatam hone tak lock rehta tha. Chahe koi kuch na bole, line busy rehti thi.
Packet Switching mein koi dedicated line lock nahi hoti. Alag-alag users ke packets ek hi shared physical cable par dynamically travel karte hain (Statistical Multiplexing). Isse network utilization 10x improve hota hai.
Circuit Switching vs Packet Switching
| Property | Circuit Switching | Packet Switching |
|---|---|---|
| Dedicated Path | Yes (End-to-end dedicated circuit reserved). | No (Packets shared transmission links use karte hain). |
| Bandwidth Wastage | High (Idle communication time mein line waste hoti hai). | Minimal (Bandwidth on-demand share hoti hai). |
| Call Setup Delay | Setup delay required before transmission starts. | No setup delay (Packets turant send ho jaate hain). |
| Packet Dropping | Zero packets dropped (Bandwidth guaranteed). | Packets drop ho sakte hain agar router buffer full ho jaye. |
What is IP Fragmentation?
Har physical network technology (Ethernet, Wi-Fi, Token Ring, Cellular) ka ek maximum packet size hota hai jise wo carry kar sakti hai. Is physical limit ko MTU (Maximum Transmission Unit) kehte hain.
Example: Standard Ethernet ka MTU 1500 Bytes hota hai.
Jab koi router ek aisa IP packet receive karta hai jiska size agle outgoing link ke MTU se bada hai, toh router us packet ko aage forward nahi kar sakta. Router us bade datagram ko chote-chote pieces mein divide kar deta hai — isi process ko IP Fragmentation kehte hain.
Reassembly: In sabhi fragmented packets ko destination host par wapas jod kar original packet banaya jaata hai.
IPv4 Header Fields Used in Fragmentation
IPv4 header mein fragmentation ko manage karne ke liye 3 specific fields hoti hain:
| Field Name | Size | Role aur Function |
|---|---|---|
| Identification (ID) | 16 bits | Source host dwara assign kiya gaya unique number. Ek hi original packet ke sabhi fragments ka ID number same hota hai, taaki destination unhe pehchan sake. |
| Flags | 3 bits |
– Bit 0: Reserved (always 0) – Bit 1 (DF – Don’t Fragment): Agar 1 hai, toh router packet ko fragment nahi kar sakta (drop karke ICMP error bhejega).– Bit 2 (MF – More Fragments): Agar 1 hai, iska matlab yeh last fragment nahi hai, aage aur fragments aa rahe hain. Agar 0 hai, iska matlab yeh aakhiri (last) fragment hai.
|
| Fragment Offset | 13 bits | Batata hai ki yeh particular fragment original datagram ke data mein kahan se shuru hota hai. Iski value 8-byte blocks mein measure hoti hai (Offset = Data Byte Number / 8). |
Step-by-Step Numerical Example (Exam Favorite!):
Maan lijiye ek IP packet ka Total Length 4000 Bytes hai (20-byte IP Header + 3980 bytes Data), aur router ke outgoing link ka MTU 1500 Bytes hai:
Har fragment mein 20-byte ka IP Header lagega, isliye maximum data per fragment =
1500 - 20 = 1480 Bytes(jo 8 se divisible hai: 1480 / 8 = 185).Fragment 1: Data = 1480 Bytes (Bytes 0 to 1479).
Total Length = 1500, MF = 1, Offset = 0 / 8 = 0.Fragment 2: Data = 1480 Bytes (Bytes 1480 to 2959).
Total Length = 1500, MF = 1, Offset = 1480 / 8 = 185.Fragment 3: Remaining Data =
3980 - 2960 = 1020 Bytes(Bytes 2960 to 3979).
Total Length =1020 + 20 = 1040 Bytes, MF = 0 (Last fragment!), Offset = 2960 / 8 = 370.
Summary Table
| Concept | Summary Punchline |
|---|---|
| Packet Switching | Store-and-forward routing of independent packets over shared physical links. |
| MTU | Maximum Transmission Unit (Ethernet standard = 1500 bytes). |
| Fragmentation | Managed by ID, DF/MF Flags, aur 8-byte Fragment Offset. Reassembled at Destination Host. |