Hub vs switch vs router

Views: 205 Last modified: December 20th, 2011 Comments: 0

Hub
A hub(also known as concentrator) is an really “stupid” device used in networks to forward incoming data packets to each single device connected to the same hub. A hub doesn’t make any difference between the connected devices.

When computer A transmits a packet to computer B – computer C will receive the packet a swell, but rejects it due to the incorrect MAC address. The physical addresses(MAC) can be used only from the second layer of the OSI model (data link layer).

A hub operates at the first layer of the OSI model – the physical layer.

Bottom line: Hubs will forward each incoming packet to each connected network device.

Switch
A critical fact to know is that a switch operates at the second layer of the OSI model, the data link layer.

Each NIC(Network Interface Card) has a MAC(Media Access Control) address. This is a unique number assigned to a specific device(factory setting) and is used to identify a specific device in a network.

MAC example: 00-26-18-24-55-F8

A switch is like a Hub and has several ports available which can be used to connect network devices. Unlike a hub the switch has some intelligence and is able to store the MAC addresses along with the physical port number of the switch in his MAC-address table. Right now, the MAC address is linked to the port number on which the device is connected.

Each time a switch receives a packet, it checks the MAC address of the receiver and will forward the packet to the specific port on which the device is connected. This means that other devices won’t see the packet. This will minimize the risk of collisions.

Bottom line: Switches will forward incoming packets according to a MAC address.

Router
A router is smart and used to communicate with other networks and operates at the third layer of the OSI model – the network layer. You have a router as well, even better, you have one at home. It controls your LAN and is used to transfer packets over the internet. A router uses the address of the ultimate destination(IP addresses) to forward incoming packets between two or more networks.

The destination address of the packets will be checked against a “routing table” and forwarded accordingly over the internet. When the packet finally lands at the ultimate network it will be forwarded to the correct computer according to the IP address.

So, actually a router will “route” your packets internally or externally to another network, commonly the internet.

VN:F [1.9.13_1145]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.13_1145]
Rating: +2 (from 2 votes)

    Mail this!

    To: From:Sum {0+1} =  
    Anything to add ?

        You must be logged in to post a comment.