Comprehensive Analysis of layer-3 Switch basic knowledge

Source: Internet
Author: User

Layer-3 switches are quite common, so I have studied the comprehensive description of layer-3 switch technology. Here I will share it with you and hope it will be useful to you. The emergence of layer-3 switching technology solves the problem that the subnet must be managed by routers after the network segments are divided in the LAN, and solves the network bottleneck caused by the low speed and complexity of traditional routers.

A layer-3 switch is equivalent to a layer-2 switch with a layer-3 switch, but it is an organic combination of the two, it is not simply to overlay the hardware and software of a router device on a LAN switch.

The principle is: Assume that two hosts A and B that use the IP protocol communicate with each other through the layer-3 Switch. When sending host A, compare its IP address with the IP address of host B, determines whether host B is in the same subnet as host B. If B and A are in the same subnet, layer-2 Forwarding is performed. If two hosts are not in the same subnet, if A wants to communicate with the target host B, send host A to issue an ARP (Address Resolution) packet to the "Default Gateway, the IP address of the "Default Gateway" is actually a layer-3 Switch module.

When host A sends an ARP request to the IP address of the "Default Gateway", if the layer-3 Switching Module knows the MAC address of host B during the previous communication, then, the MAC address of B is returned to A. Otherwise, the layer-3 Switch module broadcasts an ARP request to B Based on the routing information. Then, B obtains the ARP request and replies the MAC address to the layer-3 Switch module, the layer-3 Switching Module saves the address and sends it back to host A. It also sends the MAC address of host B to the MAC address table of the layer-2 switching engine. After that, when A sends all the packets to B, the information can be exchanged at A high speed. Because layer-3 processing is only required in the routing process, most of the data is forwarded through layer-2 switch, so the speed of layer-3 switch is very fast, close to the speed of layer-2 switch, and the price is much lower than that of the same router.

Because the communication parties do not "package" or "package" through the vro, the host a, B, or C may belong to different subnets, they can also directly know the MAC address of the other party for communication. The most important thing is that layer-3 switches do not spread broadcast packets like other switches, A layer-3 switch is called a layer-3 switch because it can understand layer-3 information, such as IP addresses and ARP. Therefore, a layer-3 switch can understand the purpose of a broadcast packet without spreading it out, it also satisfies the needs of the people who issue the broadcast packet (whether in any subnet ). Because the layer-3 switch does not perform any data packet splitting or hitting, all data packets passing through the switch will not be modified and will be transferred to the destination at the exchange speed. Therefore, the layer-3 switch technology can be used to achieve the network routing function and achieve optimal network performance according to different network conditions.

L3 Switch Type

Layer-3 switches can be divided into pure hardware and pure software based on their data processing.

(1) Hardware-only layer-3 technology is relatively complex, costly, but fast, with good performance and strong load capabilities. The principle is to use an ASIC chip and hardware to search and refresh route tables. When the data is received by the port interface chip, first find the target MAC address in the layer-2 switching chip. If yes, perform layer-2 forwarding; otherwise, send the data to the layer-3 engine. In the layer-3 engine, the ASIC chip searches for the corresponding route table information, compares to the destination IP address of the data, and then sends the ARP packet to the destination host to obtain the MAC address of the host, send the MAC address to a layer-2 chip and the layer-2 Chip forwards the packet.

① Port A sends an ARP request to the layer-3 Switch Module
② Layer-3 Switching Module broadcasts ARP requests to the network segment of port B
③ ARP response from Port B
④ Update the MAC address table

(2) The software-based layer-3 switch technology is relatively simple, but slow, not suitable for cooperation. The principle is to use the CPU software to find the route table. When the data is received by the port interface chip, first find the target MAC address in the layer-2 switching chip. If the data is found, perform layer-2 forwarding. Otherwise, the data is sent to the CPU. The CPU looks for the corresponding route table information, which is opposite to the destination IP address of the Data. Then, it sends the ARP packet to the destination host to obtain the MAC address of the host and sends the MAC address to the L2 chip, the second-Layer Chip forwards the packet. Because low-cost CPU processing is slow, the processing speed of such a layer-3 switch is slow.

① Port A sends an ARP request to the layer-3 Switch Module
② Layer-3 Switching Module broadcasts ARP requests to the network segment of port B
③ ARP response from Port B
④ Update the MAC address table

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.