The differences between switches and hubs are mainly reflected in the following aspects:
(1) Different levels of work in OSI/RM (OSI Reference Model)
Switches and hubs in OSI/RM open architecture model correspond to different levels. Hubs work in the first layer (physical layer) and the second layer (data link layer), while switches at least work in the second layer. Higher switches can work in the third layer (network layer) and the fourth layer (transmission layer) 。
(2) Different data transmission modes of switches
The data transmission mode of hub is broadcast mode, while the data transmission of switch is purposeful. The data is sent only to the destination node, but it is sent by broadcast mode for the first time when it can not be found in its own MAC address table. Then, because the switch has the function of learning MAC address, after the second time. It's not broadcast anymore, it's purposeful. The advantage is that the efficiency of data transmission is improved, there will be no broadcast storm, and there will be no phenomenon of other nodes listening in terms of security.
(3) Different ways of bandwidth occupancy
In terms of bandwidth occupancy, all ports of the hub share the total bandwidth of the hub, and each port of the switch has its own bandwidth. Thus, the bandwidth of each port of the switch is much higher than the available bandwidth of the hub port, which determines that the transmission speed of the switch is much faster than that of the hub.
(4) Different transmission modes
Hub can only be transmitted by half-duplex mode, because the hub is a shared transmission medium, so the hub can only transmit one task at a time on the upstream channel, either receiving data or sending data. Switches, on the other hand, use full duplex mode to transmit data, so they can receive and transmit data at the same time. This not only speeds up the data transmission, but also speeds up the throughput of the whole system at least twice as fast as hubs, because they can receive data at the same time. In fact, it's far more than twice as wide as transmission, because the port bandwidth of a switch is generally many times wider than that of a hub.
In short, the switch is a network device based on MAC address recognition, which can complete the function of encapsulating and forwarding data packets. At present, the mainstream switch manufacturers are represented by CISCO, 3COM and Anet abroad, while Huawei and D-LINK are the main ones in China.