 Welcome to the session on Link state routing, I am Mrs. Kanchan Khedikar working as an assistant professor in Vulture Institute of Technology, Solapur. Learning outcome at the end of this session student will be able to describe the link state routing and they will compare distance vector routing with link state routing. So, let us start what is link state routing? It is dynamic routing algorithm in which each router shares the knowledge of its neighbor with every other router present into the network. A router sent its information about its neighbor only to all the routers through flooding. Information sharing takes place only whenever there is a change. That means suppose in the subnet network topology get change or any other new router is installed then only the information is sharing, information sharing takes place. It make use of Dijkstra algorithm for making the routing table. Link state routing, so the basic idea behind the link state routing is very simple and can be state as a five part. Each router must do the following steps, so there are total five steps. The first step is discover its neighbors and learn their network addresses. Measure the delay or cost to each of its neighbor. Construct the packet telling all it has just learned. Send this packet to all other routers. Then compute the shortest path to every other routers. So, let us start with the step by step. So here in effect the complete topology and all delay are experimentally measured and distributed to every router. Now the Dijkstra algorithm can be run to find the shortest path to every other router. Now let us see the all five steps one by one. So the first step is what learning about the neighbors. When a router is booted its first task is to learn who its neighbor is. Now if it accomplish this goal by sending a special hello packet on each point to point link. So, suppose you want to know that his neighbor adjacent routers who are its adjacent routers then that particular source router sends one hello packet ok. Now after that the router on the other end is expected to send back the reply telling who it is. Then these names must be globally unique and each and every device present on the network and that is router ok. They each and every having the unique addresses. Now when two or more routers are connected by a single LAN then the situation is slightly more complicated. Why? Because each and every router are connected with that only LAN ok. So suppose a LAN to which the three routers in this diagram three routers that is A, C and F are directly connected whereas the other routers are not directly connected to the LAN they are directly connected to the routers. So each of these router is connected to one or more additional routers. So look at this in this diagram A is connected to only one router that is B, C is connected to two routers that is D and E and F is connected to three routers that is G, H and I right. Whereas only A, C and F are directly connected to this LAN. So here in that first point or in the first step these routers know about their neighbouring routers. Now the another step is what measuring the line cost. So here the link state routing algorithm required each router to know or at least have a reasonable estimate of the delay to each of its neighbour. Then the most direct way to determine this delay is to send over the line a special eco packet that the other side is required to send back immediately. Now by measuring the round trip time and dividing it by two the sending routers can get the reasonable estimate of the delay. And for better result the test can be conducted several times and the average is used to count the delay line. Now look at this diagram. So here consider a subnet which is divided into two parts. The first part is east and the another part is west and which is connected by two lines that is CF and EI right. Now so these two parts are connected with CF and EI. So they have to select the line a proper line or proper shortest part to send its data from east to west or from west to east. Now suppose that the most of the traffic between the east and west is using the line CF and as a result this line is heavily loaded with a long delay. Then including the queuing delay in the shortest path calculation will make EI more attractive that means that means the source uses EI instead of CF. Why? Because CF is heavily loaded. But look at the next condition, after the new routing table have been installed the most of the east-west traffic will now go over the EI and the overloading the line EI. Then at that situation or we can say that consequently in the next update CF will appear to be the shortest path. Now here as a result the routing table may oscillate widely and leading to erratic routing and many potential problems are there right. So here instead of using so this line or the tables are toggle continuously. Now once the information needed for exchanging has been collected the next step is for each router to build a packet containing all the data. So the packets start with the identity of the sender and followed by the sequence number and age and a list of neighbors. For each neighbor the delay to that neighbor is given. So we will see in next diagram. So here a subnet and the link state packets are given. So subnet is given with the delay shown as the label on the line. Now look at this diagram. In this diagram total 6 routers are there A, B, C, D, E, F and the delay is given that is what A to B so what the 4 delay is 4 microsecond right or we can say that millisecond. So and B to C there is a 2 likewise on each line the delay is given. The corresponding link state packets for all 6 routers are shown in next diagram. So look at this diagram here the packet for router A is shown which shows the source name, sequence number age and its neighbor. So who are A neighbor, A is neighbor B and E. So B having a delay 4 and E having the delay 5 likewise for B router B the sequence number is given age is given and B is connected directly to whom or we can say that who are the neighbor of B, A, F and C. So for A the value is 4, for C the value is 2 and F the value is 6. So likewise here the link state packets for each and every routers are given. Now pause the video for a while and give the answer. The first one is or the question is compare a link state routing algorithm with a distance vector routing algorithm. Now here is the difference. The first point in distance vector routing lays bandwidth is required due to local sharing and small packets and there is no flooding whereas link state routing more bandwidth is required due to flooding and sending of the large link state packets. Distance vector routing algorithm based on the local knowledge whereas link state routing algorithm based on the global knowledge that is it have the knowledge about the entire network. Then distance vector routing make use of Bellman Ford algorithm whereas link state routing make use of Dijkstra algorithm. In distance vector routing traffic is less. In link state routing traffic is more because of what flooding. Now the persistent looping problem is arises in distance vector routing and this loop will in network forever whereas here no persistent loop is present. Now let us continue with the fourth step that is distributing the link state packet. Now as the packets are distributed and installed the router getting the first one will change their route. Then consequently the different routers may be using the different versions of the topology which can lead to inconsistencies loops then unreachable machine and the other problems also. So here the fundamental idea is to use the flooding. So to distribute the link state packet so to keep the flood in check each packet contain the sequence number that is incremented for each new packet sent. Now here the routers keep the track of all the pairs all the source and destination pairs. Now when a new link state packet comes in it is check again the against the list of packet already seen and if it is new it is forwarded on all line except the one it arrived on if it is duplicated it is discarded. If the packet with the sequence number lower than the highest one seen so far ever arise it is rejected as being obsolete since the router has more recent data. Now let us see the fourth step when the link state packet comes into the router for flooding it is not queued for transmission immediately. So instead it is first put in a holding area to wait a short while if another link state packet from the same source come in before the first packet is transmitted then the sequence numbers are compared if they are equal then the duplicate is discarded if they are different the older one is thrown out. To guard against the error on the router link the acknowledgement is sent. Now look at this packet buffer for router B now the table is records where the packet originated its sequence number H and the data. Now in addition there are send and acknowledgement flag for each of the B's three line. Then the send flag means the packet must be sent on the indicated line and if the acknowledge flag means it must be acknowledged there. So the last step is what computing the new routes once the router has accumulate a full set of link state packet it can construct the entire subnet graph the extra algorithm can be run locally to construct the shortest path to all possible destination. For a subnet with the end router each of which has a K neighbor the memory required to store the input data is proportional to KN. Now let us see the advantages of link state routing algorithm here link state routing is widely used in actual network and the OSPF protocol that is open source path open shortest path first protocol which is widely used in the internet and the link state algorithm is used. Now the disadvantage is heavy traffic duty flooding of packets and the flooding can result in infinite loop which can be solved by using the TTL that is time to leave. So this is the link state routing algorithm these are the references.