A candidate route through B starts with the A to B link cost.

highlighted = computed this step

A pays the link to B first

A cannot use B's advertised number by itself. It must add the A to B link cost first.

link cost=1\text{link cost}=1
Add link costRouter A recomputes candidates from B and updates only rows that improve.Add link cost - A via B, route A to B to D, cost 5destcurrentB advertises1 + advdecisionupdatednext hopA012keep self0selfB101tie1BC523improve3BD99945improve5B

Candidate for C

B advertises C at 2, so A's candidate through B is 1 plus 2.

1+2=31+2=3
Add link costRouter A recomputes candidates from B and updates only rows that improve.Add link cost - A via B, route A to B to D, cost 5destcurrentB advertises1 + advdecisionupdatednext hopA012keep self0selfB101tie1BC523improve3BD99945improve5B

Candidate for D

B advertises D at 4, so A's candidate through B is 5.

1+4=51+4=5
Add link costRouter A recomputes candidates from B and updates only rows that improve.Add link cost - A via B, route A to B to D, cost 5destcurrentB advertises1 + advdecisionupdatednext hopA012keep self0selfB101tie1BC523improve3BD99945improve5B

Summary

Each candidate is link cost to B plus B's advertised cost to the destination.

candidate=1+dB(dest)\text{candidate}=1+d_B(\text{dest})
Add link costRouter A recomputes candidates from B and updates only rows that improve.Add link cost - A via B, route A to B to D, cost 5destcurrentB advertises1 + advdecisionupdatednext hopA012keep self0selfB101tie1BC523improve3BD99945improve5B