The principle of-dijkstra algorithm for Internet IP routing based on hop-on global optimization

Source: Internet
Author: User

Half of what was written on the weekend went on to make it a perfect day.
One of the facts we know is that there are so many IP addresses that it is impossible to manage them uniformly, both from the data plane and from the control/management plane. Therefore, the IP protocol is designed to be extensible. For IP routing, the route calculation is hop-on, and of course, the "Source Routing" option, source routing means that the data before the departure of the route has been planned, hop-by-step routing is the standard form of IP routing, that is, the IP packet is on the road to the immediate planning route.
I prefer IP routing because this is the way I travel, I like to travel, but I do not like to book hotels in advance, planning routes, navigation, etc., my way is to see the road signs on the way, to the temporary stop after carrying a backpack to find a place to live, and then go to where to calculate, this is a walk and no destination wandering ... Of course, IP packets are destined.

Jump-through global optimization

IP routing is on each router hop-on routing, then there is a problem, a huge internet, how to believe that so many hop-on routing stitching up a complete path is really the most optimized? The answer is clearly definite, and the question is how to prove it.

Routing algorithms

In the book, the routing algorithm is basically divided into the distance vector algorithm and link state algorithm, the respective protocol masterpiece is RIP and OSPF (I rely on these two to find the first job), it is true, but from the correctness of these algorithms in the process, you will find that it is indeed " The most optimized route to hop is really the most optimized route for the global. In this paper, I only give proof of the Dijkstra algorithm based on link state routing protocol, because the link state database of each device is the same, so it is well understood.

Dijkstra algorithm Correctness proof

First of all, the correctness of the Dijkstra algorithm is proved in order to follow up. After all, the Dijkstra algorithm itself only guides the step by step steps, and it does not prove that every path in the shortest path tree that has been so frustrating is indeed the shortest. This fact is needed to prove the principle of jumping global optimization.
The following gives a simple proof of the correctness of the Dijkstra algorithm, the detailed and complete mathematical proof can refer to this idea:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M00/5C/2C/wKiom1UbwxbzEUlBAAM5Bu0wZkE077.jpg "title=" Dij1.jpg "alt=" Wkiom1ubwxbzeulbaam5bu0wzke077.jpg "/>

One-Hop global optimization problem

The following name points to the problem where the hop-over global optimization is:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5C/26/wKioL1UbxGHCzLWxAAHYsHfukj8486.jpg "title=" Dij2.jpg "alt=" Wkiol1ubxghczlwxaahyshfukj8486.jpg "/>

Proof of one-hop global optimization

The following gives a simple proof of the global optimization of hop-on, proving that there are a variety of ways, and I'm just giving one of them:

650) this.width=650; "src=" Http://s3.51cto.com/wyfs02/M01/5C/26/wKioL1UbxG6xi68iAAK5teHjAZM433.jpg "title=" Dij3.jpg "alt=" Wkiol1ubxg6xi68iaak5tehjazm433.jpg "/>

Attached: Greedy model of Dijkstra algorithm

If we pour a glass of water on the ground and observe the traces of water spreading out, we will understand the Dijkstra algorithm, which is indeed self-evident. Nature is lazy, always in the most labor-saving way, the water molecules at the point of landing, on the rough ground due to gravity (temporarily not consider other molecular forces) along a certain path to reach a series of points, these paths must be the shortest path. Can we think of the rugged degree of the ground as the weight of the path, which is not exactly the same as the Dijkstra algorithm model?


The principle of-dijkstra algorithm for Internet IP routing based on hop-on global optimization

Related Article

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.