A hub, switch, and router each serve different functions in a network. A hub simply connects devices together but broadcasts all data to all ports. A switch connects devices and sends data only to the port of the intended recipient to avoid congestion. A router connects multiple networks together, both wired and wireless, and chooses the best path to send data packets between the networks.