Network Fundamentals
1.1 Network Components - Har Device Ka Kaam
Router ()راؤٹر
Kya hai: Yeh ek smart box hai jo different networks ko aapas mein jorda hai Kaam:
• Ghar ka internet office ke internet se connect karna
• Data packets ko sahi jagah bhejna
• IP addresses dekh kar decide karna ke data kahan jana hai
Real Example: Aap WhatsApp message bhejte hain Karachi se Lahore - router decide karta hai ke
message kaun se raaste se jaega
Switch ()سوئچ
Kya hai: Yeh ek device hai jo ek hi network ke andar devices ko connect karta hai Types:
• Layer 2 Switch: MAC address (physical address) dekh kar data bhejta hai
• Layer 3 Switch: IP address bhi dekh sakta hai, router ki tarah kaam kar sakta hai
Real Example: Office mein 20 computers hain - sab switch se connected hain. Jab aap file share karte
hain, switch decide karta hai ke file kis computer ko bhejna hai
Firewall ()فائر وال
Kya hai: Network ka security guard Kaam:
• Harmful traffic ko block karna
• Hackers ko andar aane se rokna
• Company ke rules ke according traffic allow/deny karna
Real Example: Jaise ghar mein chowkidar hota hai - firewall bhi unwanted visitors (hackers) ko
network mein aane se rokta hai
Access Point (AP)
Kya hai: WiFi signal provide karta hai Kaam:
• Wireless devices ko internet se connect karna
• Radio waves ke through data transfer karna
Real Example: Cafe mein WiFi jo milta hai - woh AP se aata hai
ر
Controller ()کنٹولر
Kya hai: Multiple Access Points ka boss Kaam:
• Sab APs ko manage karna
• Settings centrally change karna
• Load balancing karna
Real Example: Mall mein 50 WiFi APs hain - controller sab ko control karta hai
1.2 Network Topology ()نیٹ ورک یک ساخت
Two-Tier Architecture
Kya hai: Do layers mein network banana
• Access Layer: End users directly connect hote hain
• Distribution Layer: Data ko core network tak pohchata hai
Example:
[Users] → [Switch] → [Router] → [Internet]
Three-Tier Architecture
Kya hai: Teen layers mein network banana
• Access Layer: Users ka direct connection
• Distribution Layer: Access aur Core ke beech bridge
• Core Layer: High-speed backbone
Example:
[Users] → [Access Switch] → [Distribution Switch] → [Core Switch] → [Internet]
SOHO (Small Office/Home Office)
Kya hai: Choti jagah ke liye simple network Example: Ghar mein 1 router, 1 switch, 5-10 devices
WAN (Wide Area Network)
Kya hai: Duur duur tak failae networks Example: Bank ke Karachi branch ka Lahore branch se
connection
1.3 Cables aur Connections
Fiber Optic Cable
Single-mode Fiber:
• Distance: 10km+ tak signal bhej sakta hai
• Use: Cities ke beech connection
• Speed: Very high speed
• Cost: Expensive
Multi-mode Fiber:
• Distance: 2km tak
• Use: Buildings ke andar
• Speed: High speed
• Cost: Medium
Real Example: Karachi se Lahore fiber cable - Single-mode Office building mein floors connect karna -
Multi-mode
Copper Cable (Ethernet)
Kya hai: Normal network cable jo ghar/office mein use hota hai Types:
• Cat5e: 100 Mbps
• Cat6: 1000 Mbps (1 Gbps)
• Cat6a: 10 Gbps
Real Example: Ghar mein laptop ko router se connect karne wala cable
1.4 Cable Problems aur Solutions
Collision ()تصادم
Kya hai: Jab do devices ek saath data bhejte hain Problem: Data corrupt ho jata hai Solution: Switch
use karna (collision domain kam karna)
Real Example: Jaise 2 log ek saath bolte hain - samjh nahi aata. Aise hi network mein collision hota
hai
Duplex Mismatch
Kya hai: Ek device half duplex ho, doosra full duplex
• Half Duplex: Ek time mein ya toh send karo ya receive karo
• Full Duplex: Dono saath mein ho sakte hain
Problem: Speed slow ho jati hai Solution: Dono devices ki setting match karna
Speed Mismatch
Kya hai: Ek device 100 Mbps, doosra 1000 Mbps Problem: Slow speed wala device bottleneck ban
jata hai Solution: Sab devices ki speed match karna
1.5 TCP vs UDP - Data Bhejna
TCP (Transmission Control Protocol)
Kya hai: Reliable data transfer Features:
• Acknowledgement hota hai (confirm karta hai ke data pahuncha)
• Agar data missing ho toh dubara bhejta hai
• Slow hai lekin pakka hai
Use Cases:
• Web browsing (HTTP)
• Email (SMTP)
• File transfer (FTP)
• WhatsApp messages
Real Example: Registered post ki tarah - receipt milti hai ke pahuncha ya nahi
UDP (User Datagram Protocol)
Kya hai: Fast lekin unreliable data transfer Features:
• No acknowledgement
• Agar data missing ho toh dubara nahi bhejta
• Fast hai lekin guarantee nahi
Use Cases:
• Video streaming (YouTube)
• Online gaming
• Voice calls (VoIP)
• Live TV
Real Example: Normal post ki tarah - bhej diya, pahuncha ya nahi pata nahi
1.6 IPv4 Addressing - Internet Ka Pata
IP Address Kya Hai
Definition: Har device ka unique number internet pe Format: 4 numbers separated by dots Example:
192.168.1.1
IP Address Classes
Class A: 1.0.0.0 - 126.255.255.255 (Bade networks) Class B: 128.0.0.0 - 191.255.255.255 (Medium
networks)
Class C: 192.0.0.0 - 223.255.255.255 (Chote networks)
Subnetting Example
Original Network: 192.168.1.0/24 (256 addresses) Subnet 1: 192.168.1.0/25 (128 addresses) Subnet
2: 192.168.1.128/25 (128 addresses)
Real Example: Ek building mein 2 floors hain - har floor ko alag subnet diya
1.7 Private IP Addresses
Kya Hain Private IPs
Definition: Ye IPs sirf local network mein use hote hain, internet pe direct nahi jaate
Ranges
Class A: 10.0.0.0 - 10.255.255.255
• Example: 10.1.1.1 (Big companies)
Class B: 172.16.0.0 - 172.31.255.255
• Example: 172.16.1.1 (Medium companies)
Class C: 192.168.0.0 - 192.168.255.255
• Example: 192.168.1.1 (Ghar/chote office)
NAT (Network Address Translation)
Kya hai: Private IP ko public IP mein convert karna Example:
• Ghar mein sab devices: 192.168.1.x
• Internet pe jaate time: 203.123.45.67 (ISP ka public IP)
1.8 IPv6 Addressing
Kyu Chahiye IPv6
Problem: IPv4 addresses khatam ho gaye (4 billion addresses) Solution: IPv6 mein bahut zyada
addresses hain
IPv6 Format
Length: 128 bits (IPv4 mein 32 bits) Example: 2001:0db8:85a3:0000:0000:8a2e:0370:7334 Short
Form: 2001:db8:85a3::8a2e:370:7334
IPv6 vs IPv4
Feature IPv4 IPv6
Length 32 bits 128 bits
Addresses 4 billion 340 undecillion
Format 192.168.1.1 2001:db8::1
1.9 IPv6 Address Types
Unicast
Kya hai: Ek device ko data bhejna Example: Aap WhatsApp message bhejte hain ek dost ko
Multicast
Kya hai: Ek group ko data bhejna Example: WhatsApp group mein message bhejna
Anycast
Kya hai: Sab se paas wale device ko data bhejna Example: Google.com - jo server paas ho, wahan se
response aaye
Link-local
Kya hai: Sirf local network mein use hone wala address Range: fe80::/10 Example: Same WiFi pe do
devices ka direct communication
1.10 IP Configuration Check Karna
Windows Commands
cmd
ipconfig # Basic info
ipconfig /all # Detailed info
ipconfig /release # IP release karna
ipconfig /renew # Naya IP lena
ping 8.8.8.8 # Internet connectivity check
Linux Commands
bash
ip a # IP addresses dekhna
ip route # Routing table
ping 8.8.8.8 # Connectivity check
Check Karne Wali Cheezain
1. IP Address: Device ka current IP
2. Subnet Mask: Network ka size
3. Gateway: Router ka IP
4. DNS: Domain name resolver
1.11 Wireless (WiFi) Basics
SSID (Service Set Identifier)
Kya hai: WiFi network ka naam Example: "Home_WiFi", "Office_Guest"
Channels
2.4 GHz: 1, 6, 11 (non-overlapping) 5 GHz: Zyada channels available
Problem: Interference agar same channel use karte hain Solution: Different channels use karna
RF (Radio Frequency)
Signal Strength:
• -30 dBm: Excellent
• -50 dBm: Good
• -70 dBm: Fair
• -90 dBm: Poor
WiFi Security
WEP: Old, weak (use na karo) WPA: Better WPA2: Good (current standard) WPA3: Best (latest)
1.12 Virtualization Basics
Server Virtualization
Kya hai: Ek physical server pe multiple virtual servers chalna Example:
• 1 physical server
• 5 virtual servers (Linux, Windows, etc.)
Benefits:
• Cost saving
• Resource optimization
• Easy backup/restore
Containers
Kya hai: Lightweight virtual environments Example: Docker containers Use: Applications ko isolated
environment mein chalana
VRF (Virtual Routing and Forwarding)
Kya hai: Ek hi router pe multiple virtual networks Example:
• VRF1: Company A ka network
• VRF2: Company B ka network
• Dono alag alag, interference nahi
1.13 Switching Concepts
MAC Address Learning
Process:
1. Device frame bhejta hai
2. Switch source MAC yaad rakhta hai
3. MAC table mein entry banata hai
4. Next time direct us port pe bhejta hai
Example:
Port 1: aa:bb:cc:dd:ee:ff (Computer A)
Port 2: 11:22:33:44:55:66 (Computer B)
Frame Switching Process
1. Receive: Frame aaya
2. Learn: Source MAC yaad rakho
3. Forward: Destination MAC ke base pe bhejo
4. Flood: Agar unknown destination ho toh sab ports pe bhejo
MAC Address Table Aging
Kya hai: Agar koi MAC address 300 seconds tak inactive rahe toh forget kar dena Reason: Table mein
space bachane ke liye
Quick Reference Table
Component Function Example
Router Networks connect karna Ghar ka internet
Switch Devices connect karna Office computers
Firewall Security Hackers block karna
Access Point WiFi provide karna Cafe WiFi
TCP Reliable data transfer Email, Web
UDP Fast data transfer Video, Gaming
IPv4 Internet addressing 192.168.1.1
IPv6 Next-gen addressing 2001:db8::1
Component Function Example
SSID WiFi network name Home_WiFi
VRF Virtual networks Multiple customers
Practice Questions
1. Router aur Switch mein kya fark hai?
2. TCP aur UDP mein kya difference hai?
3. Private IP ranges kya hain?
4. IPv6 kyu zaruri hai?
5. WiFi channels kya hain?
Pro Tips
1. Subnetting: Always powers of 2 yaad rakho (2, 4, 8, 16, 32, 64, 128, 256)
2. Troubleshooting: Hamesha ping se start karo
3. Security: Default passwords kabhi use na karo
4. Documentation: Network diagram hamesha updated rakho
5. Monitoring: Regular basis pe network performance check karo