A hub replicates all data received on one port to all other ports, potentially slowing the network. A switch only sends data to the destination port to improve efficiency. A router connects multiple networks and determines the best path to send data between them using protocols like ICMP. Modern routers integrate switching, routing, security and other functions into one device.