The switch has multiple ports, each with a bridge function, which can connect to a LAN or a high-performance server or work station. In fact, a switch is sometimes referred to as a multi-port bridge. So, what does the switch do? What is the function and operating principle of the switch? Let’s take a look!
Switches are used to connect network devices (such as switches, routers, firewalls, wireless aps, etc.) and terminal devices (such as computers, servers, cameras, network printers, etc.); Router completes the interconnection between LAN and LAN, LAN and Internet; As a secure network device, the firewall acts between the internal network and the internal network, or between the internal network and the Internet. In general, switches act as connecting devices, routers act as connecting networks, and firewalls act as network visitation restraints.
1. Function of the switch
The function of the switch is to connect computers, servers, network printers, network cameras, IP phones and other terminal equipment, and to complete the interconnection with other switches, wireless access points, routers, network firewalls and other network equipment, and then to build a local area network, the completion of the communication between all devices.
⒉ Working principle of the switch
Switches sit on the second layer (data link layer) of the OSI model, and their operation depends on the recognition of MAC addresses (all network devices have a unique MAC address, usually burned directly into the network card by the manufacturer).
When a switch receives a packet from a port, it reads the source MAC address (that is, the MAC address of the network adapter that sends the packet) in the packet header and adds the MAC address and port to the address table in the memory of the switch. Then read the intended MAC address in the packet header, check the address table in memory to see which port the MAC address corresponds to, assuming that there is a corresponding port of the MAC address in the address table, the data packet is directly copied to the corresponding port, assuming no, the data frame is sent to the port as a broadcast frame. The corresponding MAC address device actively receives the frame data, and the switch puts the port that receives the frame data into the memory address table corresponding to the intended MAC address.