Computer Networks Notes (English + Simple Hindi)

Complete guide to networking concepts – click a topic to jump

Topics of Computer Networks

1. Introduction to Computer Networks / कंप्यूटर नेटवर्क का परिचय

English

What is a network? A computer network is a set of devices (nodes) connected by communication links to share resources and information. Networks can be classified by size: PAN, LAN, MAN, WAN.

Key concepts: Data transmission, protocols (rules), addressing, switching, routing.

सरल हिंदी

नेटवर्क क्या है? कंप्यूटर नेटवर्क में कई डिवाइस आपस में जुड़े होते हैं ताकि वे डेटा और संसाधन साझा कर सकें। यह LAN (छोटा क्षेत्र), MAN (शहर), WAN (देश/दुनिया) हो सकता है।

# Basic network commands (Linux/Windows)
ping google.com      # check connectivity
ipconfig / ifconfig  # show IP configuration
↑ Back to Top

2. Network Topologies / नेटवर्क टोपोलॉजी

English

Topology is the arrangement of elements in a network. Common types:

  • Bus: all devices share a single cable. (simple, but single point of failure)
  • Star: all devices connected to a central hub/switch. (common, easy to manage)
  • Ring: each device connected to two others, forming a ring. (data travels in one direction)
  • Mesh: every device connected to every other. (redundant, reliable but expensive)
  • Tree: hierarchical combination of star and bus.

सरल हिंदी

टोपोलॉजी का मतलब है नेटवर्क में डिवाइस कैसे आपस में जुड़े हैं। मुख्य प्रकार: बस (एक केबल), स्टार (हब से जुड़े), रिंग (घेरा), मेश (सभी आपस में), ट्री (पेड़ जैसा)।

// No code, just conceptual diagrams
↑ Back to Top

3. OSI Model (7 layers) / ओएसआई मॉडल

English

The Open Systems Interconnection (OSI) model is a conceptual framework that standardizes network communication into seven layers. Each layer performs specific functions and serves the layer above.

  1. Physical: bits, cables, hubs
  2. Data Link: frames, MAC addresses, switches
  3. Network: packets, IP addresses, routers
  4. Transport: segments, TCP/UDP, reliability
  5. Session: manages sessions
  6. Presentation: encryption, compression
  7. Application: HTTP, FTP, email

सरल हिंदी

OSI मॉडल 7 परतों में बंटा है: फिजिकल (केबल, बिट्स), डेटा लिंक (MAC एड्रेस), नेटवर्क (IP एड्रेस), ट्रांसपोर्ट (TCP/UDP), सेशन, प्रेजेंटेशन, एप्लिकेशन (HTTP)। हर परत ऊपर वाली को सेवा देती है।

// Mnemonic: Please Do Not Throw Sausage Pizza Away
// (Physical, Data Link, Network, Transport, Session, Presentation, Application)
↑ Back to Top

4. TCP/IP Model / टीसीपी/आईपी मॉडल

English

The TCP/IP model is the practical framework used on the internet. It has four layers:

  • Network Access (Link): combines OSI physical + data link
  • Internet: IP, routing (equivalent to OSI network)
  • Transport: TCP, UDP
  • Application: HTTP, FTP, SMTP, DNS (combines OSI session, presentation, application)

सरल हिंदी

TCP/IP मॉडल इंटरनेट पर वास्तव में उपयोग होता है। इसमें 4 परतें: नेटवर्क एक्सेस, इंटरनेट (IP), ट्रांसपोर्ट (TCP/UDP), एप्लिकेशन।

// Example: HTTP (Application) over TCP (Transport) over IP (Internet) over Ethernet (Link)
↑ Back to Top

5. Physical Layer / फिजिकल लेयर

English

Deals with transmission of raw bits over a communication channel. Defines hardware specifications: cables (coaxial, twisted pair, fiber optic), connectors, signaling (voltage levels), data rates, and topology.

सरल हिंदी

यह परत बिट्स (0/1) को भेजने के भौतिक माध्यम से जुड़ी है: केबल, कनेक्टर, वोल्टेज, डेटा रेट।

// Types of cables
- Twisted Pair (Ethernet)
- Fiber Optic (long distance, high speed)
- Coaxial (TV cable)
↑ Back to Top

7. Ethernet / इथरनेट

English

Ethernet is the most common LAN technology. It operates at the physical and data link layers. Uses CSMA/CD (Carrier Sense Multiple Access with Collision Detection) for media access. Modern Ethernet uses switches (full duplex) instead of hubs.

सरल हिंदी

इथरनेट LAN में सबसे ज्यादा इस्तेमाल होने वाली तकनीक है। यह CSMA/CD का उपयोग करता था, अब स्विच के साथ फुल डुप्लेक्स में काम करता है।

// Ethernet frame (simplified)
[Preamble][Destination MAC][Source MAC][Type][Data][CRC]
↑ Back to Top

8. Network Layer (IP) / नेटवर्क लेयर

English

Handles host-to-host delivery and routing. It uses logical addresses (IP addresses) and determines the best path for packets. Key protocols: IP (Internet Protocol), ICMP, ARP, and routing protocols (RIP, OSPF).

सरल हिंदी

यह परत पैकेट को स्रोत से गंतव्य तक पहुँचाने का काम करती है। इसमें IP एड्रेस होता है और रूटिंग तय होती है।

// IP packet header fields (simplified)
[Version][IHL][Type of Service][Total Length][Identification][Flags][Fragment Offset][TTL][Protocol][Header Checksum][Source IP][Destination IP][Options][Data]
↑ Back to Top

9. IPv4 Addressing / IPv4 एड्रेसिंग

English

IPv4 addresses are 32-bit numbers, usually written in dotted decimal (e.g., 192.168.1.1). They have two parts: network and host. Classful addressing (A, B, C, D, E) and classless (CIDR). Subnet mask defines the network portion.

Special addresses: loopback (127.0.0.1), private ranges (10.0.0.0/8, 172.16.0.0/12, 192.168.0.0/16).

सरल हिंदी

IPv4 एड्रेस 32 बिट का होता है, जैसे 192.168.1.1। इसमें नेटवर्क और होस्ट भाग होता है। सबनेट मास्क से पता चलता है कि कितने बिट नेटवर्क के हैं।

// Example: IP 192.168.1.100 with subnet mask 255.255.255.0 (/24)
Network: 192.168.1.0
Broadcast: 192.168.1.255
Hosts: 192.168.1.1 - 192.168.1.254
↑ Back to Top

10. IPv6 / आईपीवी6

English

IPv6 uses 128-bit addresses to overcome IPv4 exhaustion. Written in hexadecimal colon format (e.g., 2001:db8::1). Features: larger address space, simpler header, built-in security (IPsec), autoconfiguration.

सरल हिंदी

IPv6 128 बिट का एड्रेस है, ताकि एड्रेस खत्म न हों। यह हेक्साडेसिमल में लिखा जाता है, जैसे 2001:db8::1।

# IPv6 loopback
::1
↑ Back to Top

11. ARP and ICMP / एआरपी और आईसीएमपी

English

ARP (Address Resolution Protocol): resolves IP address to MAC address on a local network.

ICMP (Internet Control Message Protocol): used for error reporting and diagnostics (e.g., ping uses echo request/reply).

सरल हिंदी

ARP IP एड्रेस से MAC एड्रेस पता करता है। ICMP त्रुटि रिपोर्ट और डायग्नोस्टिक (ping) के लिए।

# View ARP cache
arp -a

# Ping
ping 8.8.8.8
↑ Back to Top

12. Routing Protocols / रूटिंग प्रोटोकॉल

English

Routing protocols determine the best path for packets. Types:

  • RIP (Routing Information Protocol): distance-vector, uses hop count (max 15), slow convergence.
  • OSPF (Open Shortest Path First): link-state, uses Dijkstra algorithm, fast convergence, supports VLSM.
  • BGP (Border Gateway Protocol): path-vector, used between autonomous systems on the internet.

सरल हिंदी

रूटिंग प्रोटोकॉल पैकेट के लिए सबसे अच्छा रास्ता तय करते हैं। RIP (हॉप गिनती), OSPF (लिंक स्टेट), BGP (इंटरनेट पर)।

// Example OSPF configuration (simplified)
router ospf 1
 network 192.168.1.0 0.0.0.255 area 0
↑ Back to Top

13. Transport Layer (TCP/UDP) / ट्रांसपोर्ट लेयर

English

Provides end-to-end communication and data transfer between applications. Two main protocols:

  • TCP (Transmission Control Protocol): connection-oriented, reliable, flow control, error checking, sequencing. Used for HTTP, FTP, SMTP.
  • UDP (User Datagram Protocol): connectionless, unreliable, low overhead. Used for DNS, VoIP, streaming.

सरल हिंदी

TCP कनेक्शन ओरिएंटेड, विश्वसनीय, डेटा सही क्रम में पहुँचाता है। UDP बिना कनेक्शन के, तेज लेकिन बिना गारंटी के।

// Common port numbers
HTTP: 80 (TCP)
HTTPS: 443 (TCP)
DNS: 53 (UDP)
FTP: 21 (TCP)
↑ Back to Top

14. TCP Features (Flow Control, Congestion Control) / टीसीपी विशेषताएँ

English

Flow control: Prevents sender from overwhelming receiver. Uses sliding window protocol (window size advertised by receiver).

Congestion control: Prevents network overload. Algorithms: Slow Start, Congestion Avoidance, Fast Retransmit, Fast Recovery.

सरल हिंदी

फ्लो कंट्रोल: रिसीवर की क्षमता से ज्यादा डेटा न भेजे। कंजेशन कंट्रोल: नेटवर्क में भीड़ न होने दे।

// TCP header fields (simplified)
[Source Port][Destination Port][Sequence Number][Acknowledgment Number][Flags (SYN, ACK, FIN)][Window Size][Checksum][Urgent Pointer][Options][Data]
↑ Back to Top

15. UDP (User Datagram Protocol) / यूडीपी

English

UDP is a simple, connectionless protocol. It has no handshaking, no acknowledgments, no retransmission. Used where speed is critical and some loss is acceptable (streaming, gaming, DNS).

सरल हिंदी

UDP बिना कनेक्शन के डेटा भेजता है, कोई गारंटी नहीं, लेकिन तेज है। जैसे वीडियो स्ट्रीमिंग, DNS।

// UDP header (8 bytes)
[Source Port][Destination Port][Length][Checksum][Data]
↑ Back to Top

16. Application Layer Protocols / एप्लिकेशन लेयर

English

Provides network services to user applications. Common protocols:

  • HTTP/HTTPS: web browsing
  • FTP: file transfer
  • SMTP, POP3, IMAP: email
  • DNS: domain name resolution
  • DHCP: dynamic IP assignment
  • SSH: secure remote login

सरल हिंदी

एप्लिकेशन लेयर में वे प्रोटोकॉल आते हैं जिनका उपयोग यूजर करता है – HTTP (वेब), FTP (फाइल), DNS (नाम से IP), SMTP (ईमेल भेजना), POP3 (ईमेल पढ़ना)।

# Example: HTTP request
GET /index.html HTTP/1.1
Host: www.example.com
↑ Back to Top

17. DNS (Domain Name System) / डीएनएस

English

DNS translates human-friendly domain names (e.g., google.com) to IP addresses. It is a hierarchical, distributed database. Record types: A (IPv4), AAAA (IPv6), CNAME (alias), MX (mail exchange), NS (name server).

सरल हिंदी

DNS डोमेन नाम (जैसे google.com) को IP एड्रेस में बदलता है। यह एक वितरित डेटाबेस है।

# DNS lookup
nslookup google.com
dig google.com
↑ Back to Top

18. HTTP and HTTPS / एचटीटीपी और एचटीटीपीएस

English

HTTP (HyperText Transfer Protocol): used for web communication. Methods: GET, POST, PUT, DELETE. Status codes: 200 OK, 404 Not Found, 500 Internal Server Error.

HTTPS: HTTP over SSL/TLS, encrypts data for security.

सरल हिंदी

HTTP वेब पेज लाने का प्रोटोकॉल है। HTTPS सुरक्षित (एन्क्रिप्टेड) वर्जन है।

// HTTP response example
HTTP/1.1 200 OK
Content-Type: text/html

<html>...</html>
↑ Back to Top

19. Network Security Basics / नेटवर्क सुरक्षा

English

Key security concepts: confidentiality, integrity, availability. Threats: eavesdropping, man-in-the-middle, DoS. Security measures: firewalls, VPNs, encryption (TLS/SSL), authentication.

सरल हिंदी

सुरक्षा में डेटा गोपनीयता, अखंडता और उपलब्धता शामिल है। फायरवॉल, VPN, एन्क्रिप्शन से बचाव करते हैं।

# Firewall rule (iptables example)
iptables -A INPUT -p tcp --dport 22 -j ACCEPT   # Allow SSH
↑ Back to Top

20. Network Devices / नेटवर्क डिवाइस

English

  • Hub: Physical layer, broadcasts data to all ports (inefficient).
  • Switch: Data link layer, uses MAC addresses to forward selectively.
  • Router: Network layer, forwards packets between networks using IP addresses.
  • Bridge: Connects two network segments.
  • Gateway: Connects different network architectures.
  • Modem: Modulates/demodulates signals (digital to analog).

सरल हिंदी

हब – सभी पोर्ट पर डेटा भेजता है। स्विच – MAC एड्रेस से डेटा भेजता है। राउटर – IP एड्रेस से अलग-अलग नेटवर्क को जोड़ता है।

// Router routing table (simplified)
Destination     Gateway         Interface
192.168.1.0     0.0.0.0         eth0
0.0.0.0         192.168.1.1     eth0
↑ Back to Top

21. Wireless Networks (WiFi) / वायरलेस नेटवर्क

English

Wireless LANs use radio waves. IEEE 802.11 standards: a/b/g/n/ac/ax. Security: WEP (broken), WPA2, WPA3. Access points (AP) connect wireless devices to wired network.

सरल हिंदी

वायरलेस नेटवर्क में रेडियो तरंगों का उपयोग होता है। WPA2 सुरक्षा मानक है। एक्सेस प्वाइंट वायरलेस डिवाइस को वायर्ड नेटवर्क से जोड़ता है।

# View wireless networks (Linux)
iwlist wlan0 scan
↑ Back to Top

22. Useful Networking Commands / उपयोगी कमांड्स

English

Essential commands for troubleshooting:

  • ping – test connectivity
  • traceroute / tracert – show path to host
  • ipconfig / ifconfig – IP configuration
  • netstat – network statistics
  • nslookup / dig – DNS lookup
  • arp – ARP cache
  • route – routing table

सरल हिंदी

नेटवर्क समस्या सुलझाने के लिए कमांड्स: ping, traceroute, ipconfig, netstat, nslookup, arp, route.

# Examples
ping -c 4 google.com
traceroute google.com
netstat -an | grep LISTEN
↑ Back to Top