Building Distance Vector Routing Table

Post on 11-Jan-2016

41 views 3 download

Tags:

description

Building Distance Vector Routing Table. Filling the global Distance victor Table. Filling the global Distance victor Table Each node will have 0 distance to itself. The diagonal will be all 0's. - PowerPoint PPT Presentation

Transcript of Building Distance Vector Routing Table

Building Distance Vector Routing Table

Filling the global Distance victor Table

Node Distance

A B C D E F G

A

B

C

D

E

F

G

Filling the global Distance victor Table

Each node will have 0 distance to itself. The diagonal will be all 0's.

Node Distance

A B C D E F G

A 0

B 0

C 0

D 0

E 0

F 0

G 0

Filling the global Distance victor Table

Each node knows only the distances to its immediate neighbours. The nodes that are not neighbours will have a distance of ∞. The table is diagonally identical. The row A = column A.

Node Distance

A B C D E F G

A 0

B 0

C 0

D 0

E 0

F 0

G 0

12 3 ∞ 6 16 ∞12

3

∞ 6

16 ∞

Filling the global Distance victor Table

Do the same for each node.B column = B row

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0

C 3 0

D ∞ 0

E 6 0

F 16 0

G ∞ 0

2 ∞ ∞ ∞ ∞ 2

∞ ∞∞

Filling the global Distance victor Table

Do the same for each node.C

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0 2 ∞ ∞ ∞ ∞

C 3 2 0

D ∞ ∞ 0

E 6 ∞ 0

F 16 ∞ 0

G ∞ ∞ 0

4 ∞ ∞ ∞ 4

∞ ∞

Filling the global Distance victor Table

Do the same for each node.D, E, F and G

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0 2 ∞ ∞ ∞ ∞

C 3 2 0 4 ∞ ∞ ∞

D ∞ ∞ 4 0

E 6 ∞ ∞ 0

F 16 ∞ ∞ 0

G ∞ ∞ ∞ 0

∞ ∞ 5 ∞

∞ 5

∞ ∞ ∞

∞ 10

10

Filling the global Distance victor Table

The initial table is not complete. Each node will exchange the routing table with its neighbour to find the path to nodes with ∞.

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0 2 ∞ ∞ ∞ ∞

C 3 2 0 4 ∞ ∞ ∞

D ∞ ∞ 4 0 ∞ ∞ 5

E 6 ∞ ∞ ∞ 0 ∞ ∞

F 16 ∞ ∞ ∞ ∞ 0 10

G ∞ ∞ ∞ 5 ∞ 10 0

Getting the updates

Node A will get update from B (+12) , C(+3), E (+6)and F (+16) and add the cost to reach each one. Compare the results and take the least distance.A table will be updated and the distance to B will be changed to 5 through next hop Cbecause 2+3 < 12 or any other values in the B row.7 is the least value at row D (next hop C)26 is the least value at row G (next hop F)

Node Distance

A B C D E F G

A 0 12 +12

3 +3

∞ 6 +6

16 +16

B 12 0 +12

2 +3

∞ ∞ +6

∞ +16

C 3 2 +12

0 +3

4 ∞ +6

∞ +16

D ∞ ∞ +12

4 +3

0 ∞ +6

∞ +16

5

E 6 ∞ +12

∞ +3

∞ 0 +6

∞ +16

F 16 ∞ +12

∞ +3

∞ ∞ +6

0 +16

10

G ∞ ∞ +12

∞ +3

5 ∞ +6

10 +16

0

Node Distance

A B C D E F G

A 0

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 26 0

Take the least distance in the row (from column A,B,C,E & F only)

Old table

Updated Global distance table

First update

Getting the updates

The same thing will happen to all Nodes in the table. Take node B.B will get updates from its direct neighbours A and C. Then it will add the cost and compare. Note: anything + ∞ = ∞ which is large.

Node Distance

A B C D E F G

A 0 +12

12 3 +2

∞ 6 16 ∞

B 12 +12

0 2 +2

∞ ∞ ∞ ∞

C 3 +12

2 0 +2

4 ∞ ∞ ∞

D ∞ +12

∞ 4 +2

0 ∞ ∞ 5

E 6 +12

∞ ∞ +2

∞ 0 ∞ ∞

F 16 +12

∞ ∞ +2

∞ ∞ 0 10

G ∞ +12

∞ ∞ +2

5 ∞ 10 0

Node Distance

A B C D E F G

A 0 5

B 5 0

C 3 2 0

D 7 6 0

E 6 18 0

F 16 28 0

G 26 ∞ 0

Compare the cost and take the least

Old table

Updated Global distance table

First update

Getting the updates

The same thing will happen to all Nodes in the table. Take node C. C will get updates from its direct neighbours A, B and D. Then it will add the cost and compare. Note: anything + ∞ = ∞ which is large.

Node Distance

A B C D E F G

A 0 +3

12 +2

3 ∞ +4

6 16 ∞

B 12 +3

0 +2

2 ∞ +4

∞ ∞ ∞

C 3 +3

2 +2

0 4 +4

∞ ∞ ∞

D ∞ +3

∞ +2

4 0 +4

∞ ∞ 5

E 6 +3

∞ +2

∞ ∞ +4

0 ∞ ∞

F 16 +3

∞ +2

∞ ∞ +4

∞ 0 10

G ∞ +3

∞ +2

∞ 5 +4

∞ 10 0

Node Distance

A B C D E F G

A 0 5 3

B 5 0 2

C 3 2 0

D 7 6 4 0

E 6 18 9 0

F 16 28 19 0

G 26 ∞ 9 0

Compare the cost and take the least

Old table

Updated Global distance table

First update

Since A row = A column and so on for B & CTry completing the table and find the new column for D, E, F and G

For D only update from C (+ 4)

Node

Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0

E 6 18 9 0

F 16 28 19 0

G 26 ∞ 9 0

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0 2 ∞ ∞ ∞ ∞

C 3 2 0 4 ∞ ∞ ∞

D ∞ ∞ 4 0 ∞ ∞ 5

E 6 ∞ ∞ ∞ 0 ∞ ∞

F 16 ∞ ∞ ∞ ∞ 0 10

G ∞ ∞ ∞ 5 ∞ 10 0

Old table

Updated Global distance table

First update

Try completing the table for D, E, F and G

For Eonly update from A (+ 6)

Node Distance

A B C D E F G

A 0 5 3

B 5 0 2

C 3 2 0

D 7 6 4

E 6 18 9

F 16 28 19

G 26 ∞ 9

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0 2 ∞ ∞ ∞ ∞

C 3 2 0 4 ∞ ∞ ∞

D ∞ ∞ 4 0 ∞ ∞ 5

E 6 ∞ ∞ ∞ 0 ∞ ∞

F 16 ∞ ∞ ∞ ∞ 0 10

G ∞ ∞ ∞ 5 ∞ 10 0

Old table

Updated Global distance table

First update

Try completing the table for D, E, F and G

For Fonly update from C (+ 4)

Node Distance

A B C D E F G

A 0 5 3

B 5 0 2

C 3 2 0

D 7 6 4

E 6 18 9

F 16 28 19

G 26 ∞ 9

Node Distance

A B C D E F G

A 0 12 3 ∞ 6 16 ∞

B 12 0 2 ∞ ∞ ∞ ∞

C 3 2 0 4 ∞ ∞ ∞

D ∞ ∞ 4 0 ∞ ∞ 5

E 6 ∞ ∞ ∞ 0 ∞ ∞

F 16 ∞ ∞ ∞ ∞ 0 10

G ∞ ∞ ∞ 5 ∞ 10 0

Old table

Updated Global distance table

First update

Try completing the table for D, E, F and G

The result should beNode Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0 ∞ ∞ ∞

E 6 18 9 ∞ 0 22 ∞

F 16 28 19 ∞ 22 0 10

G 26 ∞ 9 ∞ ∞ 10 0

This is the updated Global distance table after all nodes exchanges there first update

Now we need to do the same calculation for the second update

Getting the second updates

Node A will get update from its neighbours and added the new cost to reach each one. B (+5) , C(+3), E (+6)and F (+ 16) and the same thing happens again.This time only cost to G will change to 12 through hop C

Node

Distance

A B C D E F G

A 0 5 +5

3 +3

7 6 +6

16 26 +16

B 5 0 +5

2 +3

6 18 +6

28 ∞ +16

C 3 2 +5

0 +3

4 9 +6

19 9 +16

D 7 6 +5

4 +3

0 ∞ +6

∞ ∞ +16

E 6 18 +5

9 +3

∞ 0 +6

22 ∞ +16

F 16 28 +5

19 +3

∞ 22 +6

0 10 +16

G 26 ∞ +5

9 +3

∞ ∞ +6

10 0 +16

Node Distance

A B C D E F G

A 0

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 12 0

Old table

Global distance table after second updates for A

Old tableOld table

Complete for B

Node

Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0 ∞ ∞ ∞

E 6 18 9 ∞ 0 22 ∞

F 16 28 19 ∞ 22 0 10

G 26 ∞ 9 ∞ ∞ 10 0

Node Distance

A B C D E F G

A 0 5 3 7 6 16 12

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 12 0

Old table

Global distance table after second updates

Old tableOld table

Complete for C

Node

Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0 ∞ ∞ ∞

E 6 18 9 ∞ 0 22 ∞

F 16 28 19 ∞ 22 0 10

G 26 ∞ 9 ∞ ∞ 10 0

Node Distance

A B C D E F G

A 0 5 3 7 6 16 12

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 12 0

Old table

Global distance table after second updates

Old tableOld table

Complete for D

Node

Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0 ∞ ∞ ∞

E 6 18 9 ∞ 0 22 ∞

F 16 28 19 ∞ 22 0 10

G 26 ∞ 9 ∞ ∞ 10 0

Node Distance

A B C D E F G

A 0 5 3 7 6 16 12

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 12 0

Old table

Global distance table after second updates

Old tableOld table

Complete for E

Node

Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0 ∞ ∞ ∞

E 6 18 9 ∞ 0 22 ∞

F 16 28 19 ∞ 22 0 10

G 26 ∞ 9 ∞ ∞ 10 0

Node Distance

A B C D E F G

A 0 5 3 7 6 16 12

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 12 0

Old table

Global distance table after second updates

Old tableOld table

Complete for F

Node

Distance

A B C D E F G

A 0 5 3 7 6 16 26

B 5 0 2 6 18 28 ∞

C 3 2 0 4 9 19 9

D 7 6 4 0 ∞ ∞ ∞

E 6 18 9 ∞ 0 22 ∞

F 16 28 19 ∞ 22 0 10

G 26 ∞ 9 ∞ ∞ 10 0

Node Distance

A B C D E F G

A 0 5 3 7 6 16 12

B 5 0

C 3 0

D 7 0

E 6 0

F 16 0

G 12 0

Old table

Global distance table after second updates

Old tableOld table