29
Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor Prof. Saravanan Subject: Communication Networks/ Computer networks

Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Embed Size (px)

Citation preview

Page 1: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Distance vector routing protocolThis concept gives a brief idea about the one type of forwarding protocol followed

in routing.

AuthorsParul Goradia

Mentor Prof. Saravanan

Subject: Communication Networks/ Computer networks

Page 2: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Learning ObjectivesAfter interacting with this Learning Object, the learner will be able to:

• Explain forwarding.

• Explain distance vector routing protocol.

• Complete the routing table of a given node.

• Identify the forwarding routes from one node to another node.

Page 3: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 1:

5

3

2

4

1A

B

C

D

E F

Page 4: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 1: T1: Analogy of postal office

Instruction for the animator Text to be displayed in the working area (DT)

• Show the fig in master layout 1 with all labels.

• Show letter going to B and the connecting line gets highlighted.

• Show then B transfers it to D with the connecter line highlighting and letter moving.

• Same from D to C and D to E

• And then from C to F and E to F

• A, B, C,D,E are all post offices.

• A is in Bombay and B is in Delhi.

• A receives letter to send to F house in Delhi.

• A forwards the letter to B post office in Dehli.

• B looks at the address and looks for the area in delhi.

• It sends it to D post office with the same area.

• D post office checks the address for the locality.

• D can either sent it to C post office or E post office as the address falls in both the localities.

• If it goes to C then it forwards to F

• If it goes to E then it forwards to F.

• This is similar to the forwarding protocol in routing noetworks

A

BCD

E F

Page 5: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 2: routing network

5

3

2

4

1A

B

C

D

E F

Nodes

Page 6: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 2: routing tables

5

3

2

4

1 A’s routing tableRN NH RC

1. B B 1

2. C C 1

3. D B 2

4. E C 2

5. E B 3

6. F C 3

7. F B 4

C’s routing tableRN NH RC

1. A A 1

2. E E 1

3. F E 2

4. B A 2

5. D A 3

E’s routing tableRN NH RC

1. F F 1

2. D D 1

3. C C 1

4. B D 2

5. A C 2

6. A D 3

RN Reachable nodes

NH Next hop

RC Routing cost

Page 7: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 2: T1: Forwarding

Instruction for the animator Text to be displayed in the working area (DT)

• Show the routing network and tables shown in master layout 2 under the respective nodes.

• Show the package at ‘A’.

• Highlight the red and green arrows.

• Highlight the red row in the routing table.

• Send the package from A to C and highlight the connector.

• Send it forward from C to E and highlight the connector.

• Then send package from E to F and highlight the connectors

• ‘A’ wants to forward a package to F.

• Let us see how it forwards the package to F using the best routing route i.e. the route with the least routing cost.

• A has two possible routing routes, through B or through C.

• The route cost through B is 4 and route cost through C is 3.

• Therefore the package will be forwarded to F through C since the routing cost is less.

• The transfer of packet from one node to the other is known a forwarding.

A

B

C

D

E F

Page 8: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 3: forwarding interactivity

5

3

2

4

1A

B

C

D

E H

I J

F

K

F’s routing table to JRN NH RC

1. J C 4

2. J C 6

3. J C 3

4. J B 3

5. J B 6

A

B

C

D

E H

I J

F

K

Fig 2:

Page 9: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 3: T1: Forwarding interactivity

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators

Results and output

Choose Find all the possible routes from F to J by clicking on the nodes starting with F.

• Show fig 1

•Make each connecting line clickable.

•Each colour symbolizes a possible path . (fig 2)

•In fig 2

•If the learner clicks on F, C, E, H, J then the line should become blue and the routing table should appear with this possibility.

•Similarly all the other routes need to be discovered by the learner. And routing table to be filled.

Page 10: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 4:

5

3

2

4

1A

B

C

D

E H

I J

F

K

F’s routing table to JRN NH RC

1. J C 4

2. J C 6

3. J C 3

4. J B 3

5. J B 6

Page 11: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 4: T1: Forwarding

Instruction for the animator Text to be displayed in the working area (DT)

• Show the fig and the routing table in master layout 4 • Routing is the process of constructing the routing tables in a network

such that packets ex-changed between pairs of nodes take paths which have lowest cost among all available paths.

• Routing is accomplished by a routing algorithm which is typically a distributed algorithm involving all the nodes in the network. The main reason for the distributed nature of most routing algorithms is that centralized routing algorithms are not scalable.

• There are two main classes of routing protocols: •Distance vector routing protocol and •Link state routing protocols.

• These protocols are easily illustrated using the graphical model of a network where nodes are represented by vertices on

a graph and communication links are represented by edges in the graph.

• Each edge has a cost associated with it and the goal of the routing algorithm is to find the lowest cost path between any pair of nodes.

• Let us have a look at the Distance vector routing protocol.

Page 12: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 5:

5

3

2

4

1A

B

C

D

E

A’s routing tableRN NH RC

1. B B 1

2. C C 1

D’s routing tableRN NH RC

1. B B 1

2. E E 1

E’s routing tableRN NH RC

1. C C 1

2. D D 1

B’s routing tableRN NH RC

1. A A 1

2. D D 1

3. C C 1

C’s routing tableRN NH RC

1. A A 1

2. B B 1

3. E E 1

Page 13: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 6:

5

3

2

4

1 C’s routing tableRN NH RC

1. A A 1

2. B B 1

3. E E 1

B’s routing tableRN NH RC

1. A A 1

2. D D 1

3. C C 1

Page 14: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 7:

5

3

2

4

1 C’s routing tableRN NH RC

1. A A 1

2. B B 1

3. E E 1

4. D B 2

A’s routing tableRN NH RC

1. B B 1

2. C C 1

3. D B 2

D’s routing tableRN NH RC

1. B B 1

2. E E 1

3. A B 2

4. C B 2

This entry after B sends packet

Page 15: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 8:

5

3

2

4

1 C’s routing tableRN NH RC

1. A A 1

2. B B 1

3. E E 1

4. D B 2

A’s routing tableRN NH RC

1. B B 1

2. C C 1

3. D B 2

4. E B 3

D’s routing tableRN NH RC

1. B B 1

2. E E 1

3. A B 2

4. C B 2

This entry after B sends packet

B’s routing tableRN NH RC

1. A A 1

2. D D 1

3. C C 1

4. E D 2

E’s routing tableRN NH RC

1. C C 1

2. D D 1

3. B D 2

4. A B 3

Page 16: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 5: T1: Forwarding

Instruction for the animator Text to be displayed in the working area (DT)

• Show that A send a packet to B and C.

• B and C routing tables get updated as shown in master layout 6.

• Distance vector routing protocol: •In this protocol each node constructs a vector containing the shortest distances from itself to all the nodes it knows are reachable from it and distributes this vector to its immediate neighboring nodes.

• The assumption is that a node knows which nodes are its immediate neighbors and also the costs to these neighboring nodes.

•The neighboring nodes upon receiving the distance vector update their own distance vectors if they find shorter routes to nodes which are reachable from them or if they find that new nodes which are not present in their distance vector.

Page 17: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 6: T1: Forwarding

Instruction for the animator Text to be displayed in the working area (DT)

• Show B sending packet to D, C and A.

• Show the routing tables updated as in master layout 7

• Each node sends its distance vector to its neighbors periodically resulting in a periodic update even when there are no changes in its routing table.

Page 18: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 7: T1: Forwarding

Instruction for the animator Text to be displayed in the working area (DT)

• Show D sending packet to B and E

• Show the routing tables of B and E updated as in master layout 8.

• Then show B sending packet to A and C.

• And E sending packet to C and D.

• Show the routing tables of A, C, and D in master layout 8

• When a change occurs in a node’s routing table it immediately sends its new distance vector resulting in a triggered update.

Page 19: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 8: T1: Forwarding

Instruction for the animator Text to be displayed in the working area (DT)

• Show c sending package to A

• Show A routing table entry no 5 change

• From E; B; 3 to E; C; 2.

• All these changes in the routing tables are to occur in the same animation.

• The periodic update is useful in identifying a node failure which can be characterized by the absence of the periodic update message in the last few update cycles.

Page 20: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Master Layout 9:

5

3

2

4

1

C’s routing tableRN NH RC

1. F F 1

2. E E 3

3. D E 5

4. D F 5

5. A F 6

6. B F 8

E’s routing tableRN NH RC

1. D D 2

2. F F 2

3. C C 3

C’s routing tableRN NH RC

1. F F 1

2. E E 3

C’s routing tableRN NH RC

1. F F 1

2. E E 3

3. D E 5

F’s routing tableRN NH RC

1. A A 5

2. C C 1

3. E E 2

4. D E 4

5. B A 7

FIG 1 FIG 2FIG 3

FIG 4FIG 5

Page 21: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 9: T1: Distance vector routing protocol interactivity

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators Results and output

Choose for neighbors

Data input for routing table.

Find all the neighboring nodes of C.

Complete the routing table for C.

• Show fig to

•Keep red highlighted areas in the routing table empty. (master layout 9)

• First show only first two rows with red spaces empty..

•Once they are filled show a parcel travelling from E to C and F and a parcel from A to F and B.

•Show E’ routing table fig 2

• Then third column as in fig 3 with red spaces empty.

•Once they are filled show a parcel travelling from F to C.

•Show F’s routing table fig 4 with red spaces empty.

•Show fig 5 with red spaces empty

•Result see master layout 9

A

B

C

D

E

F

3

25

1

2

2

Page 22: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

1

5

3

2

4

Step 10: T1: Distance vector routing protocol interactivity

Interactivity type (IO 1/IO 2)

Instruction to learners

Boundary limits & options

Instruction to animators Results and output

Drop down for vertices

Choose nodes for links

Data input for cost of link

1. Click on two nodes to form link between them.

Vertices:

3-6

Cost of link

1-10

• Show the nodes as dots forming a linear polygon.

• Name them A, B, C etc…

• show instruction 1.

• if learner click on two nodes form a line between the two nodes.

•Show cost data input as pop up once a link is formed.

• If learner click on ‘done’

• Show routing tables of all the nodes

•Show the routing table of each node with information of immediate neighbors.

• Later show each neighbor sending parcel to neighboring nodes and the routing tables getting updated.

• This has to be programmed.

•When one neighbor sends parcel to the other show text

•Saying routing table data sent from A to B.

Vertices

Cost of this links(value between 1 and 10)

Doneok

Page 23: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Concepts:

5

3

2

4

1• RN; Reachable node: All the destinations/ nodes that can be reached by a node.

• NH; Next hop: The next hop, or gateway, is the address of the next station to which the packet is to be sent on the way to its final destination

• RC; Routing Cost: The cost or metric of the path through which the packet is to be sent

• Routing table: • When a node needs to send data to another node on a network, it must know

where to send it, first. If the node cannot directly connect to the destination node, it has to send it via other nodes along a proper route to the destination node.

• Most nodes do not try to figure out which route(s) might work; instead, a node will send an IP packet to a gateway in the LAN, which then decides how to route the "package" of data to the correct destination. Each gateway will need to keep track of which way to deliver various packages of data, and for this it uses a Routing Table.

• A routing table is a database which keeps track of paths, like a map, and allows the gateway to provide this information to the node requesting the information.

Page 24: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Concepts:

5

3

2

4

1Route: As the size of a network grows, many pairs of nodes will not be directly connected to each otherand will depend on intermediate nodes to relay packets between them. A sequence of relaynodes which transfer information between a source-destination node pair is called a route.

Routing: Routing is the process of constructing the routing tables in a network such that packets ex-changed between pairs of nodes take paths which have lowest cost among all available paths.

Distance vector routing protocol: The main idea behind DVRP is that each node constructs a vector containing the shortest distances from itself to all the nodes it knows are reachable from it and distributes this vector to its immediate neighboring nodes. The assumption is that a node knows which nodes are its immediate neighbors and also the costs to these neighboring nodes. The neighboring nodes upon receiving the distance vector update their own distance vectors if they find shorter routesto nodes which are reachable from them or if they find that new nodes which are not present in their distance vector.

Page 25: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Questionnaire1. Consider the six-node communication network shown in the

below figure.

(a) List all routes from node S to node D. [2 points]

(b) The number alongside a link indicates the packet delay incurred on that link in seconds.

Taking the routing cost of a route to be the sum of the delays of the links which constitute the route, write down the minimum-delay routing tables for the nodes S, R1, R2 and R3 in the format shown in the table below.

1

5

2

4

3

S

R1

R2

R3

R4

D

5 s

1 s

1 s

3 S

1 S

1 S

4 S

3 S S’s Routing table

RN NH RC

Page 26: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Questionnaire- Answer1. Consider the six-node communication network shown in the

below figure.

(a)List all routes from node S to node D. [2 points]

1

5

2

4

3

S

R1

R2

R3

R4

D

5 S

1 S

1 S

3 S

1 S

1 S

4 S

3 S

Routes from node S to node D

S–R1–R3–D

S–R2–R1–R3–R4–D

S–R2–R1–R3–D

S–R2–R4–R3–D

S–R2–R4–D

S–R1–R2–R4–R3–D

S–R1–R2–R4–D

S–R1–R3–R4–D

Page 27: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Questionnaire- Answer(b) The number alongside a link indicates the packet delay incurred

on that link in seconds.

Taking the routing cost of a route to be the sum of the delays of the links which constitute the route, write down the minimum-delay routing tables for the nodes S, R1, R2 and R3 in the format shown in the table below.

1

5

2

4

3 S

R1

R2

R3

R4

D

5 S

1 S

1 S

3 S

1 S

1 S

4 S

3 S

S’s Routing table

RN NH RC

R1 R2 4

R2 R2 3

R3 R2 5

R4 R2 6

D R2 7

Page 28: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Links for further reading

Reference websites:

Books:Computer Networks – Andrew S. Tanenbaum fourth edition

Communication networks – Leon-Garcia and Widijaja second edition

Research papers:

Page 29: Distance vector routing protocol This concept gives a brief idea about the one type of forwarding protocol followed in routing. Authors Parul Goradia Mentor

Summary• The transfer of packet from one node to the other is known a forwarding.

• Routing is the process of constructing the routing tables in a network such that packets ex-changed between pairs of nodes take paths which have lowest cost among all available paths.

• There are two main classes of routing protocols: •Distance vector routing protocol and •Link state routing protocols.

• Distance vector routing protocol: In this protocol each node constructs a vector containing the shortest distances from itself to all the nodes it knows are reachable from it and distributes this vector to its immediate neighboring nodes.

• The assumption is that a node knows which nodes are its immediate neighbors and also the costs to these neighboring nodes.

•The neighboring nodes upon receiving the distance vector update their own distance vectors if they find shorter routes to nodes which are reachable from them or if they find that new nodes which are not present in their distance vector.

•Each node sends its distance vector to its neighbors periodically resulting in a periodic update even when there are no changes in its routing table.

•When a change occurs in a node’s routing table it immediately sends its new distance vector resulting in a triggered update.

•The periodic update is useful in identifying a node failure which can be characterized by the absence of the periodic update message in the last few update cycles.