Link State algorithm and Distance Vector Algorithm

๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€๐Ÿ˜€

Can anybody explain in simple terms both link state and distance vector algorithms using very simple diagrams decribing their routing tables any digaram simple diagram will do just to make concepts more clearer ??

Replies

  • durga ch
    durga ch
    seems like I have overlooked this post! ๐Ÿ˜€

    I think I have already mentioned in reply to some psot that routing protocols are of three types.
    consider the below routed network
    --------------R1--
    -------------/--\--
    ------------/----\--
    -----------R2----R3--
    -------------------\--
    --------------------R4---LAN1
    now if you look into the routing table of R1, since R2 and R3 are directly conntect networks, a default link is present. but what if you want to ping to a host connected to LAN1 through R4? It will fail - as R1 doesnot have an entry made for R4 in its routing table. it doesnot know where to forward the packet to.
    To have a successful ping from R1 to R4, either a defualt gateway has to be set up as R3 , and since R3 has an entry to R4 in its routing table, it will forward the packet.
    another way out is to have an static route to R4 from R1, this wont happen all the time and if the link crashes, god know how many other links need to be modified
    The best way is to automate the whole process of routing table updation, by running a routing protocol.

    Distance vector protocols :
    these protocols are old school ones, in sense hwen classful addressing was in place and classful routing was in place. examples of DVP are RIPv1, and RIPv2 ( route intiation protocol).
    Fuctionality:
    They work on rumour. consider this example - you have a ditant uncle who bought sometime. though you did not see him buying it, you get to know he bought it through some relative's relative.
    thus- in pour example- R1 doesnot know where is R4, it just recieves information from R3 saying-' hey I have another network conencted to me and i am dumping it on you', and thus sends across a routing update. In case R1 doesnot have the same network updted in its rotuign table, it updates the network details. Same is with R4 table. R3 says R4 - hey look - I have R1 and R2 networks in my rotuing table, take them' and R4 as well now updates the details of R1,R2
    The otherside of this is- you can just keep on doing it over infinite relatives. You have a limit for that and that limit in RIP is 15. Routers cannot gossip over 15 hops.insense, after 15 hops the packet might as well get dropped, if there is no network there and what more, its hop count based, in case the router finds 2 diffrerent routes to same network, it will consider the network with least hope count - this is like - you have a 300kmph road of 300 kms long and you have a 50kmph road of 30kms long, you would say if you are a RIp router " alright, I will take 30kms route", as you see only distance- you dont really consider other factors involved.
    This protocol is now almost obsolete.
  • durga ch
    durga ch
    and.. link state


    link state protocols:
    examples of this type of routing protocol is OSPF and IS-IS. As you might be knowing OSPF works on Dijikstra's algorithm.OSPF was mainly designed for entreprise networks, ie it can be considered to be interior routing protocol. OSPF introduces new term known as area . All the routers in a specific area have a designated Router a DR, a BDR ( backup designated router and a ABR(area boundary router), there goes the topology of the link state routing protocols.( mainly OSPF)

    there are always elections which happen for choosing DR, BDR and ABR ( you dont have to know those details here)
    Funcationality:
    Unlike DVR , links state routers dont dump information, instead they share link state information within a area. An entreprise can have many areas and area 0 is considered as a backbone area. Like in DVR , in link state as well periodic updates called LSAs are exchanged between 2 routers .in brief, intially a neighbours are formed, remeber it this way - a new guy has moved next to my house and is blowing up my roof with his sound system- so though he is my neighbour- I wont help him when he needs it as he his screwing up my life. so the neighbour table consists only of friends. from these friends list - I tend to pick up thsoe who are less expensive on my pocket ๐Ÿ˜. Similarly, for OSPF the cost is the bandwidth . OSPF choses link with least cost as its next hop link.This is where - Shortest path first comes into play.

    PS: I have put up a simulation of RIP in my blog, if you want you can check it out. OSPF is still not yet up. Will let you know once I write something about it

You are reading an archived discussion.

Related Posts

Dr. Naveen Garg, Department of Computer Science and Engineering ,IIT Delhi explained the concept of Trees in Data Structures and Algorithms. Feel free to ask your questions and contribute your...
Dr. Naveen Garg, Department of Computer Science and Engineering ,IIT Delhi explained the concept of Tree Walks / Traversals in Data Structures and Algorithms. Feel free to ask your questions...
Dr. Naveen Garg, Department of Computer Science and Engineering ,IIT Delhi explained the concept of Ordered Dictionaries in Data Structures and Algorithms. Feel free to ask your questions and contribute...
Dr. Naveen Garg, Department of Computer Science and Engineering ,IIT Delhi explained the concept of Deletion in Data Structures and Algorithms. Feel free to ask your questions and contribute your...
Dr. Naveen Garg, Department of Computer Science and Engineering ,IIT Delhi explained the concept of Quick Sort in Data Structures and Algorithms. Feel free to ask your questions and contribute...