← Home
🖥️ 🔌 📡

Networking Concepts
Made Simple

Learn OSI layers, IP addressing, routing protocols, and subnetting — explained with everyday analogies, no jargon overload.

📻 CSMA/CD 🗂️ OSI 7 Layers 🏠 IP Addresses 🗺️ Routing
1
Ethernet & CSMA/CD
How computers share a cable without crashing into each other
🎙️
Real-world analogy
Imagine a meeting room where anyone can speak, but only one person at a time. The rules: listen before you talk (Carrier Sense), anyone can talk when it's quiet (Multiple Access), and if two people start at the same time, both stop and try again later (Collision Detection). That's exactly how Ethernet worked on shared cables.

How CSMA/CD Works — Step by Step

💡
CSMA/CD is history in modern networks! Today we use switches that give each device a private full-duplex connection — there's no shared cable, so collisions are impossible. CSMA/CD only existed on old shared hubs (pre-2000s).
📏 Key Numbers to Know
  • MIN
    Minimum frame: 64 bytesEnsures the sender is still transmitting when a collision might arrive from the far end of the cable.
  • MAX
    Maximum frame: 1518 bytesPrevents one device from hogging the cable. Jumbo frames extend this to 9000 bytes on modern gear.
  • JAM
    JAM signal: 32 bitsSent after collision detection to ensure all devices hear the collision notification.
⚡ Hub vs. Switch
Hub (Old)Switch (Modern)
CollisionsYesNo
CSMA/CDNeededNot needed
ModeHalf-duplexFull-duplex
BandwidthSharedDedicated
2
The OSI 7-Layer Model
A universal language for network communication
✉️
Real-world analogy — Sending a letter
Sending data over a network is like sending a physical letter. You write the content (Application), translate it to a language both parties understand (Presentation), open a conversation session (Session), break it into pages (Transport), address the envelope (Network), put it in a mailbox (Data Link), and a mail truck physically delivers it (Physical).

All 7 Layers with Simple Explanations

7
👤
Application
What the user sees Your web browser, email client, Skype — HTTP, DNS, FTP, SMTP, SSH
6
🔄
Presentation
Translation & encryption Converts data formats, encrypts/decrypts — TLS/SSL, JPEG, MP4
5
🤝
Session
Manages the conversation Starts, maintains, and ends sessions — NetBIOS, RPC, SQL sessions
4
📦
Transport
Reliable delivery between apps TCP (reliable, ordered) · UDP (fast, no guarantees) — uses port numbers
3
🗺️
Network
Finds the path (routing) IP addresses, routers — IPv4, IPv6, ICMP · "Which road to take?"
2
🔗
Data Link
Hop-to-hop delivery MAC addresses, switches — Ethernet, Wi-Fi, VLANs · "Next door delivery"
1
🔌
Physical
The actual wire & signals Cables, fiber, radio waves, voltages — RJ-45, fiber optic, Wi-Fi antenna

OSI vs TCP/IP — What's the Difference?

The OSI model is a theoretical reference used to understand networking. TCP/IP is the real-world implementation the internet actually uses. TCP/IP collapses OSI's 7 layers into 4 practical ones:

TCP/IP LayerOSI EquivalentWhat it does (simply)Example protocols
Application L7 + L6 + L5 Everything the user/app needs HTTP, DNS, SMTP, SSH
Transport L4 Gets data to the right app (ports) TCP, UDP
Internet L3 Routes packets across networks IPv4, IPv6, ICMP
Network Access L2 + L1 Physically sends bits on the wire Ethernet, Wi-Fi
💡
Memory trick for OSI layers: "Please Do Not Throw Sausage Pizza Away" → Physical, Data Link, Network, Transport, Session, Presentation, Application
3
Network Topologies
How devices are connected to each other
✈️
Hub-and-Spoke analogy
Like an airport hub! If you fly from Bucharest to Porto, you usually connect through a hub (London, Paris). All routes go through the center.
HUB CENTER Branch Branch Branch Branch Branch Branch
🌟 Hub-and-Spoke
  • Links neededN − 1 (6 nodes = 5 links)
  • Traffic pathAlways goes through center hub
  • Single point of failureYes — hub fails = everything down
  • CostCheap — fewer cables
  • Real exampleBranch offices connecting to HQ via VPN
🕸️
Full Mesh analogy
Like a group chat where everyone can talk directly to everyone else — no middleman needed. Maximum connections, maximum cost.
Site A Site B Site C Site D Site E Site F
🕸️ Full Mesh
  • Links neededN×(N−1)÷2 (6 nodes = 15 links!)
  • Traffic pathDirect path between any two sites
  • Single point of failureNone — highly redundant
  • CostExpensive — grows exponentially
  • Real exampleCore routers in a data center backbone
4
IP Addressing — IPv4 & IPv6
The address system of the internet
🏠
Real-world analogy
An IP address is like a postal address for your computer. The network part is like your city/street name, and the host part is like your house number. Routers are like post offices — they read the address and forward mail in the right direction.

IPv4 — The 32-bit address

An IPv4 address is 32 bits long, written as 4 numbers (called octets) separated by dots. Each number ranges from 0 to 255.

Example: 192.168.1.100 — this is made of 4 octets: 192 · 168 · 1 · 100

The 5 Address Classes

Class A1 – 126
Class B128 – 191
Class C192 – 223
DMulticast
EReserved
ClassRange (1st number)Default maskMax hostsUsed for
Class A 1 – 126 /8 → 255.0.0.0 ~16 million Big companies (IBM got 9.x.x.x)
Class B 128 – 191 /16 → 255.255.0.0 ~65,000 Universities, medium orgs
Class C 192 – 223 /24 → 255.255.255.0 254 Small offices, home networks
Class D 224 – 239 N/A N/A Multicast (video streaming, routing)
Class E 240 – 255 N/A N/A Reserved for future / research
🏠 Private IP Ranges (RFC 1918)

These are "home addresses" — free to use inside your network, but not routable on the internet. Your home router's NAT translates them to a public IP.

  • Class A range10.0.0.0 / 8
  • Class B range172.16.0.0 / 12
  • Class C range192.168.0.0 / 16
  • Loopback127.0.0.1 (your own PC)
  • APIPA / link-local169.254.x.x (no DHCP)
🌍 IPv6 — The New Standard

IPv4 is running out of addresses (~4 billion total). IPv6 has 128-bit addresses — enough for every grain of sand on Earth to have trillions of IPs.

  • Format2001:0db8::1
  • Total addresses340 undecillion!
  • Loopback::1 (same as 127.0.0.1)
  • Link-localfe80::/10 (auto-assigned)
  • No broadcastUses multicast instead
4b
Subnetting
Splitting a network into smaller pieces
🏙️
Real-world analogy
Imagine you own a big apartment building (your IP range: 192.168.1.0/24). You decide to split it into floors: Floor 1 for Engineers, Floor 2 for Sales, Floor 3 for HR. Subnetting is dividing your building into floors, each with its own set of apartments (host addresses).

What is a Subnet Mask?

The subnet mask tells you which part of an IP address is the network and which part is the host.

🔍 Breaking Down 192.168.1.100 /26
PartMeaningValue
192.168.1Network (fixed — identifies your subnet)Network bits
.100Host (your specific device)Host bits
/2626 bits are network, 6 bits are host6 host bits → 2⁶ − 2 = 62 usable IPs
Mask255.255.255.19211111111.11111111.11111111.11000000

Quick Reference — /24 to /30

CIDRMaskSubnets (from /24)Usable HostsGood for...
/24255.255.255.01254Full office floor
/25255.255.255.1282126Two departments
/26255.255.255.192462Medium team
/27255.255.255.224830Small team
/28255.255.255.2401614Very small group
/29255.255.255.248326Server cluster
/30255.255.255.252642Router-to-router link

🧮 Interactive Subnet Calculator

4c
Practice Exercises
Try it yourself first, then reveal the answer!
Exercise 1 — Basic
🏠 You have 192.168.5.0/24. How many devices can you connect?
Hint: /24 means 24 network bits → how many host bits are left? Remember to subtract 2 (network + broadcast).
👁️ Reveal Answer
1./24 means 24 bits for network, leaving 8 bits for hosts
2.2⁸ = 256 total addresses
3.Subtract 2: 256 − 2 = 254 usable host addresses
Network: 192.168.5.0 | Broadcast: 192.168.5.255 | Hosts: .1 → .254
Exercise 2 — Medium
🔍 What network does 172.16.50.25/20 belong to?
Hint: /20 means 20 network bits. The tricky part is in the 3rd octet. Find the "block size" first: 256 − (mask value in 3rd octet).
👁️ Reveal Answer
1./20 mask = 255.255.240.0 — the 3rd octet is 240
2.Block size = 256 − 240 = 16
3.3rd octet is 50. Find the multiple of 16 that fits: 16×3=48, 16×4=64 → so 48 is the closest below 50
4.Network address = 172.16.48.0/20
Broadcast = 172.16.63.255 (48+16−1=63) | Usable: .48.1 → .63.254
Exercise 3 — Planning
🏢 A small office needs 3 subnets from 10.0.0.0/24: Sales=50 hosts, IT=20 hosts, Printers=8 hosts. Pick the right prefix for each.
Hint: Find the smallest subnet that still fits all hosts. Remember the formula: usable = 2n − 2.
👁️ Reveal Answer
Sales50 hosts → need 2⁶=64 (62 usable) → use /26 → 10.0.0.0/26 (.1–.62)
IT20 hosts → need 2⁵=32 (30 usable) → use /27 → 10.0.0.64/27 (.65–.94)
Printers8 hosts → need 2⁴=16 (14 usable) → use /28 → 10.0.0.96/28 (.97–.110)
💡Always allocate largest subnet first to avoid gaps and waste!
5
Routing
How data finds its way across the internet
🗺️
Real-world analogy
A router is like a GPS-equipped post office sorter. When a packet arrives, the router reads the destination IP, checks its routing table ("which road leads there?"), and forwards it to the next router — until it reaches its destination.
📝 Static Routing

You manually tell the router: "To reach network X, go via Y." Simple, predictable, but doesn't adapt to failures.

# To reach 192.168.20.0/24, use 10.0.0.2 as next hop ip route 192.168.20.0 255.255.255.0 10.0.0.2 # Default route — "when in doubt, go here" ip route 0.0.0.0 0.0.0.0 203.0.113.1
💡
Use static routes when: small network, no redundancy needed, predictable paths.
🤖 Dynamic Routing

Routers talk to each other and automatically figure out the best paths. If a link fails, they re-route automatically.

  • IGP
    Interior protocols — inside one companyRIP, OSPF, EIGRP, IS-IS · Routers share routes within your AS (Autonomous System)
  • EGP
    Exterior protocols — between companiesBGP only · This is how your ISP connects to other ISPs — it runs the entire internet!

Administrative Distance — Which route to trust?

⚖️
Analogy
If your GPS (OSPF), your friend (static route), and a rumor (RIP) all suggest different roads — who do you trust most? That's Administrative Distance. Lower = more trusted.
🏆 AD Values — Lowest wins!
🔌 Connected0
100% trust
📝 Static Route1
Very high
🌐 eBGP20
High
⚡ EIGRP internal90
Good
🔵 OSPF110
Good
🟣 IS-IS115
Good
🔴 RIP120
Okay
🌍 iBGP200
Low trust

The Routing Protocols — Explained Simply

🐢
RIP
IGP · Distance Vector
The oldest routing protocol. Simple but slow. Like asking your neighbor for directions — they only know how many hops, not traffic conditions. Limited to 15 hops max.
  • MetricHop count (max 15)
  • UpdatesEvery 30 seconds
  • ConvergenceSlow (minutes)
  • Use today?Rarely — too slow
🔵
OSPF
IGP · Link State
Each router builds a complete map of the network, then calculates the best path (like Google Maps with full road visibility). Widely used in enterprise networks.
  • MetricCost based on bandwidth
  • UpdatesOnly when something changes
  • ConvergenceFast (seconds)
  • Use today?Yes — very popular
EIGRP
IGP · Advanced DV
Cisco's own protocol — a smarter distance vector. Pre-calculates backup routes so if the main path fails, it switches in milliseconds. Very fast convergence.
  • MetricBandwidth + delay
  • UpdatesPartial, only changes
  • ConvergenceVery fast
  • Use today?Yes, on Cisco gear
🟣
IS-IS
IGP · Link State
Similar to OSPF but runs directly over L2 (not over IP). Preferred by ISPs and large service providers. Scales better than OSPF for very large networks.
  • MetricDefault: 10 per interface
  • TransportLayer 2 directly
  • Use today?Yes — ISP backbones
🌍
BGP
EGP · Path Vector
The routing protocol of the entire internet. When you type google.com, BGP is what finds the path from your ISP to Google's servers. Every major ISP runs BGP. It's about policy, not just speed.
  • TransportTCP port 179
  • Metric14-step decision process
  • SessionseBGP (between ISPs), iBGP (within ISP)
  • ConvergenceSlow — policy is complex
  • Use today?The entire internet!
🧠
Remember the difference: IGP protocols (RIP, OSPF, EIGRP, IS-IS) work inside one organization. EGP (BGP) works between organizations. Your company uses OSPF internally, but connects to the internet via BGP to your ISP.
🌐 Networking for Humans
Beginner-friendly guide · OSI · TCP/IP · IPv4/IPv6 · Subnetting · Routing
Simple Guide
Switch version
Switch to Advanced Mode