In network equipment and devices, data is usually transmitted in the form of a frame. When a frame is received, it is amplified and then transmitted to the port of the destination PC (Personal Computer). The big difference between hub and switch is in the method in which frames are being delivered.
In a hub, a frame is passed along or “broadcast” to every one of its ports. It doesn’t matter that the frame is only destined for one port. The hub has no way of distinguishing which port a frame should be sent to. Additionally, a 10/100Mbps hub must share its bandwidth with each and every one of its ports. In comparison, a switch keeps a record of the MAC (Media Access Control) addresses of all the devices connected to it. With this information, a network switch can identify which system is sitting on which port. So when a frame is received, it knows exactly which port to send it to, without significantly increasing network response times. In addition, unlike a hub, a 10/100Mbps switch will allocate a full 10/100Mbps to each of its ports. So regardless of the number of PCs transmitting, users will always have access to the maximum amount of bandwidth.
Unlike an Ethernet hub or switch that is concerned with transmitting frames, a router is to route packets to other networks until that packet ultimately reaches its destination. One of the key features of a packet is that it not only contains data but the destination address of where it’s going. What’s more, router is the only one of these three devices that will allow you to share a single IP (Internet Protocol) address among multiple network clients.
You can have a clear view of the comparison among hub vs switch vs router here:
template | Hub | Switch | Router |
---|---|---|---|
Layer | Physical layer | Data link layer | Network layer |
Function | To connect a network of personal computers together, they can be joined through a central hub | Allow connections to multiple devices, manage ports, manage VLAN security settings | Direct data in a network |
Data Transmission form | electrical signal or bits | frame & packet | packet |
Port | 4/12 ports | multi-port, usually between 4 and 48 | 2/4/5/8 ports |
Transmission type | Frame flooding, unicast, multicast or broadcast | First broadcast, then unicast and/or multicast depends on the need | At Initial Level Broadcast then Uni-cast and multicast |
Device type | Non-intelligent device | Intelligent device | Intelligent device |
Used in(LAN, MAN, WAN) | LAN | LAN | LAN, MAN, WAN |
Transmission mode | Half duplex | Half/Full duplex | Full duplex |
Speed | 10Mbps | 10/100Mbps, 1Gbps | 1-100Mbps(wireless); 100Mbps-1Gbps(wired) |
Address used for data transmission | MAC address | MAC address | IP address |