What is the difference between a hub and a switch? One article will help you understand

Author: Insist--

Personal homepage: insist--personal homepage

Dreams never end, legends never end. Bloggers will continue to update high-quality network knowledge, Python knowledge, Linux knowledge and various tips. I hope you and I will make progress together in CSDN.

Table of contents

1. Hub

1. What is a hub?

2. The role of the hub

2. Switch

1. What is a switch?

2. The role of the switch

3. The difference between a hub and a switch

1. OSI architecture

2. Working method

3. Bandwidth


Preface

Hubs and switches are both necessary devices in the network, so what is the difference between them? This article will help you find out.

1. Hub

1. What is a hub?

A hub (HUB) is a basic device used in local area networks and is commonly used in star and tree network topologies. The hub does not require any software support or requires very little management software management, and is a pure hardware network bottom device. It uses CSMA/CD (Carrier Sense Multiple Access with Collision Detection) media access control mechanism. Each interface simply sends and receives bits. If it receives a 1, it forwards a 1, and when it receives a 0, it forwards a 0. No collision detection is performed . The hub uses electrical interconnection inside the hub. When the environment for maintaining the LAN is a logical bus or ring structure, the hub can be used to establish a physical star or tree network structure. Hubs are widely used in local area networks.

59f15f09dff44fc19645eedef0c2ecb1.jpg

336cf8b494e44b57aba8906c5bd53a64.jpg

2. The role of the hub

The main function of a hub is to connect multiple computers or other network devices to form a network . It has multiple ports that can be used to connect multiple network devices so that these devices can communicate with each other and forward data packets from one device to another. While the hub expands the transmission distance of the network, it can also concentrate all nodes on the node centered on it.

2. Switch

1. What is a switch?

The full name of switch is Ethernet switch. It is a relatively common network device whose function is to exchange data in a computer network . At present, the most commonly used switch is an Ethernet switch. In addition, there are also telephone and voice switches, fiber optic switches, and so on. The following figure shows the switch:

cc65af6f711a48d2931d2bb959c8d414.jpg

2. The role of the switch

①Data forwarding

After receiving the data packet, the switch will determine and forward it to the corresponding port based on the destination address , thereby enabling communication between different devices . This can ensure the efficiency and stability of data transmission.

②Port isolation

The switch has the function of port isolation , which can isolate data between different users or different networks to prevent data leakage and information security issues . It is worth noting that using port isolation will waste limited VLAN resources.

Tips: The switch also supports VLAN technology, which can further enhance network security and management by dividing VLANs.

③Load balancing and bandwidth control

When multiple devices use the same switch, the switch can implement load balancing and bandwidth control functions. Through intelligent routing and traffic control, different network bandwidth and speeds can be provided for different devices, thereby achieving more efficient data transmission.

3. The difference between a hub and a switch

The main difference between hubs and switches is their OSI architecture, how they work, and how they allocate bandwidth.

1. OSI architecture

Hubs are layer 1 physical layer devices , while switches are layer 2 data link layer devices . This means that the hub only plays a role in synchronizing, amplifying and shaping the data transmission, while the switch can not only synchronize, amplify and shape the data transmission, but also filter short frames, fragments, etc., thereby ensuring the integrity of the data transmission. sex and correctness.

2. Working method

The hub adopts broadcast mode , that is, when a certain port is working, all other ports can listen to the information. This can cause a significant impact on network performance, especially if the network is large. The switch can avoid this phenomenon. When the switch is working, only the port that sends the request and the destination port respond to each other without affecting other ports . Therefore, the switch can isolate the conflict domain and effectively suppress the occurrence of broadcast storms.

3. Bandwidth

No matter how many ports a hub has, all ports share a bandwidth . Only two ports can transmit data at the same time, and other ports can only wait. At the same time, the hub can only work in half-duplex mode. For switches, each port has an exclusive bandwidth . When two ports are working, it does not affect the work of other ports. At the same time, the switch can not only work in half-duplex mode, but also in full-duplex mode. Down.

Guess you like

Origin blog.csdn.net/m0_73995538/article/details/133427700