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
Domain Name System (DNS) in Computer Networks
DNS kya hota hai? (What is Domain Name System?)
DNS (Domain Name System) internet ki “Phonebook” jaisa hota hai.
Computers aur routers aapas mein sirf numeric IP Addresses (jaise
142.250.190.46) samajhte hain. Lekin humans ke liye hazaron lambe IP numbers yaad rakhna namumkin hai. Hum aasan readable names yaad rakhte hain jaisethehingineer.comyagoogle.com.DNS ka primary kaam hai human-friendly Domain Names ko machine-usable IP Addresses mein resolve (translate) karna.
DNS Application Layer par kaam karta hai aur queries ke liye UDP Port 53 use karta hai (zone transfers ke liye TCP Port 53 use karta hai).
1. Hierarchical Namespace Structure of DNS
DNS ek distributed, hierarchical database structure use karta hai jo ek inverted tree ki tarah dikhta hai:
[ Root Domain (.) ]
|
+----------------------------+----------------------------+
| | |
[ .com ] [ .org ] [ .in ] <-- TLD (Top-Level Domains)
| | |
[ thehingineer ] [ wikipedia ] [ gov ] <-- Second-Level Domains
| | |
[ www ] [ en ] [ nic ] <-- Subdomains
1. Root Level (Dot .): Tree ka sabse top level. Duniya mein 13 root server logical clusters (A se M tak) hain jo hazaron physical servers par distributed hain.
2. TLD (Top-Level Domain) Servers: Generic TLDs (.com, .org, .net, .edu) aur Country Code TLDs (.in, .uk, .us) ko manage karte hain.
3. Authoritative DNS Servers: Wo actual servers jo kisi specific domain (e.g. thehingineer.com) ke exact IP mapping records store karte hain.
2. DNS Resolution Process: Step-by-Step (How DNS Works)
Jab aap apne browser mein www.thehingineer.com type karte hain, toh IP kaise milta hai?
[ Client Browser ] <--- 1. Query: "IP for thehingineer.com?" ---> [ Local DNS Resolver (ISP/8.8.8.8) ]
|
+-----------------------------------------------------------------------+
|
|---> 2. Query to Root Server (".") ------------> [ Root DNS Server ]
|<--- 3. "I don't know IP, ask .com TLD!" <-------
|
|---> 4. Query to .com TLD Server --------------> [ .com TLD Server ]
|<--- 5. "Ask thehingineer's Authoritative Server"
|
|---> 6. Query to Authoritative Server ---------> [ Authoritative Nameserver ]
|<--- 7. "IP is 104.21.55.2!" ------------------- (Exact IP returned!)
|
[ Client Browser receives IP and connects to Web Server! ]
Recursive vs Iterative Query:
-> Recursive Query: Client apne Local DNS Resolver ko bhejta hai. Client kehta hai: "Mujhe exact IP address laakar do, chahe tumhe kisi se bhi puchna pade!" Resolver saara kaam karta hai.
-> Iterative Query: Local Resolver Root aur TLD servers se karta hai. Server kehta hai: "Mujhe exact answer nahi pata, lekin agle server ka pata yeh raha, khud jakar puch lo!"
3. Common DNS Resource Records (RR Types)
| Record Type | Name / Purpose | Example Value |
|---|---|---|
| A Record | Host Name → IPv4 Address | thehingineer.com → 104.21.55.2 |
| AAAA Record | Host Name → IPv6 Address | thehingineer.com → 2606:4700:3033::6815:3702 |
| CNAME Record | Canonical Name (Alias name) | www.thehingineer.com → thehingineer.com |
| MX Record | Mail Exchange (Email Server) | thehingineer.com → mail.google.com (Priority 10) |
| NS Record | Authoritative Name Server | thehingineer.com → ns1.cloudflare.com |
| TXT Record | Text verification (SPF, DKIM) | "v=spf1 include:_spf.google.com ~all" |
DNS Caching and TTL
Agar har web click par browser root aur TLD servers se puchne lagega, toh internet par bohot zyada traffic aur delay ho jayega. Isliye DNS Caching use karta hai:
Browser, Operating System (OS DNS Cache), aur Local Wi-Fi router resolved IP ko store kar lete hain.
TTL (Time to Live): Batata hai ki DNS record cache memory mein kitne seconds tak valid rahega (e.g., TTL = 3600 seconds = 1 ghanta). TTL expire hone ke baad hi naya query execute hota hai.
Summary Table
| DNS Parameter | Value |
|---|---|
| Port Number | Port 53 (UDP for client queries, TCP for zone transfer). |
| Hierarchy | Root Domain (.) → TLD (.com) → Authoritative Server. |
| Key Records | A (IPv4), AAAA (IPv6), CNAME (Alias), MX (Mail Exchange). |