Diagram of the route entry positioning structure based on the DxR algorithm Concept

Source: Internet
Author: User

Diagram of the route entry positioning structure based on the DxR algorithm Concept

First, the question is about the positioning structure of the route entry rather than the search structure. In this case, when an IPv4 address is used as the input, the next hop is obtained, there will be no search operations. You just need to constantly use index positioning. In order to have an intuitive understanding, the search structure is given first:

1. Start with multi-level indexes. In my failure experience, I attempted to completely imitate MMU to design the route query structure, and the result failed. In fact, if you think about it now, it will not fail because the number of Route entries is limited. For the entire 4G IPv4 address, its quantity can be ignored. Therefore, you can still use multi-level indexes. The 16-16 second-level segmentation results are also good, and it is not difficult to understand the construction and search structure. However, we can calculate the memory usage of the table. The 64 K level-1 index table is required. Based on the number of Route entries whose prefix length is greater than 16, N 64 K Level-2 table items are split, then it is over. There are N + 1 64 K table items in total. The first-level index points to the address of the second-level table, at least 4 bytes. The second-level table item can point to the index of the next-hop table, because the number of next hops for a direct connection does not exceed or 1 bytes.
I can finally give a real DxR structure in this article, not just an idea. As shown in:



What I want to talk about it is the "if". In fact, this step is left. As long as you can find a way to quickly index the interval idx, the problem is fixed.
Now the question is how to distinguish it. At this time, the first fact we just realized is useful. Yes! It is the table indexed to by the second-level table by the vertex interval number of the first-level table index. This table is obviously the join table with the next hop in the interval. Overall:



It can be seen that the ultimate goal of array subscript addressing is to convert sparse data into dense data. If not, additional tables should be introduced to extract shared data.


The reason for this is that I only have one table with two low interval levels. For different first-level vertex intervals, the low interval is different in terms of quantity and distribution. That is to say, each hash interval has its own low interval. In this way, there is no way to use a unique low interval table to index the low interval extended by multiple hash intervals. Therefore, I must map all these independent Low-interval sets to the same 16-bit domain, and the ing process is shown in! The process is described as follows:1) all the elements of Low-interval Split points corresponding to M hash points are put into a set S;2) sort the S of the set and remove the repeating element. In this case, the number of elements in S is N;3 ). create N joined tables. The n elements of each joined table are arranged in the order of the index at the first-level vertex interval, the next-hop index is either saved before the merge of the Lower Interval-the split point is inherent in the Lower Interval, or inherits n-1Corresponding to the next hop at the subscript-this split point is put in for unified ing. At this point, we can compare my thoughts on DxR and my thoughts on merging low intervals. DxR thought: all the low-level intervals corresponding to the first-level vertex intervals are arranged separately. Because all the low-level intervals are in the same 16-bit domain, severe data redundancy may occur between them, the DxR algorithm cannot find this point. The low-interval merge idea: all the low-interval levels corresponding to the first-level vertex intervals are arranged in a unified manner, so redundant data can be removed, for example, the low interval Split points of 1.2.3.0/24 and 2.2.3.0/24 have 3.0/8, which can be merged, but a large interval may be split into multiple small ones... here is an example of a Low-interval split point sequence corresponding to the following four first-level vertex intervals:, 32, 24, 32, 32For the DxR algorithm, it is clear that all the above Split points are written in the interval table:, 16, 32 ", 20, 25, 32 |, 32 |In the low interval merge method, the merged interval is:It can be seen that many redundant interval Split points are eliminated, but for all the vertex ranges, it splits some low intervals into two identical ones, of course, the next hop is also identical... this is the price, but it must be paid. 5. My next hop positioning structure is not ink-free, and the train is not too long. The key is that the traffic is unstable and can only be written offline. In fact, Mobile IP addresses are currently too spam. When high-speed trains are moving fast, the application layer cannot be guaranteed to be uninterrupted and MLXGB is not guaranteed. So I should say less, how should I be cautious? Oh, NO!


How good is this? I want to say that it rejects all the search operations at least. It is just a simple positioning! But does it change the shameful time with a huge and noble space? Oh, NO! Now let's take a look at the memory usage of the DxR algorithm. This figure is from http://www.nxlab.fer.hr/dxr /.

Router operating system practices, because the operating system kernel protocol stack of professional routers usually only focus on the control plane and management plane, and the data plane operations are not completed in the operating system protocol stack at all, what is the control plane and Management Plane Control and Management completed by specialized hardware or software subsystems? Is the data plane!
Iracos(This name is really not long for me ).... in fact, I also taught the driver what he didn't know, that is, rotating the lift seat will blow up and baidu will show it to him... no matter who you are, you can always be your own wet... he may be a brother, a three-wheeled driver, a courier or even a restaurant waiter. But you also want to teach him one thing in return, such as a seat explosion... this is the true meaning of Christianity. Everyone is me and everyone is me. My mom believes in religion. Without knowing it, I believe it too .... explosion if I can promote the company's products and technologies in the spirit and ability of promoting the explosion of seats, promote cooperation with other families, and promote product improvement, what a beautiful image it will look like... explosion!

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.