Difference between switch/router/hub?

skyking

Lifer
Nov 21, 2001
22,732
5,875
146
hub: most basic device. Packets come in, packets go out to each port. It repeats the information to all clients. Can you make a network with it? Yes.

Switch: more sophisiticated. Routes packets by mac address, so traffic does not go out to each machine on a network, only the machine that requested it. The most sophisiticated switches perform very complex duties, and are commonly known as "managed" switches.

Router: Performs Network Address Translation (NAT), and often Dynamic Host Connection Protocol (DHCP). DHCP allows clients to automatically get an IP address.
NAT is necessary to share an internet connection with one public IP. You need a router, and either a hub or switch.
Some routers have a built in switch, eliminating the need for a second device.