User:Asidas/sandbox

Poison Reverse is an implemented algorithm that is often used within Distance vector routing. The use of poison reverse is to solve the count-to-infinity problem (more about the count to infinity problem can be found in distance vector routing).

The basic idea of poison reverse is to make sure that a path does not turn back into the same node if a cost has changed within the network. An example of this would be: Node Z routes via node Y to destination X. If the cost between Z and Y increases the count to infinity problem will occur and here we implement the use of poison reverse. As long as Z routes via node Y to get to X, Z will broadcast an infinite cost to the destination X, to the node which Z routes via (Y).

========         |   Z    | 1 /======== \ 5 ====== /           \======= |   Y   |___________|    X   | ======     2       ========


 * the numbers between nodes is the cost of the links.

Following this topology and we assume this distance vector table of Z:

Destination    Z    Y   X  Z             0    1   3 Y            1    0   2 X            3    2   0

As Z routes via Y to get to X and because of that have the cost 3. The poison reverse kicks in when we broadcast our distance vector to our neighbors: The distance tables we broadcast is:

To Y: [0, 1, ∞]

To X: [0, 1, 3]

As we see in the distance vector that is broadcast to node Y the end destination X has an infinity value. This solves the count-to-infinity problem since if the link between Y and Z will not bounce between each other and instead directly try another path.

Although poison reverse is not always working. If there's a topology like this: ̣===== | A  | ===== \______   |          \=======       =====  ======       |   C   | ——— |  D  | |  B  |______/=======       ===== ======

If the link between C and D would fail node C can still try to go through B to get to the destination. This will cause B to route through A and from there we have an loop we can not solve with poison reverse.

This can though be completed with an implementation of a distance vector protocol called RIP.