Networking 1. Difference between Hub, Switch, and Router Hub: Sends data to all devices (broadcast). Example: If PC1 sends a file, all PCs receive it, even if only PC2 needs it. Switch: Sends data only to the destination MAC. Example: PC1 → PC2 directly, no unnecessary traffic. Router: Connects different networks. Example: Your home router connects LAN to the internet. 2. OSI Model and Layers Seven layers: Physical (cables, signals) Data Link (MAC addresses, Ethernet) Network (IP addressing, routing) Transport (TCP/UDP, reliability) Session (manages sessions) Presentation (encryption, compression) Application (user interface, HTTP, SMTP) Example: Sending an email uses all layers. 3. TCP vs UDP TCP: Reliable, connection‑oriented. Example: Web browsing, email. UDP: Fast, connectionless. Example: Streaming, gaming. 4. IP Address Classes & Subnetting Class A: 1–126, large networks. Class B: 128–191, medium. Class C: 192–223, small. Subnetting: Divides a network into smal...