So far, layer-3 switches have been widely used in enterprise networks, campus construction networks, blog community access, and many other occasions, so as to promote the market's demand and updates for layer-3 exchange technology, it promotes the development of such applications in depth.
Traditional L2 Switch Technology the traditional LAN switch is a L2 network device that constantly collects information during operations to create a MAC address table. This table is quite simple and basically shows the port on which a MAC address is found. Then, when the switch receives an Ethernet packet, it will view the destination MAC address of the packet and check its address table to confirm the port from which the packet is sent.
But when the switch receives an unknown packet, that is to say, if the destination MAC address is not in the MAC address table, the switch will "spread" the packet, that is, it will be sent from all ports. Just as a vswitch receives a broadcast packet, this exposes the weakness of a traditional LAN switch: it cannot effectively solve broadcast, heterogeneous network interconnection, security control, and other problems. Therefore, the VLAN Virtual LAN technology on the switch is generated.
Three-layer switching technology three-layer switching technology, also known as multi-layer switching technology, or IP address switching technology, is proposed relative to the traditional concept of switching. As we all know, the traditional exchange technology operates on the data link layer, the second layer of the OSI network standard model.
The layer-3 switching technology implements high-speed packet forwarding in the network model. Simply put, layer-3 switching technology is "layer-2 switching technology + layer-3 forwarding ". The emergence of layer-3 switching technology solves the problem that the subnet in the network segment must be managed by the router after the network segment is divided in the LAN, and solves the network bottleneck problem caused by the low speed and complexity of the traditional router.
Layer 2 switch communication process assume that two sites A and B that use the IP protocol communicate through the Layer 2 switch. When sending Site, the system compares its own IP address with the IP address of Site B to determine whether Site B is in the same subnet as it is.
If the destination site B and the destination site A are in the same subnet, Layer 2 Forwarding is performed. To obtain the MAC address of Site B, site A first sends an ARP broadcast packet to request the MAC address of site B. After the ARP request packet enters the switch, it first learns the source MAC address. The chip automatically enters the MAC address of Site A and the port number of the switch into the MAC address table of the chip, then, search for the target address in the MAC address table.
Because it is a broadcast packet, the switch broadcasts the broadcast packet from the VLAN to which the switch port belongs. Site B receives the ARP request message. An ARP reply packet is sent immediately. The packet is A single broadcast packet with the target address set to the MAC address of Site.
After the package enters the vswitch, it also learns the source MAC address and then searches for the target address. Because the MAC address table already contains A match entry for the MAC address of Site, therefore, the switch forwards the packet directly from the corresponding port.
Through the previous ARP process, the exchange chip saves the information of Site A and site B in its MAC address table. After communication between A and B, or other sites in the same network segment want to communicate with A or B, the switch will know the port from which the packet is sent. From the above process, we can see that all layer-2 Forwarding is completed by hardware. No software intervention is involved in both the learning process of the MAC address table and the process of determining the output port by searching the destination address.
Layer-3 switches communicate with sites A and B through layer-3 switches. The CIDR blocks of Site A and site B both belong to the direct connection CIDR blocks of the vswitch. If Site A and site B are not in the same subnet, the sender A must first send an ARP request packet to the "Default Gateway, the IP address of the "Default Gateway" is actually the IP address of the VLAN to which site A belongs on the layer-3 switch.
When station A broadcasted an ARP request to the IP address of the "Default Gateway", the switch sent an ARP reply packet to Station A, telling the MAC address of the VLAN of the Site, at the same time, you can set the IP address, MAC address, and port number of Site A directly connected to the switch to the layer-3 hardware table of the switch chip through software.
After receiving the ARP reply packet, Site A replaces the destination MAC address and sends the packet to B to the switch first. After receiving the package, the switch first learns the source MAC address. The destination MAC address is the MAC address of the switch, in this case, the paper will be sent to the layer-3 engine of the switch chip for processing.
Generally, the layer-3 engine has two tables, one of which is the host route table, which is indexed by IP addresses, which stores information such as the destination IP address, Next Hop MAC address, and port number. If a matching table item is found, the packet will be forwarded from the specified port in the table after some operations are performed on the packet, such as replacing the destination MAC with the source MAC, and decreasing the TTL by 1.
If no matching entry is found in the host route table, the route table of the CIDR Block in the other table is queried. This table stores the network segment address, next-hop MAC address, port number, and other information. In general, this table has much fewer entries, but it covers a large range.
- Brief Introduction to core switch principles
- Introduction to Ethernet switch protocols
- Describe
- Describes the main differences between a wireless switch and a hub
- Differences between vswitches 1, 2, and 3
If properly configured, most of the packets entering the switch can be forwarded by hardware, which not only greatly improves the forwarding speed, but also reduces the CPU load. Because the layer-3 engine inside the chip has saved the routing information of Site A and site B.
After the sites A and B communicate with each other or sites in other network segments want to communicate with A and B, the switch chip will directly forward the package from the port specified in the three-tier hardware table, instead of handing over the package to the CPU. This method greatly improves the forwarding speed through "one route and multiple exchanges.
Although it has been only a few years since the concept was proposed and Its Application in network construction has become more and more extensive, from the initial backbone layer to the intermediate aggregation layer, it is always infiltrated into the edge access layer. L3 switches have many advantages such as fast speed, good performance, and low price.
You can use a layer-3 Switch instead of a router where WAN connection is not required. With the development of ASIC hardware chip technology and the promotion of practical application, layer-3 switching technology and products will be further developed.
- Data Interface Types of each Gigabit Switch
- Learn how LAN switches solve Network Security Problems
- Comprehensive analysis of basic functions of security Switches
- PythonAndroid looks deeply at the new layer-3 Switch Technology
- Analyze the structure and application of the application layer switch