Computer Networks
🌐 1. Introduction to Computer Networks
● Computer Network:
Think of it like a road network where vehicles (data) travel between cities
(computers). The roads are wires, WiFi signals, fiber optics, etc.
● Distributed Systems:
Imagine a group project where work is divided — one friend makes the slides, another
writes the report, someone else speaks. Distributed systems = different computers doing
different parts of a bigger task.
● Classification of Networks:
1. PAN: Personal Area Network (like Bluetooth with your earphones)
2. LAN: Local Area Network (college WiFi)
3. MAN: Metropolitan Area Network (City-wide WiFi)
4. WAN: Wide Area Network (Internet)
● Layered Architecture (Preliminaries):
Like cooking a pizza:
1. Dough → 2. Sauce → 3. Toppings → 4. Cheese → 5. Bake.
Each step depends on the previous, but you don't see the dough once
the pizza is ready — similarly, network layers hide complexity from each
other.
🔌 2. Data Communication Components
● Representation of Data and Flow:
Sending data is like sending a message in a bottle — you encode your message (put
it in a bottle) and send it (throw it in the river).
● Connection Topologies:
○ Star: All friends meet at a coffee shop.
○ Ring: Pass the message in a circle.
○ Bus: Everyone talks to each other on the same group chat.
○ Mesh: Everyone can call everyone directly.
🔔 Memory Trick: Think "Coffee shop = Star" 🌟
● Protocols and Standards:
Think traffic rules — red light = stop, green light = go. Protocols = communication
rules, Standards = agreed rules across the world.
● OSI Model:
7 Layers =
(From bottom to top: Physical, Data Link, Network, Transport, Session, Presentation,
Application)
🔔 Memory Trick: "Please Do Not Throw Sausage Pizza Away"
● Transmission Media:
○ Wired: Fiber optic cable = express highway.
○ Wireless: WiFi = airplanes flying in the sky.
🧩 3. Network Topology and Bandwidth
● LAN Types:
○ Wired LAN = Ethernet (your hostel's wired connection)
○ Wireless LAN = WiFi
○ Virtual LAN (VLAN) = Like creating mini-groups inside your WhatsApp —
separation inside a big network.
● Bandwidth Utilization Techniques:
○ Frequency Division Multiplexing (FDM): Like different FM radio channels.
○ Time Division Multiplexing (TDM): Each person gets to speak one by one —
time slots.
○ Wave Division Multiplexing (WDM): Using different colors of light on a fiber
cable.
● Spread Spectrum:
Instead of shouting your secret at once, you whisper it slowly and scatter it over time so
others can't easily catch it.
4. Data Link Layer and Medium Access Sublayer
● Error Detection/Correction:
○ Block Coding: Add a simple checksum.
○ Hamming Distance: The minimum number of single-bit changes to turn
one codeword into another. Think of how many spelling errors you
need to fix "hatt" → "hat".
● Protocols:
○ Stop and Wait: Send a parcel, wait for acknowledgment.
○ Go-back-N ARQ: Send multiple parcels but if one is broken, resend from that
point.
○ Selective Repeat ARQ: Only resend the missing parcel.
○ Sliding Window: Imagine sending 5 letters one after another without waiting for
each acknowledgment — sliding window moves forward as you get
confirmations.
● Multiple Access Protocols:
○ Pure ALOHA: Throw the ball anytime (might collide).
○ Slotted ALOHA: Only throw during your turn.
○ CSMA/CD: Listen before talking (Ethernet).
○ CSMA/CA: Shout "Is anyone speaking?" before talking (WiFi).
5. Network Layer
● Switching:
Like how trains switch tracks at a station to reach their destination.
● Logical Addressing:
○ IPv4: 192.168.1.1 (4 blocks)
○ IPv6: New version, longer addresses for future (because IPv4 is exhausted).
● Address Mapping:
○ ARP: "Who has this IP? Give me MAC address!"
○ RARP: "I have MAC! Tell me my IP!"
○ BOOTP: Bootstrapping — basic IP assignment.
○ DHCP: Dynamic assignment of IP addresses (plug and play internet).
● Routing:
○ Delivery: Sending data.
○ Forwarding: Finding the right path.
○ Unicast: Sending to one computer.
📦 6. Transport Layer
● Process-to-Process Communication:
Just like calling a friend inside a big building, not just reaching the building!
● Protocols:
○ UDP: "Fire and Forget" — no guarantee (like SMS).
○ TCP: Handshake and guaranteed delivery (like calling someone).
○ SCTP: Better handling of multiple streams at once.
● Congestion Control:
Like putting speed breakers when too many cars rush into a highway.
● Leaky Bucket Algorithm:
Imagine a bucket with a small hole — water (data) leaks at a fixed rate.
● Token Bucket Algorithm:
You can send burst data but only if you collected enough tokens.
🧠 7. Application Layer
● DNS: Like a phonebook — converts website name to IP.
● DDNS: Dynamic DNS — automatic updates.
● TELNET: Remote login (old-school remote control).
● EMAIL, FTP, WWW, HTTP:
○ Email: Digital letters.
○ FTP: Moving files (like Google Drive).
○ WWW: Collection of all websites.
○ HTTP: Protocol for web browsing.
● SNMP: Managing devices like routers.
● Bluetooth: Short-range wireless communication.
● Firewalls: Security guards at the network gate.
🔐 8. Network Security and Cryptography
● Electronic Mail, Directory Services:
Email = Gmail,
Directory services = like Yellow Pages — finding contact details of computers.
● Cryptography:
Like locking your letter in a secret box so only the intended receiver can open.
🚀 Quick Flash Memory Cheats:
● OSI: "Please Do Not Throw Sausage Pizza Away"
● Topology:
○ Coffee Shop → Star
○ Group Chat → Bus
○ Circle Game → Ring
○ Everyone Calling Everyone → Mesh
● Error Control:
Stop-and-Wait → Like sending couriers one at a time.
● Multiplexing:
Radio = FDM, Time-sharing = TDM, Fiber-optic colors = WDM