system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5:what is the difference between a switch, an hub and a router ?

Hello and thanks for reading. I am posting this for work reasons: I have installed said equipment in the past, but never actually configured them, but I might have to explain in an interview that is happening tomorrow.

I have google'd it, but the explanations are really technical. What I know: routers are for distributing IP adresses in a domain (like your home internet box), switches are a mean for computers to be connected to a domain with an IP adress and hubs are for computers to be connnected to a domain without an IP adress (router sends back the information to every port on the hub, only the concerned computer takes it thanks to the concerned layer).

I am sorry if this ain't proper ELI5 stuff, since I already know a bit about it, but I would hate to say something dumb for that interview.

EDIT: thanks everyone for the wonderful help. :)
gpt
A hub is exactly what it sounds like: a hub where everybody meets. If one pc sends data on it's cable to the hub then the hub just passes this to everybody else connected. It's basically the same as everyone being connected over the same cable (like back in BNC times).

A switch doesn't just send everything it receives back to everybody connected. It looks at each individual packet. Inside each packet there is a MAC address corresponding with a specific connected computer and the switch sends the packet to this computer only. You could say it's an advanced hub with a bit more intelligence.

A router for end-users often includes a switch or a hub which is why it has at least the same ports as a switch or hub does. But a router is there to connect two or more networks. If a computer can't be found locally then the package is sent to the router and the router decides where to sent the package next. For an end-user router that means sending everything into the internet that is not found locally. From what you said i don't think that you had the pleasure of working with non-end-user routers.