0% found this document useful (0 votes)
179 views

Assignment

This document discusses and compares distance vector and link state routing algorithms. It uses a network of 5 college server nodes (A, B, C, D, E) to demonstrate the algorithms. For distance vector routing from node A to C, it shows the steps of the algorithm and finds the least cost path is A->D->C, with a cost of 8. For link state routing, it similarly shows the steps and finds the least cost path is A->C, with a cost of 4. It concludes that link state routing finds a better least cost path. It also discusses how routing loops can occur with distance vector and how poison reverse can solve it. Finally, it provides an enhanced comparison of the two algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
179 views

Assignment

This document discusses and compares distance vector and link state routing algorithms. It uses a network of 5 college server nodes (A, B, C, D, E) to demonstrate the algorithms. For distance vector routing from node A to C, it shows the steps of the algorithm and finds the least cost path is A->D->C, with a cost of 8. For link state routing, it similarly shows the steps and finds the least cost path is A->C, with a cost of 4. It concludes that link state routing finds a better least cost path. It also discusses how routing loops can occur with distance vector and how poison reverse can solve it. Finally, it provides an enhanced comparison of the two algorithms.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 4

Assignment:

Part A:

1. Find a real life network scenario that can be represented by the graph showed above.
Here is a real world network scenario where in say a college website it maintained by server
machines allocated for each department and the dependencies between the nodes which are
nothing but department servers can be solved by formulating links as shown in the graph.
This way a network graph is obtained representing the nodes and links with connection costs.
When a packet has to reach from one node to another node it is desirable to choose a least cost
path and hence this real world example can be taken as a problem or routing in network scenario.

2. Name a distributed routing algorithm and use the algorithm to locate the least-cost path from
node A to node C. Show steps
Distance vector algorithm is a distributed routing algorithm that can be used to locate the
least-cost path from node A to node C.
Finding least-cost path from A to C using Distance Vector Algorithm
Initial state:
Info at node/Distance to node

A
B
C
D
E

0
2

2
0
4
3
1

4
0
1
1

7
3
1
0
1

1
1
1
0

To transfer a packet from A to C with least cost, C sees D,E,B with costs 1,1,4
respectively so choose leas cost neighbor say D or E s both has same cost
Now D is reached via A with cost 7 directly hence the least cost obtained here is 7+1 = 8
Hence route A-C is given as ADC with cost 8 and can be updated in the table replacing
with 8
Info at node/Distance to node

A
B
C
D
E

0
2

2
0
4
3
1

8
4
0
1
1

7
3
1
0
1

1
1
1
0

3. Name a centralized routing algorithm and use the algorithm to locate the least-cost path from
node A to node C. Show steps
Link state algorithm is a centralized routing algorithm that can be used to locate the leastcost path from source to all the available nodes.
Here we have a source A and specific target C hence we can terminate the algorithm upon
completion of the iteration for which node is C.
Initial state when we apply Link state algorithm using A node as source
Info at node/Distance to node

A
B
C
D
E

0
2

2
0
4
3
1

4
0
1
1

7
3
1
0
1

1
1
1
0

Least cost distance to Nodes C and E can be now determined iteratively using Dijkstra's
algorithm which is one of the Link state algorithm. We can terminate the algorithm once
distance to C is computed as we are not interested in E this results in least cost A-C as
shown in the table
Info at node/Distance to node

A
B
C
D
E

0
2

2
0
4
3
1

4
4
0
1
1

4
3
1
0
1

1
1
1
0

Note that A-D cost has now changed to 4 since a least cost is found than the directed cost.
4. Compare the results you derived in the points 2&3
For the given graph network least cost route obtained for A to C using
Link state algorithm is 4
Distance vector algorithm is 8
Hence it is clearly visible that link state algorithm is much desirable.
5. Based on your comparative study in the point 4 (above), compare the algorithms you used in
the points 2&3
1. Link State Routing
Every node in the network knows the cost to its neighbors
The cost information (link state) is shared to all other nodes in the network
Every node has independent calculation of routing table.
2. Distance Vector Routing
Every node knows the cost to its directly connected neighbors nodes
Each node sends a list to neighbor node with the current cost to all other nodes
If every node updates their cost, eventually the routing table converges.
Part B:
1. Find a scenario in which routing loops can occur in the real life network scenario you
identified in Part A, point 1
For the same real life network scenario where college website server machines are
connected as the given graph

Here A is directly connected to D and B where they work fine without loops announcing
the cost of neighbors
Suppose now that router (node) A fails also that A and B both switch their next hops to
each other resulting in creation of a routing loop

2. Use the poison reverse technique to solve the routing loop problem you identified in Part B,
point 1
We can employ poison reverse technique to solve the routing loop problems where the
nodes involved in loop say D and B routers here in our scenario announces an infinite
metric cost as default route to each other, This announcement gets rid of the routing loop
immediately upon successful transmission of an update.
3. Enhance your comparative study of the two algorithms you presented in Part A, point 5
There are two important classes of routing algorithms distance vector and link-state

Distance vector routing involves two major factors namely distance or cost to a destination
and the vector i.e direction to the path. Directly connected neighbors exchanges the routing
information. So every router knows from which immediate neighbor the route was learned
but not the next neighbor routes in the path and hence a router cannot know beyond its own
neighbors. This aspect of distance vector routing sometimes results in looping and can be
overcome by techniques like split horizon and poison reverse.

Routing Information Protocol RIP is one of the example for protocol which uses distance
vector routing. RIP uses hop count as metric for the distance and it employs Bellman-Ford
algorithm to determine the least cost path.
Distance vector routing maintains only routing table.

Link-state routing in contrast global routing which requires that all the routers to know about
the paths that can be reachable from/to all other nodes in the network. Link state information
is stored in common data base from each router/node constructs the short path to all other
nodes in the network. This ensures that all the nodes will maintain a synchronized copy of the
link-state database.
Link-state routing maintains following three kinds of tables:
Neighbor table maintains the list of all neighbors. Neighbors are formed by each node
announcing the cost.
Topology table also called as link-state table, will have map of all links within an area,
and also includes each links status.
Routing table maintains the list of shortest routes to each destination

You might also like