A hub is a networking device that connects multiple devices on a local area network (LAN). It receives data packets through one port and broadcasts them to all other ports so all connected devices can see the packets. Hubs operate in half duplex mode and have no bandwidth management or collision detection. Switches are more advanced devices that can connect more devices than hubs. Switches have buffers and port-to-MAC address tables that allow them to send frames to specific ports faster than hubs. Routers connect multiple networks like LANs and WANs. Routers use IP addresses to route packets between networks and can run routing protocols to dynamically learn routes.