The Layer 2 switch is located at the 2nd layer of the OSI model, which is the data link layer. Compared with ordinary switches, the development of Layer 2 switching technology is relatively mature. Layer 2 switches are data link layer devices, which can identify MAC address information in data packets, forward according to MAC addresses, and Layer 2 switches support line-speed switching. The throughput is larger.
The Layer 2 switch works at the data link layer and can identify the MAC address information in the data packet, forward it according to the MAC address, and record the MAC address and the corresponding port in an internal address table.
The data link layer mainly receives the bit stream service provided by the physical layer, establishes a link between adjacent nodes, performs error detection and error correction on errors that may occur in the transmission, and provides error-free transparent transmission to the network layer.
The basic unit of transmission at the number of link layers is "Frame". Each frame includes a certain amount of data and some necessary control information.
Currently, there are four different formats of Ethernet frames, with 64 bits (8 bytes) of leading characters at the beginning of each format of the Ethernet frame, where the first 7 bytes are called preambles (Preamble) The last byte is the frame start identifier 0xAB, which marks the beginning of the Ethernet frame. The role of the leading character is to synchronize the receiving node and prepare for receiving the data frame. This is followed by a 6-byte destination MAC address, a 6-byte source MAC address, and subsequent frames differing depending on the format. The last 4 bytes are the frame check sequence FCS, which uses 32-bit CRC cyclic redundancy. The check verifies the data from the "Target MAC Address" field to the "Data" field. The field definitions of Ethernet frames of different formats are different and are not compatible with each other.
The specific workflow of the switch is as follows:
1) When the switch receives a data frame from a port, it first reads the source MAC address in the packet header, so that it knows which port the source MAC address machine is connected to;
2) Read the destination MAC address in the packet header and look up the corresponding port in the address table.
3) If the host on the port accesses the host under the port, discard it;
4) If there is a port corresponding to the destination MAC address in the table, forward the data packet directly to this port;
5) If the corresponding port is not found in the table, the packet is broadcast to all ports. When the destination machine responds to the source machine, the switch can record which port the destination MAC address corresponds to, and the next time the data is transmitted. It is no longer necessary to broadcast all ports. This process is continuously cycled, and the MAC address information of the entire network can be learned. The Layer 2 switch establishes and maintains its own port address table.
The port address table records the MAC address of the host under the port. The port address table is automatically created after the switch is powered on, saved in RAM, and automatically maintained. The entries in the port address list are lifetime. When each entry starts to be counted after it is established, the data is refreshed every time the data is sent. For hosts that do not send data for a long time, the entry of the MAC address is deleted at the end of the lifetime, so the port and ground record are recorded. The MAC address of the most active host is always.
Dimensions
Length: 12.8mm
Width: 5.8mm
Height: 7.5mm (excludes 3mm for terminals)
Arm length: 13.0mm
Features
â—† Small compact Size, high reliability
â—† Micro contact gap,high speed operation,high sensitivity,Micro operatizon travel.
â—† Long life & high reliability
â—† Wide Range of wiring Terminals, Variety of Levers
â—†Mainly used for computer mouse, car mouse, automobile electronic products, communications equipment, military product, test instrument, and general electric and wireless devices, 24 hours timer, etc.
Mushroom Push Button Switch,Subminiature Micro Switch,Miniature Mouse Micro Switch,Ultra Subminiature Micro Switch
Ningbo Jialin Electronics Co.,Ltd , https://www.donghai-switch.com