70 likes | 84 Views
Simulate routing table updates for Node 6 using Distance Vector and Link-State (SPF) algorithms. Includes initial tables, vector receptions, and algorithm iterations.
E N D
7 C B 6 5 1 8 D A 2 2 6 3 F E 7 Part 2: Simulation Question Given the graph below, where weights are assigned on the edges, simulate the first three updates which will be carried out on the routing table information for node 6 according to each of the distributed route computation algorithms discussed in class and shown in the textbook and notes. (a) Distance Vector Routing 1) Give the initial Routing Table for node A in the graph. 2) Show what happens when A receives the first Distance Vector from B. 3)Show what happens when A receives the second Distance Vector from F. Explain your answers. (b) Link-State Routing (SPF) from Dijkstra’s algorithm 1) Give the initial Routing Table for node A in the graph. 2) Show one complete iteration of algorithm 13.1 and the resulting routing table for A. 3)Show a second complete iteration of algorithm 13.1 and the resulting routing table for A. Explain your answers.
7 C B 6 5 1 8 D A 2 2 6 3 F E 7 Distance Vector • Initial routing table for A Algorithm 13.2
Distance Vector 2. A receives 1st vector from B B [(A,6), (F,2),(C,7)] 7 C B 6 5 1 8 D A 2 2 6 3 F E 7 Routes introduced by B in RED
Distance Vector 3. A receives 2nd vector from F F[(A,3), (B,2), (C,8), (D,2), (E,7)] 7 C B 6 5 1 8 D A 2 2 6 3 F E 7 Routes introduced by F in GREEN
Link-State (Algorithm 13.1) 1. Initial 7 C B Set S 6 5 1 8 D A 2 2 6 3 F E 7
Link-State 2. 1st iteration • Choose F since D[F] is shortest. • Remove F from S. • S: • c = D(F) + weight(F, v) for every node v still in S. Then compare c with D[v]: • c[B] = 3 + 2 = 5 < D[B] = 6 • c[C] = 3 + 8 = 11 < D[C] = inf • c[D] = 3 + 2 = 5 < D[D] = inf • c[E] = 3 + 7 = 10 < D[E] = inf • Thus, update tables with shorter values. 7 C B 6 5 1 8 D A 2 2 6 3 E F 7
Link-State • Choose B (D is fine too, because both D[B] and D[D] are shortest) • Remove B from S. • S: • c = D(B) + weight(B, v) for every node v still in S. Then compare c with D[v]: • c[C] = 5 + 7 = 12 > D[C] = 11 no update for C • c[D] = 5 + 4 = 9 > D[D] = 5 no update for D • c[E] = 5 + 9 = 14 > D[E] = 10 no update for E • Thus, the tables remains same as step 2. 3. 2nd iteration 7 C B 6 5 1 8 D A 2 2 6 3 F E 7 Alternatively, If D is chosen instead of B at this step, the table is: