Routing loops (routing loop) and counting to infinity (count-to-infinity)
When the cost of a link is reduced, we call it a "good news". In the network, good news is often transmitted quickly. For example, there is a network: at a certain point, Y detects that the link cost of x is reduced from 4 to 1, and the good news is, of course, to tell everyone, so it updates its own distance vector and notifies Z. After receiving the update message for Y, Z also updated its own distance vector (reduced from 5 to 2) and sent updates to the neighbors. Then y received the update message for Z, but it found that it did not change its minimum cost, so it remained unchanged. In this way, only after two iterations of the network to achieve static. Good news has spread quickly through the Internet.
However, when the link costs are increased (or even disconnected), it will not be so simple. Let's look at the following example: or X, Y, z three nodes. At this point y detects that the path cost to X is increased from 4 to 60. At this point the distance vector of node Z is: D (X) = 5, D (Y) = 1, d (z) = 0. So Y found out in the update vector, gee, Z to x distance is only 5 eh, that can go to Z and then x, so the distance vector of Y is updated to: D (x) = 5 + 1 = 6, d (Y) = 0, d (z) = 1. We can see that this logic is obviously wrong, because the distance from Z to x is 5 if you want to go through Y, but the Y-update path goes through Z, which creates a routing loop (Routing-loop) problem. Because Y's distance vector is updated (albeit incorrectly), it sends an update message to Z. Z received the update message, compared the next neighbors to x distance, found that the path through Y is 1 + 6 = 7, less than the distance directly to X, so z also updated its own distance vector, and then the updated distance vector to Y. y receives and then updates the vector to 8 and then to Z ... In this way, the update message is passed between Y and Z, until the 44th iteration, Z calculates that it costs more than 50 to the path through Y. At this point, Z finally determines that the shortest path cost for x is directly to the cost of x 50, and y also gets the shortest path from Z to x cost 51. As you can see, the final 50 and 51 are correct, although the correct information is finally available. , but the spread of bad news is much slower than good news. Also, if the cost between x and Y is 10000,z and X is 9999, the problem of counting to infinity (count-to-infinity) occurs.

Toxicity Reversal Method (the Reverse-poison (Split-horizon) Hack)
The above routing loop problem can be avoided by the technique of toxicity reversal. The basic idea is that if Z's shortest path passes through neighbor Y, then it tells y itself that the distance to the destination node is ∞. In this way, Z gives a white lie to Y so that as long as Z passes through Y to X, it continues to tell the lie, so that Y will never try to pick the path from Z to x and avoid the loop problem. (See, sometimes the white lie is not a bad thing, but also for your sake t^t) We apply the toxic reversal technique to the above example. When y updates its distance vector, it finds that the distance between z and x is ∞, so it updates D (x) helplessly to 60 and sends an update message to Z. Z updates its own d (x) as 50 (direct route to X) and sends y update message (since z does not need to go through Y to select the path, so you will tell y yourself the distance to X is 50). Y after receiving a message from Z, renew the distance to 1 + 50 = 51, and tell Z that the distance to X is ∞ (actually 51). When Z receives the message, it finds that the minimum cost does not change, so the algorithm goes into a static state.
However, loops that involve 3 or more nodes (not just two directly connected neighbor nodes) will not be detected by the toxicity reversal technique, as in the following example:
When the connection between C and D is disconnected, the following event occurs: A receives bad news from C, and then sends the option from B to C to send an update message C sends an update message to b the problem arises because A and B cannot receive an updated message from C and then update their distance vectors. For example here, B and a compared to the updated message time is late, which gives a "illusion", in a view, although from C to D, but choose b can also. Then it told the wrong good news C, so that C also thought that he and D reunited. Finally, I finally thought of ignoring B and sending a message to B. In this way, A, B and C all think they are connected with D. But in fact D and they have been isolated ...

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.