What is the difference between a hub, a switch, and a router in terms of OSI layer and traffic forwarding behavior?
- A.Switches operate at Layer 3 using IP addresses; routers operate at Layer 2 using MAC addresses.
- B.Hubs and switches are identical; both use MAC addresses for forwarding. Routers use IP addresses.
- C.Hub (L1): receives a frame on one port and broadcasts it out ALL other ports; no intelligence, creates a shared collision domain; all ports in one broadcast domain. Switch (L2): forwards frames based on destination MAC address to the specific port where that MAC was learned; each port is its own collision domain; all ports in the same VLAN share a broadcast domain. Router (L3): forwards packets based on destination IP address between different networks/subnets; each interface is a separate broadcast domain; uses routing table (static or dynamic) to make forwarding decisions.