What the difference with DSL hardware?

I went shopping with my neighbor who had bought his son a desktop computer. He wanted to to connect it to his existing DSL. However, we were confused about what to get. What is the difference between a workgroup switch, a router and a hub? We saw all of these, but we couldn’t tell what was the one we need as the product description seemed one need to only connect the cables and viola. However, there was as much as a $10-15 difference between a switch and a router. Any help would be greatly appreciated.

Hub: Basically just an ethernet splitter. Connects a bunch of machines together, with the bandwidth of the ethernet roughly shared between them.

Switch: Same as a hub, except with electronics that notice when computer A is talking to computer B, and give them a separate circuit, so that the bandwidth of the other machines is not affected. Much higher performance than a hub when there’s a lot of local traffic (i.e. multiple computers in your house talking TO EACH OTHER rather than the internet at large – things like media expanders, for example).

Router: A device used to connect one network to another (see also: bridge, but routers are more common). They usually integrate a switch for local machines, as well. The router will probably offer such features as NAT, very basic firewall capabilities, DHCP address production, and a host of security features as well. To connect a local network (or even a single machine) to the internet, this is almost certainly what you want, unless the DSL modem you were given has routing capabilities (some do, some don’t). The router is basically the thing that allows packets to be “routed” to local machines, i.e. it allows multiple local computers to share a single internet connection.

You pretty much can’t go wrong with a router (with integrated switch). Even if you only needed the switch, the router’s extra security will help a lot, and generally allow you to add up to a couple dozen computers (with some extra hubs/switches to create enough ports) to a single internet connection.