Switch Principle

- Apr 19, 2019-

Working at the data link layer, the switch has a very high bandwidth back bus and internal switching matrix. All the ports of the switch are connected to the back bus. After the control circuit receives the data packet, the processing port searches the address comparison table in the memory to determine the NIC (network card) of the destination MAC (the hardware address of the network card). On which port, the packet is quickly transmitted to the destination port through the internal switch fabric. If the destination MAC does not exist, it will be broadcast to all ports. After receiving the port response, the switch will "learn" the new address and add it to the internal MAC. In the address table. The switch can also be used to "segment" the network. By comparing the MAC address table, the switch only allows the necessary network traffic to pass through the switch. Through the filtering and forwarding of the switch, the collision domain can be effectively reduced, but it cannot divide the network layer broadcast, that is, the broadcast domain. 


The switch can perform data transmission between multiple port pairs at the same time. Each port can be regarded as a separate network segment, and the network devices connected to it can enjoy the full bandwidth by itself, without competing with other devices. When node A sends data to node D, node B can send data to node C at the same time, and both of these transmissions enjoy the full bandwidth of the network and have their own virtual connections. If a 10Mbps Ethernet switch is used here, the total throughput of the switch at this time is equal to 2×10Mbps=20Mbps, and when using a shared HUB of 10Mbps, the total throughput of one HUB will not exceed 10Mbps. In short, the switch is a network device that can perform packet encapsulation and forwarding of data frames based on MAC address identification. The switch can "learn" the MAC address and store it in the internal address table. By establishing a temporary switching path between the originator and the target receiver of the data frame, the data frame can be directly sent from the source address to the destination address.