Computer Networks · M2 · read
Distance-vector update · example 1
Distance vector, RIP, link state and OSPF
Unit 4 · routing protocols
Practice question. Router X receives the following advertised distances to destination Z. Find each candidate route cost and the best next hop. Retain all equal minimum candidates in the answer. [3 practice marks]
Answer
Given
| Neighbour | X-to-neighbour cost | Advertised distance to Z |
|---|---|---|
| B | 1 | 4 |
| C | 2 | 2 |
| D | 3 | 5 |
To find
Candidates and the minimum total route cost.
Formula and why
C_v=c(X,v)+D_v(Z)The advertisement starts from the neighbour, so the local link to that neighbour must be added.
Step-by-step solution
Step 1. Compute every candidate
| Via | Addition | Total |
|---|---|---|
| B | 1+4 | 5 |
| C | 2+2 | 4 |
| D | 3+5 | 8 |
Step 2. Select the minimum
min(5, 4, 8)=4.
Step 3. Read all tied next hops
C is the minimum-cost neighbour.
Final answer: Cost=4; best next hop(s): C.