lecture 10- routing part iii

Upload: yesmurali

Post on 06-Apr-2018

220 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/2/2019 Lecture 10- Routing Part III

    1/10

    LINK STATE ROUTINGLINK STATE ROUTINGLINK STATE ROUTINGLINK STATE ROUTING

    Link state broadcast node learns about the path costs from its

    neighbors

    Inform the neighbors whenever the link cost changes

    hence the name link state

    Each router does the following (repeatedly):

    discover neighbors, particularly, learn their networkaddressesA router learns about its neighbours by sending a special

    HELLO packet to each point-to-point line. Routers on the otherend send a reply.

    measure the cost to each neighbore.g. by exchanging a series of packetssending ECHO packets and measuring the average round-trip-

    time

    construct a link state packets

    send this packet to all other routers by floodingcompute locallythe shortest path to every other router

    when this information is receivedInformation will be shared when there is a change.

    40

    Concept of Link State Routing

    Cost in Link State Routing

    41

  • 8/2/2019 Lecture 10- Routing Part III

    2/10

    Link State Packet

    Flooding of As LSP

    42

    Link State Database

    43

    The Dijkstra AlgorithmThe Dijkstra AlgorithmThe Dijkstra AlgorithmThe Dijkstra Algorithm

    All the routers applies this algorithm to its link state database for

    finding the shortest path between two points on a network using a

    graph made up of nodes and arcs.

    Nodes are of two types : networks and routers.

    Arcs are connections between a router and a network(router to

    network and network to router)

    Cost is applied only to the arc from router to network.

    The cost of the arc from network to router is always zero.

    44

    Shortest Path Tree Dijkstra algorithm follows the following four steps what is

    called the shortest path tree(routing table) for each router:

    The algorithm begins to build the tree by identifying its root. The

    root of each routers tree is the router itself. The algorithm then

    attaches all nodes that can be reached from that root(neighbor

    nodes).

    The algorithm compares the trees temporary arcs and identifies

    the arc with the lowest cumulative cost. This arc and node towhich it connects are now a permanent part of the shortest path

    tree.

    The algorithm examines the database and identifies every node

    that can be reached from its chosen node.

    The last two steps are repeated until every node in the network

    has become a permanent part of the tree

    45

  • 8/2/2019 Lecture 10- Routing Part III

    3/10

    !

    46

    Example of formation of shortest path tree

    47

    48

    Step 1 Step 3Step 2

    Step 5

    Contd.

    Step 449

  • 8/2/2019 Lecture 10- Routing Part III

    4/10

    "

    Step 6 Step 7

    Step 8Step 9

    Contd

    Step 10 Step 11

    Step 12Step 1351

    Link State Routing table for Router A

    52

    Distance Vector Vs Link State Distance Vector Protocol :

    Entire routing table is sent as an update

    Distance vector protocol send periodic update at every 30 or 90 second

    Update are broadcasted

    Updates are sent to directly connected neighbor only

    Routers don't have end to end visibility of entire network.

    It is proned to routing loops

    Routing loop avoidance Mechanism used are as below :1) Max Hop Count 2) Split horizon 3) Route poisoning 4) Hold down Timer

    Distance vector routing protocol has slow convergence due to periodic update.

    Eg. RIP ,IGRP , BGP .

    Link state protocol :

    Updates are incremental & enitire routing table is not sent as update

    Updates are triggered not periodic

    Updates are multicasted

    Update are sent to entire network & to just directly connected neighbor

    Updates are carry SPF tree information & SPF cost Calculation information of entire

    topology

    Routers have visibility of entire network of that area only.

    No routing loops

    Convergence is fast because of triggered updates.

    Eg. : OSPF , IS-IS53

  • 8/2/2019 Lecture 10- Routing Part III

    5/10

    ROUTING Vs ROUTED Protocols

    A routing protocol is the communication usedbetween routers. A routing protocol allows one router

    to share information with other routers regarding the

    networks it knows about as well as its proximity to

    other routers. The information a router gets from

    another router, using a routing protocol, is used to

    build and maintain a routing table.

    Examples of routing protocols are:

    Routing Information Protocol (RIP)

    Interior Gateway Routing Protocol (IGRP)

    Enhanced Interior Gateway Routing Protocol (EIGRP)

    Open Shortest Path First (OSPF)

    54

    A routed protocol is used to direct user traffic. A routed

    protocol provides enough information in its network

    layer address to allow a packet to be forwarded from

    one host to another based on the addressing scheme.

    Examples of routed protocols are:

    Internet Protocol (IP)

    Internetwork Packet Exchange (IPX)

    55

    56

    Routing in the Internet

    What would happen if hundreds of millions of routers

    execute the same routing algorithm to compute routing

    paths through the network?

    Scale

    large overhead

    enormous memory space in the routers

    no bandwidth left for data transmission

    would DV algorithm converge?

    Administrative autonomy

    an organization should run and administer its networks as it

    wishes but must be able to connect it to the outside networks

    57

  • 8/2/2019 Lecture 10- Routing Part III

    6/10

    Most routers use dynamic routingAutomatically build the routing tables

    AS = Autonomous System

    An autonomous system (AS) is a collection of networks

    under a common administration sharing a commonrouting strategy

    To the outside world, an AS is viewed as a single entity.

    58

    The Internet uses hierarchical routing

    it is split into Autonomous Systems(AS)

    routers at the border: gateways

    gateways must run both intra & inter AS routing protocols

    routers within AS run the same routing algorithm

    the administrator can chose any Interior Gateway Protocol

    Routing Information Protocol(RIP)

    Open Shortest Path First (OSPF)

    between AS gateways use Exterior Gateway Protocol

    Border Gateway Protocol (BGP)

    59

    Routing in an AS

    IRP = Interior Routing Protocol

    Also IGP ; Interior Gateway Protocol

    Passes routing information between routers within AS

    Can use routing metric, e.g. hop count or administrative

    cost

    ERP = Exterior Routing ProtocolAlso EGP; Exterior Gateway Protocol

    Passes routing information between routers across AS

    May be more than one AS in internet

    Routing algorithms and tables may differ between

    different AS

    Finds a path, but cant find an optimal path since it cantcompare routing metrics via multiple AS

    60

    Application of IRP and ERP

    61

  • 8/2/2019 Lecture 10- Routing Part III

    7/10

    #

    RIP

    Routing Information Protocol is an interior routingprotocol used inside an autonomous system. It is a very

    simple protocol based on distance vector routing.

    OSPF

    Open Shortest Path First (OSPF) protocol is another

    interior routing protocol that is gaining popularity. OSPF

    uses Link State routing to update the routing tables in

    an area.

    BGP

    Border Gateway Protocol(BGP) is an inter-autonomous

    system routing protocol. It is based on a routing method

    called Path vector routing.

    62

    Autonomous system

    gateways (R1, R2, R3, R4) use both interior & exterior routing

    other routers use only interior routing

    Note: AS routing protocols in A, B, C & D not need to be the same!

    63

    network

    router

    gateway

    BGP

    BGP

    BGPRIP &

    OSPF

    A B

    C

    D

    H2

    H1

    The gateways are exit points

    routers use default routing

    each router knows all netids within AS

    packets destined to another AS are sent to the default

    router

    default router is the border gateway to the next AS

    64

    Why are Distance Vector Routing & Link State Routing

    not good candidates?

    route with the smallest hop count not the preferred one

    AS not secure

    Distance Vector Routing : only a number of hops known

    to a destination, not the path to get there

    Link State Routing : Internet too big for this routing

    method

    huge databases

    long time to run Dijsktras algorithm

    65

  • 8/2/2019 Lecture 10- Routing Part III

    8/10

    $

    Path Vector Routing

    The principle of path vector routing is similar to distancevector routing

    In path vector routing, we assume that there is one node(in practice there can be more) in each autonomoussystem that acts on behalf of the entire autonomoussystem. Let us call it the speaker node

    The speaker node in an AS creates a routing table andadvertises it to speaker nodes in the neighboring Ass

    A speaker node advertises the path, not the metric of thenodes, in its AS or other ASs

    66

    Example I:

    Initial routing tables in path vector routing

    67

    Stabilized tables for three autonomous systems

    68

    Example IIAt the beginning, each speaker node can know only the

    reachability of nodes inside its autonomous system

    69

  • 8/2/2019 Lecture 10- Routing Part III

    9/10

    %

    A speaker in an AS shares its table with immediateneighbors.

    When a speaker node receives information from aneighbor, it updates its own table by adding thenodes that are not in its routing table and addingits own AS and the AS that sent the table

    After a while each speaker has a table and knowshow to reach each node in other ASs

    70

    Aggregation

    The path vector routing protocols normally supportCIDR notation and the aggregation of addresses

    Note that a range may also include a block thatmay not be in the corresponding AS

    However, if this network exists in some other Ass,it eventually becomes part of the routing table dueto the longest prefix principle

    71

    Internet inter-AS routing: BGP

    BGP (Border Gateway Protocol): the de factostandard

    BGP provides each AS a means to:1. Obtain subnet reachability information from neighboring

    ASs.

    2. Propagate reachability information to all AS-internal

    routers.3. Determine good routes to subnets based on

    reachability information and policy.

    allows subnet to advertise its existence to rest ofInternet: I am here

    72

    BGP Sessions

    The exchange of routing information between 2 routers

    using BGP takes place in a session

    A session is a connection that is established between 2BGP routers only for the sake of exchange routing

    information

    The create a reliable environment, BGP uses the service of

    TCP. In other words, a session at the BGP level, as an

    application program, is a connection at the TCP level.

    When a TCP connection is created for BGP, it can last for a

    long time, until something unusual happens.

    For this reason, BGP sessions are sometimes referred to

    as semi-permanent connections

    73

  • 8/2/2019 Lecture 10- Routing Part III

    10/10

    &

    Internal and external BGP sessions

    BGP can have 2 types of session: external BGP(E-BGP) and internal BGP (I-BGP) sessions

    The E-BGP session is used to exchangeinformation between 2 speaker nodes belonging to2 different Ass

    The I-BGP session is used to exchange routinginformation between 2 routers inside an AS.

    74

    BGP does not use traditional Interior Gateway Protocol (IGP) metrics,but makes routing decisions based on path, network policies and/orrulesets. For this reason, it is more appropriately termed a reachabilityprotocol rather than routing protocol.

    Path Vector Routing

    A path: an ordered list of AS that a packet should travel through toreach the destination

    Path information rather than cost information!

    AS #s assigned by Internet Corporation for Assigned Names andNumbers (ICANN) regional registries

    75

    CIDRized

    destination

    network address

    (128.119.40/24)

    offers control to the

    administrator!