Applications of Graph Theory in Routing

Embed Size (px)

Citation preview

  • 8/10/2019 Applications of Graph Theory in Routing

    1/26

    Applications of Graph Theory in

    Routing

    By

    Paritosh Ramanan [2009C6PS681G]A R Pavan [2009C6PS678G]

  • 8/10/2019 Applications of Graph Theory in Routing

    2/26

    Routers

    A router is a device used heavily in computer

    networks.

    It discretely distributes data packets to each

    computer directly connected.

    It is also responsible for communicating with

    other computers on other networks in the

    most optimum way.

  • 8/10/2019 Applications of Graph Theory in Routing

    3/26

    Routers

  • 8/10/2019 Applications of Graph Theory in Routing

    4/26

    The Working of Routers

    The router uses the routing algorithm, stored inthe router's memory, to compute the path thatwould best serve to transport the data from thesource to the destination.

    The routing protocol you choose for yournetwork determines which algorithm you willuse.

    The overall performance of your networkdepends mainly on the routing algorithm.

  • 8/10/2019 Applications of Graph Theory in Routing

    5/26

    ROUTING PROTOCOLS

  • 8/10/2019 Applications of Graph Theory in Routing

    6/26

    Routing Protocols

    The decision of which path to take in order tosend the data is based upon the "weights" ormetrics, which normally depend on the averagedelay time experienced by the router to

    send/receive information.

    Time delay can be due to the material of thecable used.

    Therefore, the best possible path to take will bethe one with the lowest metric.

    Contd

  • 8/10/2019 Applications of Graph Theory in Routing

    7/26

    The routing protocol provides the informationneeded by the routing algorithm to compute itsdecisions, through a process known as a routingupdate.

    In the process it gathers information aboutnetworks and routers from the surroundingenvironment and stores the information within arouting table in the router's memory.

    The routing algorithm is run using theinformation within this table to calculate the bestpath from one network to another.

    Contd

  • 8/10/2019 Applications of Graph Theory in Routing

    8/26

    Calculating the new values within the formulathen generates a sum. The result of this

    calculation is used then to determine where to

    send information.

    Through a series of updates, each router will

    tell the other what information it has.

    Eventually, an entire routing table will be built.

  • 8/10/2019 Applications of Graph Theory in Routing

    9/26

    ROUTING ALGORITHMS

    Distance Vector Algorithm

    Link-State Algorithm

  • 8/10/2019 Applications of Graph Theory in Routing

    10/26

    Distance Vector Algorithm

    Distance vector algorithm (also called the

    Ford-Fulkerson algorithm) use metrics or costs

    to determine the best possible path.

    The core crux of the algorithm lies in the

    formula

    m(i,k)=min[m(i,t)+m(t,k)]

  • 8/10/2019 Applications of Graph Theory in Routing

    11/26

    Illustration

    Router Link Metric

    A-B 2

    B-C 3

    A-C 6

    C-D 5

    A B

    CD

  • 8/10/2019 Applications of Graph Theory in Routing

    12/26

    Distance Vector Algorithm

    The router counts weights of all its direct links

    and saves it to the table.

    It sends this information to neighbour routers.

    It in turn receives information of all itsneighbouring routers and thereby updates its

    own tables.

  • 8/10/2019 Applications of Graph Theory in Routing

    13/26

    Illustration

  • 8/10/2019 Applications of Graph Theory in Routing

    14/26

    Illustration

  • 8/10/2019 Applications of Graph Theory in Routing

    15/26

    Drawback

  • 8/10/2019 Applications of Graph Theory in Routing

    16/26

  • 8/10/2019 Applications of Graph Theory in Routing

    17/26

    Link-State Algorithm

    Identify the routers that are physically connected to them and get their IPaddresses.

    Routers measure the delay time for neighbour routers by sending echo packetsover the network. Every router that receives these packets replies with an echoreply packet.

    They broadcast their information over the network for other routers and receivethe other routers' information. In this step, all routers share their knowledge andbroadcast their information to each other.

    In this way, every router can know the structure and status of the network.

    Routers use an appropriate algorithm to identify the best route between twonodes of the network. In this step, routers choose the best route to every node.

    They do this using an algorithm, such as the Dijkstra shortest path algorithm.

  • 8/10/2019 Applications of Graph Theory in Routing

    18/26

    DIJKSTRAS ALGORITHM

  • 8/10/2019 Applications of Graph Theory in Routing

    19/26

    Dijkstras Algorithm

    Status record for each nodeon the network:

    Predecessor field - showsthe previous node.

    Length field - shows thesum of the weights fromthe source to that node.

    Label field - shows thestatus of node; eachnode have one statusmode: "permanent" or"tentative."

  • 8/10/2019 Applications of Graph Theory in Routing

    20/26

  • 8/10/2019 Applications of Graph Theory in Routing

    21/26

  • 8/10/2019 Applications of Graph Theory in Routing

    22/26

  • 8/10/2019 Applications of Graph Theory in Routing

    23/26

    Finding the Shortest Path

    This algorithm works well, but it is so

    complicated that it may take a long time for

    routers to process it.

    That would cause the efficiency of the

    network to fail.

    If a router gives the wrong information to

    other routers, all routing decisions will be

    ineffective.

  • 8/10/2019 Applications of Graph Theory in Routing

    24/26

  • 8/10/2019 Applications of Graph Theory in Routing

    25/26

  • 8/10/2019 Applications of Graph Theory in Routing

    26/26

    Thank You