HUB : A Hub is a common connection point for devices in a network. They are used to form a LAN (local area network). It contains a number of ports. When a data packet arrives at one port, it is copied to the other ports so that all nodes in the LAN can see all packets.
FireWire 6-port hub
Switch : A switch is a device that filters a data packet and then forwards it to the nodes connected in a LAN.USB 4 port switch
Router : A router is a device that transfers data packets among networks. It is connected to at least two networks, generally two LAN or WAN or a LAN and its ISP network. Routers are located at gateways, the places where two or more networks connect.Differences between Hub, switch and router
In a hub, a data packet is transmitted to every one of its ports The hub has no way of distinguishing to which port a packet should be sent to. A hub shares its bandwidth with each and every one of its ports. So when only one PC is working, it will have access to the maximum available bandwidth. If, however, multiple PC’s are broadcasting, then that bandwidth will be divided among all of those PC’s, which will degrade performance.
A switch, however, keeps a record of the MAC addresses of all the devices connected to it. So when a data packet is received, it knows which port to send it to. So regardless of the number of PCs transmitting, users will always have access to the maximum amount of bandwidth. Because of this a switch is considered to be a much better choice then a hub.
Routers serve a more advanced purpose. It routes packets to other networks until that packet reaches its destination. A router will typically include a 4 - 8 port Ethernet switch (or hub) and a Network Address Translator (NAT). In addition, they usually include a Dynamic Host Configuration Protocol (DHCP) server, Domain Name Service (DNS) proxy server and a hardware firewall to protect the LAN from malicious intrusion from the Internet.
All routers have a WAN Port that connects to a DSL or cable modem for broadband Internet service and the integrated switch allows users to easily create a LAN. This allows all the PCs on the LAN to have access to the Internet.
So, next time you go out to buy one of the networking media do take a look at the above discussed points.