Layer 2 industrial switch: The Layer 2 industrial switch works at the Layer 2 (data link layer) of the OSI model, identifies the MAC address information in the data packet, forwards it according to the MAC address, and records these MAC addresses and corresponding ports in its own internal address table. Therefore, layer 2 industrial switches need powerful data identification and forwarding capabilities. 

工业交换机图片

  1.Features of Layer 2 and Layer 3 industrial switches


  Layer 2 Industrial switches rely on information (such as MAC addresses) at the link layer to perform wire-speed exchange between ports. The main functions of Layer 2 industrial switches include physical addressing, error checking, frame sequence, and data flow control. Generally speaking, the work undertaken by the desktop switch is not very complicated, and it is at the most basic level of the network, so it only needs to provide the most basic data link function. In addition, some enterprise Layer 2 industrial switches can implement VLAN, DHCP relay, QoS and port security, port mirroring, and other functions.


  When a switch receives a packet from a port, it first reads the source MAC address in the packet header so that it knows which port the machine with the source MAC address is connected to. Then read the destination MAC address in the packet header, and find the corresponding port in the address table; If there is a port corresponding to the destination MAC address in the table, the data packet is directly copied to the port. If no corresponding port can be found in the table, the switch broadcasts the packet to all ports. When the destination machine responds to the source machine, the switch learns which port corresponds to the destination MAC address. Then, the switch does not need to broadcast all ports in the next data transmission.


  Layer 3 Industrial switch: A Layer 3 industrial switch is a special router that focuses on performance over switching. The traditional switching technology operates at the data link layer, the second layer of the OSI network Standard Model, while the Layer-3 industrial switch is designed for IP with simple interface type and strong Layer-2 packet processing capability. It can not only replace or partially complete the functions of the traditional router at the protocol Layer 3, but also has the speed of almost Layer-2 switching.


  Working principle of Layer 2 industrial switch: When receiving a packet from a certain port, the switch first reads the source MAC address in the packet header, so that the switch knows which port the machine with the source MAC address is connected to. Then read the destination MAC address in the packet header, and find the corresponding port in the address table; If there is a port corresponding to the destination MAC address in the table, the data packet is directly copied to the port. If no corresponding port can be found in the table, the switch broadcasts the packet to all ports. When the destination machine responds to the source machine, the switch learns which port corresponds to the destination MAC address. Then, the switch does not need to broadcast all ports in the next data transmission.


  Working principle of Layer 3 industrial switch: Generally speaking, large Lans are divided into smaller Lans based on functions or geographical factors. Generally, Lans are connected through routers, which enables the Virtual Local Area Network (VLAN) technology to be widely used on networks. However, the routing capability of traditional ordinary routers is too weak. The simple use of routers to achieve inter-network access, the number of ports is limited, the routing speed is slow, thus limiting the scale of the network and access speed. If gigabit ports or 100 gigabit ports on Layer 3 industrial switches are used to connect different subnets or vlans, the problem that subnets must rely on routers for communication after subnets are divided can be solved economically while maintaining performance.


  The difference between Layer-3 industrial switches and Layer-2 industrial switches is that Layer-3 industrial switches work at Layer 3 (network layer) of the OSI model, and Layer-2 industrial switches work at layer 2 (data link layer) of the OSI model.


  Layer 2 industrial switches can identify MAC addresses in packets, forward packets based on MAC addresses, and record the MAC addresses and corresponding ports in an internal address table. Layer 3 switching technology is to add Layer 3 forwarding technology to Layer 2 switching technology to realize high-speed forwarding of data packets and speed up the data exchange inside the large LAN.