Basic Features: introduces the layer-3 Switch Technology for exact match Query

Source: Internet
Author: User

Basic Features: This article introduces the layer-3 Switch Technology for exact matching and query. It is very complicated for many people to discuss the technology of layer-3 switches interconnected between companies or large network connections of the company, this is confusing. Despite this, many people still need to understand the construction of layer-3 switch technology.

On a vro, whenever a datagram is received, the vro queries the route table to find the next hop of the datagram and then sends it out through the corresponding interface. The longest matching algorithm is used to query the route table of a vro. In the previous vro, the longest matching algorithm was implemented by software and complicated, resulting in extremely low efficiency.

We can imagine whether we can change this longest matching search idea and use the exact match search technology to achieve it? A high-speed buffer can be introduced to store the information required for precise query. Generally, the layer-3 IP address corresponds to the fib table at the egress, and some layer-2 encapsulation information Arp tables are associated, such as the link layer first class ), when receiving a data frame that requires layer-3 forwarding.

The router first queries the high-speed buffer using the exact match algorithm, that is, Indexing Based on the destination IP address). If hit, data is forwarded based on the queried information. If hit, the query route table uses the longest Matching Algorithm), forwards data based on the query results, and updates the corresponding precise Query Buffer, so that when the data is sent to the same destination, you can directly query the exact match buffer for forwarding.

Like a CAM table, the exact match query item also has a timing mechanism. If the time limit is exceeded, it is deleted from the buffer. Unlike a CAM table, the layer-3 exact match query item is synchronized with the route table. Whenever the route table changes, the precise forwarding buffer must be modified to ensure synchronization with the route table. If the data link layer is Ethernet and the network layer is IP, the layer-3 high-speed forwarding buffer is established through the ARP protocol. We will explain how it works.

At the beginning, the layer-3 switch technology only had one route table for routing. The route table was created through the Routing Protocol), and the exactly-matched layer-3 forwarding table was empty, in this way, when the layer-3 Switch Technology receives a data frame that requires layer-3 switching, it first queries the layer-3 exact matching buffer. Because the layer-3 forwarding table is empty, the query fails, layer-3 switch technology uses the longest match algorithm to query the route table based on the destination IP address of the datagram). The query result is an egress usually a VLAN Interface) and a next hop. Therefore, there are two possible cases:
◆ The destination address of the datagram is not in the same CIDR block as the VLAN interface;
◆ The destination address of the datagram is in the same CIDR block as the VLAN interface.

In the first case, layer-3 switch technology uses ARP resolution to resolve the next hop IP address. After obtaining the next hop MAC address, layer-3 switch technology encapsulates the received data frames in two layers, and then send it to the next hop. In the second case, the layer-3 switch technology directly parses the destination IP address of the datagram, obtains the MAC address of the host corresponding to the destination IP address, and then directly sends the data frame to the destination host.

In either case, when the switch performs ARP resolution, it will obtain a corresponding relationship between the IP address and the egress, and also obtain the next hop MAC address through the ARP protocol, the layer-3 switch technology combines the data into a layer-3 exact match and inserts it into the layer-3 exact match buffer. In this way, when the datagram arrives at the same destination, the layer-3 switch technology uses the exact match algorithm to directly query the high-speed buffer and forward the data based on the query results.

It should be noted that the implementation of layer-3 exact match is not a required feature of layer-3 switch technology. In some low-end vswitches, the longest matching query is implemented by software, and the efficiency is very low. Therefore, it is reasonable and necessary to introduce a three-layer exact matching algorithm, but for some high-end scenarios, this is not suitable for some high-end switches.

The longest matching algorithm is implemented based on hardware and uses a tree search algorithm with high efficiency, which is similar to the exact matching algorithm, in addition, only the longest matching algorithm is used to reduce the synchronization problem between the precise matching buffer and the route table. Therefore, in some hardware-based layer-3 switch technologies, exact matching is not necessary. Later, we will introduce how to use the longest matching algorithm to implement a high-end three-tier switch.

This section has the following key points: in order to improve efficiency, the layer-3 switch technology adopts the exact 78 matching search algorithm. In some high-end Layer-3 switch technologies, this feature is not necessary, because the efficiency of the longest matching search algorithm is not necessarily worse than that of the exact matching search algorithm.

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.