A Hub is the simplest of these devices. In general, a hub is the central part of a wheel where the spokes come together. Hubs cannot filter data so data packets are sent to all connected devices/computers and do not have intelligence to find out best path for data packets. This leads to inefficiencies and wastage.
As a network product, a hub may include a group of modem cards for dial-in users, a gateway card for connections to a local area network (for example, an Ethernet or a token ring), and a connection to a line. Hubs are used on small networks where data transmission is not very high.Bridge
In telecommunication networks, a bridge is a product that connects a local area network (LAN) to another local area network that uses the same protocol. Having a single incoming and outgoing port and filters traffic on the LAN by looking at the MAC address, bridge is more complex than hub. Bridge looks at the destination of the packet before forwarding unlike a hub. It restricts transmission on other LAN segment if destination is not found.
A switch when compared to bridge has multiple ports. Switches can perform error checking before forwarding data, which are very efficient by not forwarding packets that error-end out or forwarding good packets selectively to correct devices only.
Switches can support both layer 2 (based on MAC Address) and layer 3 (Based on IP address) depending on the type of switch. Usually large networks use switches instead of hubs to connect computers within the same subnet.
A router, like a switch forwards packets based on address. Usually, routers use the IP address to forward packets, which allows the network to go across different protocols. Routers forward packets based on software while a switch (Layer 3 for example) forwards using hardware called ASIC (Application Specific Integrated Circuits). Routers support different WAN technologies but switches do not.
Besides, wireless routers have access point built in. The most common home use for routers is to share a broadband internet connection. As the router has a public IP address which is shared with the network, when data comes through the router, it is forwarded to the correct computer.
the original material is referred from:
More tips on switches or routers comparison at: