Working principle and classification of switches
Switch "means" switch "and is a network device used for forwarding electrical (optical) signals. It can provide an exclusive electrical signal path for any two network nodes accessing the switch. ***A common switch is an Ethernet switch. Other common ones include telephone voice switches, fiber optic switches, etc.
1、 Working principle:
The switch operates at the second layer of the OSI reference model, which is the data link layer. The CPU inside the switch will form a MAC table by matching the MAC address with the port when each port is successfully connected. In future communication, packets sent to this MAC address will only be sent to its corresponding port, not all ports. Therefore, switches can be used to partition data link layer broadcasts, i.e. conflict domains; But it cannot divide the network layer broadcast, that is, the broadcast domain.
1. Port
Switches can transmit data between multiple port pairs at the same time. Each port can be regarded as an independent physical network segment (note: non IP network segment), and the network devices connected to it enjoy all the bandwidth independently, without competing with other devices for use. When node A sends data to node D, node B can simultaneously send data to node C, and both transmissions enjoy the full bandwidth of the network and have their own virtual connections. If a 10Mbps Ethernet switch is used here, the total flow rate of the switch is equal to 2 × 10Mbps=20Mbps, and when using a shared HUB with 10Mbps, the total flow rate of one HUB will not exceed 10Mbps.
In short, a switch is a network device based on MAC address recognition that can encapsulate and forward data frames. Switches can "learn" MAC addresses and store them in an internal address table, establishing a temporary switching path between the sender and receiver of data frames, allowing data frames to directly travel from the source address to the destination address.
2. The working principle of data transmission
After any node of the switch receives a data transmission instruction, it quickly searches the address table stored in memory to confirm the network card connection location of the MAC address, and then transmits the data to that node. If the corresponding location is found in the address table, the transmission will proceed; If not, the switch will record the address for future reference and use. Switches generally only need to send frames to the corresponding points, rather than sending them to all nodes like hubs, thus saving resources and time and improving data transmission rates.
3. Data transmission method
The data transmission through exchange is actually the way data is transmitted by switches. Previously, hubs relied more on sharing to transmit data, and there was no requirement for communication speed. The sharing method of hubs, commonly known as shared networks, uses hubs as connecting devices and only one direction of data flow, resulting in very low efficiency of network sharing. Relatively speaking, switches can recognize each computer connected to themselves by remembering and identifying the physical address of each computer's network card, commonly known as the MAC address.
Under this premise, there is no need to broadcast search anymore. Instead, the memorized MAC address can be directly found at the corresponding location and communication between two nodes can be completed through a temporary dedicated data transmission channel without external interference. Due to the full duplex transmission capability of switches, temporary dedicated channels can also be established simultaneously between multiple pairs of nodes to form a three-dimensional and intersecting data transmission channel structure.
2、 Classification
Network switches are divided into two types: wide area network switches and local area network switches. Wide area network switches are mainly used in the telecommunications field, providing a basic platform for communication. LAN switches are used in local area networks to connect terminal devices such as PCs and network printers. From the perspective of transmission medium and transmission speed, it can be divided into Ethernet switches, Fast Ethernet switches, Gigabit Ethernet switches, FDDI switches, ATM switches, and Token Ring switches.
It can be divided into enterprise level switches, department level switches, and workgroup switches. The scale of division among manufacturers is not completely consistent. Generally speaking, enterprise level switches are rack mounted, department level switches can be rack mounted (with fewer slots) or fixed configuration, while workgroup level switches are fixed configuration (with simpler functions). On the other hand, in terms of application scale, as a backbone switch, switches that support large enterprise applications with more than 500 information points are enterprise level switches, switches that support medium-sized enterprises with less than 300 information points are department level switches, and switches that support less than 100 information points are workgroup level switches.
1. Ethernet switch:
1) Can provide network interfaces for interconnection: Ethernet switches in network systems are mainly used to provide network interfaces for network devices to achieve interconnection between devices.
2) Scalable network interface: Generally, Ethernet switches * * * have 48 ports. When the network demand is high, Ethernet switches can be stacked to meet the network requirements.
3) Scalable network range: The connection between Ethernet switches and network devices relies on transmission media, and the transmission distance of each transmission medium is different and limited depending on the network technology used. When the network coverage area is large, Ethernet switches will relay and multiply the transmission distance, increasing the network range.
4) Ethernet switch learning function: Ethernet switches can understand the MAC address of devices connected to each port, map the MAC address to the corresponding port, and store it in the switch's cached MAC address table.
5) The forwarding/filtering function of Ethernet switches: When the destination address of a data frame is mapped in the MAC address table, it will be forwarded to the port connected to the destination.
6) The elimination loop function of Ethernet switches: When an Ethernet switch includes a redundant loop, it can avoid the generation of loops through the spanning tree protocol and allow for the existence of backup paths.
2. Fiber optic switch:
Fiber optic switch is a high-speed network transmission relay device that uses fiber optic cables as the transmission medium compared to ordinary switches. The advantages of fiber optic transmission are fast speed and strong anti-interference ability. There are two main types of fiber optic switches, one is the FC switch used to connect storage. Another type is Ethernet switches, with fiber optic ports that have the same appearance as regular electrical interfaces, but with different interface types.
A fiber channel switch is a network device that is compatible with the fiber channel protocol and has high-performance, low latency, and lossless transmission capabilities within the fiber channel structure. Fiber Channel switches are called SANs.

