 Hello and welcome to a lecture on distance vector routing. Learning outcomes by the end of the session student will be able to illustrate distance vector routing algorithm. Here you may pause the video and answer this question. What do you mean by adaptive routing algorithm? Adaptive routing algorithm modify their routing decisions or the routing tables to accommodate the changes in the network topology and changes in the traffic as well and these adaptive algorithms are also called as dynamic routing algorithms. The distance vector routing is a adaptive routing algorithm means it accommodate the changes going on in the topology of the network and changes going on in the traffic as well. An autonomous system is seen as a graph with nodes representing the routers and the arcs or the line connecting the nodes represent the link. The distance vector routing is based on a graph theory. This graph theory uses an algorithm called as Bellman Ford or also called as Ford Fulkerson algorithm which find out the shortest path between the nodes in a given graph provided the distance between the node is given. The basis of this algorithm is very simple. If all the neighbors of the node i knows the shortest distance to node j then the shortest distance between node i and j can be calculated by adding the distance to node i and each neighbor to the neighbor's shortest distance to the node j and then selecting the minimum among all. In distance vector routing algorithm each router maintain a routing table and that table contains the best known distance to each destination network and which output line to be used to forward the packet so that it reach the destination network. These routing tables are updated by exchanging information with the neighbors. The router is assumed to know the distance to each of its neighbor. The distance is nothing but a metric. The well-known metric for distance vector routing is number of hops. The distance to the adjacent node when the metric is hop is just one hop. The other metrics are also possible like bandwidth, traffic, cost, communication cost and so on but generally for distance vector routing the metric used is hops. Distance vector routing uses Bellman-Ford algorithm and what is that let's see. In Bellman-Ford algorithm the cost normally used is number of hops so the cost between or the distance between any two directly connected routers or the network is set to one. Each router needs to update its routing table independently whenever it receives some information from its neighbor. Once a router has updated its routing table it should advertise the results, updated results to its neighbor so that the neighbors also can update their routing tables. Each router should maintain at least three pieces of information for each route entry and the first piece of information to be maintained is destination network, the cost to that destination network and the next hop to reach that destination network. The update advertise has only two pieces of information in it. The destination network and the cost for each route is advertised. Advertise means it is sent to the neighbors. The next hop information is not included in the advertised message because the next hop is nothing but source address of the sender itself. Then how the routing tables are updated. Whenever a update reaches a router the router searches its routing table for the destination network received in the advertisement. Then there are the two chances if the corresponding entry for that particular received destination network is found then there are two cases. The first is if the cost to the advertised network plus one is smaller than the corresponding cost in the routing table which is already present. Then this implies that the neighbor has found a better route to the destination network. Then the second case is if the next hop is same as that one in the previous table it means some change has took place in the some part of the network. If the destination network received in advertise is not present in the routing table of the router then the router add this entry to its table and sort the table according to the destination network address. Let us see how distance vector routing updates the table with simple example. Here we have one autonomous system as distance vector routing is an interior protocol which handles the routing inside this particular autonomous system. This autonomous system has 5 routers router A, router B, router C, D and E. Each router has their routing table which is prepared or filled with some entries upon booting without any updates. It is on booting the routing tables have the entries of their directly connected networks. Now let us understand how the after receiving updates how the routing table is updated. Consider that router A sends 4 updates 4 update advertise or updates to router B ok. Then here you can clearly see that here these 4 updates are sent to B from router A ok. Then when the first update reaches the router B then router B search for the network destination network here the destination network is net 1. Search for this address in its routing table and as it does not have the entry for the net 1 he will add that entry and as router B does not have the entry for net 1 he will straight away add this entry to its routing table with increasing the cost by 1. The received cost or the distance is 1 so he will add to that another distance 1 and it becomes 2. Then in the next hop entry column he will add the address of the advertiser the advertiser is nothing but A so in this column the entry will be router A. Then when it receives the second update then he will check his new updated routing table whether the net 2 this destination net 2 is present yes it is present and the advertised cost as it is equal to an already cost which is present in the routing table he will not update or he will not add this entry to the routing table. Here is your second table which shows that it has already net 2 when he receives the third routing update that time he will check whether net 4 is present as it is not present in its routing table he will add that entry by increasing the distance or the cost by 1 and next hop as A similarly after fourth update he will add the net 5 network 5 with cost of 2 and next hop as a router A. All the 4 updates are now accommodated but the routing table of B is not yet complete because B does not have any idea about this network 7 ok so some more updates are required similarly you can construct the routing tables of all the routers these are the references used and thank you.