Recursive Routing Query Method and related diagrams

Source: Internet
Author: User

We know that the route Query Process is to find the next hop of the data packet! IP routing sends data packets to the destination one by one. The next hop is the IP address of the corresponding interface of a vro directly connected to itself. This is a reasonable understanding. However, IP routing provides another method, that is, the next hop does not have to be directly connected to itself. It can ignore the "nearby Topology" of the current router and directly inform the topology of a relatively distant location, as shown in:

The next hop to the Server is R2 and R1. so on. When the routing search logic of the protocol stack is searching for a route, if nexthop is not directly connected to itself, then the nexthop will be used as the destination to search the route table again according to the above logic until the nexthop directly connected to itself is found or completely failed. This route is equivalent to pushing nexthop to a distance. What are the benefits of this recursive search? Obviously, recursive routing can minimize the impact of nexthop on the topology changes of nearby networks! For scenarios where Static Routing is required, reasonable recursive routing planning can greatly simplify the maintenance workload of Static Routing. Of course, if you use dynamic routing, it is unnecessary, you Need To Know That recursive routing is easy to maintain at the same time, the cost is that the router increases the search pressure. An example shows the topology as follows:

Imagine that if there is a problem with the R2 link when it reaches R1, now we need to switch the nexthop of N1, N2, and N3 to R7, you need to modify these three routes at the same time (even worse when route aggregation cannot be implemented). However, if we already know that the routes to N1, N2, and N3 must go through R3, you can configure N1, N2, and N3 nexthop to be R3, And the problematic link is bypassed logically. In fact, the routing search logic of the protocol stack helps the Administrator find a route to R3, and the final nexthop is still directly connected to R0. The end condition of recursive search is direct connection between destination and R0. In terms of configuration, the requirement for addressing three networks is changed to the requirement for addressing R3, which simplifies the configuration. You only need to configure a default gateway, the configuration that needs to be changed during link switching is much less.

However, remember that recursive routing does not change the path of any data packet to the target network, and it will eventually be implemented on a direct connection to nexthop. If we reverse push Based on the configuration of recursive routing, then you can configure a non-recursive "normal route". This normal route configuration can also solve the preceding complicated configuration problems. Therefore, recursive routing is a lazy way to some extent. In addition, the main point of recursive routing is that you must be familiar with the entire network topology and use recursive routing to bypass frequently changing links, as a static route, link changes mean that all related routes must be reconfigured. Recursive routing can reduce the configuration workload. A trade-off between whether or not recursive routing is used is: if the link to the target network cannot converge into a link with a smaller number than the target network, recursive routing is meaningless.

Actually, I found that Windows has the recursive routing configuration function. Of course, Cisco doesn't, but Linux doesn't, so it's half done, leave a CONFIG_IP_ROUTE_PERVASIVE macro empty. The most unfortunate thing is that there is a NHFLAGS: = [onlink | pervasive] In iproute2. this pervasive is the most hateful. Linux is always like this. The implementation of the kernel is always inconsistent with that of the User-State program !!

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.