What is the difference between a Hub, Switch, and Router?
Answer
These are three different network devices operating at different OSI layers. A Hub (Layer 1) is a simple device that broadcasts all incoming traffic to every port — no intelligence, creates collisions, inefficient. Largely obsolete. A Switch (Layer 2) learns the MAC addresses of connected devices and forwards frames only to the correct destination port, reducing collisions and improving performance. Switches operate within a single network (LAN). A Router (Layer 3) connects different networks and makes forwarding decisions based on IP addresses. It routes packets between networks (e.g., your LAN to the Internet), performs NAT (Network Address Translation), and maintains a routing table. Home "routers" are actually a combination of router, switch, and wireless access point in one device.