• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content







Total Views
Views on SlideShare
Embed Views



0 Embeds 0

No embeds



Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

    Routing Routing Presentation Transcript

    • Network Layer Services
      • Packet Switching – Send Packet, Receive Packet
        • path determination routing algorithms
        • forwarding
        • call setup if required
      • Connectionless (datagram) Service – Internet
        • packets forwarded using destination host address
      • Connection-Oriented (virtual circuit) Service – ATM
        • call setup, teardown for each call before data can flow
        • each packet carries VC identifier (not destination host ID)
        • every router on source-dest path maintains “state” for each passing connection
        • link, router resources (bandwidth, buffers) may be allocated to VC to get circuit-like performance
      • Note: QoS issue starts to blur the boundary of connection types
    • Datagram and Virtual Circuit Datagram Routing tables Connection ID From H1 with CID 1 From H3 with CID 1 CID changed to 2 A’s table changed (why? How?)
    • Comparison of Virtual-Circuit and Datagram Subnets 5-4 PVC, SVC Setup vs parsing Packet Routing Session Routing
    • Routing Algorithms
      • Goal: determine “good” path thru network from source to dest
      • Good Path usually means minimum cost path
      • Correctness, simplicity, robustness, stability, fairness, optimality
      • Conflict between fairness and optimality
        • Min mean packet delay, Max network throughput, Min # of hops
      • Optimality Principle
      • If J is on the optimal path from I to K, then optimal path from J to K is the same
      • Sink Tree
      • All optimal paths to a node forms a tree
      • Routing Algorithm Classification
      • Global vs. decentralized
        • Global --- all routers have complete topology, link cost info
        • Decentralized -- router knows only neighbors, link costs to neighbors
      • Static (non-adaptive) vs. dynamic (adaptive)
        • Static -- routes change slowly over time
          • Shortest path routing
          • Flooding
        • Dynamic -- routes change more quickly, periodic update in response to link cost changes
          • link state algorithms
          • distance vector algorithms
    • Shortest Path Routing - static
      • Cost of a link
        • distance, bandwidth, avg traffic, comm cost, avg queue, delay, etc
      • Dijkstra shortest path algorithm
      • 1 Initialization:
      • 2 N = {A}
      • 3 for all nodes v
      • 4 if v adjacent to A
      • 5 then D(v) = c(A,v)
      • 6 else D(v) = infinity
      • 7
      • 8 Loop
      • 9 find w not in N such that D(w) is a minimum
      • 10 add w to N
      • 11 update D(v) for all v adjacent to w and not in N:
      • 12 D(v) = min( D(v), D(w) + c(w,v) )
      • 13 /* new cost to v is either old cost to v or known
      • 14 shortest path cost to w plus cost from w to v */
      • 15 until all nodes in N
      improve Smallest label => permanent Shortest path from A to D
    • Flooding - static
      • Incoming pkt is sent to all outgoing line except the one it arrives on
      • Methods to reduce traffic
        • Hop count
        • Keep track of packets
          • (source, seq)
          • Use up-to-counter to reduce (source, seq) entries
        • Selective flooding
          • Only send to approximately correct directions (e.g. east-west)
      • Not practical in most applications, but…
        • Military (robustness)
        • Distributed database (concurrent update)
        • Wireless
        • Benchmark (without overhead traffic, flooding has the shortest delay)
    • Distance Vector Routing - dynamic
      • Also known as
        • Distributed Bellman-Ford
        • Ford-Fulkerson
        • RIP (routing information protocol)
        • Original ARPAnet algorithm
      • Distance
        • Hops, queue, delay
      • Distributed – periodical update with neighbors only
      • Old routing table is not used to derive new table
      J measured the delays to neighbors
    • Count to Infinity using # of hops as metric
      • Serious drawback for distance vector routing
      • React rapidly to good news, but very slow to bad news
      • Infinity can be set to longest path +1
      • RIP was used in Arpanet until 1979
        • Delay metric was queue length, link bandwidth was not considered
        • Too long to converge
      Split horizon A is coming UP A or link is going DOWN
    • Link State Routing – OSPF, ISIS
      • Each router must do the following:
      • Discover its neighbors, learn their network address. HELLO
      • Measure the delay or cost to each of its neighbors. ECHO
        • Traffic load ? (echo pkt queue time vs. sent time)
        • Throughput vs. oscillation
      • Construct a packet telling all it has just learned.
        • When ? (periodically or significant events)
      • Send this packet to all other routers. FLOODING
        • Use sequence # to control flooding
        • Use Age field to deal with irregular seq#
          • Crash, wrap-around, tx error
        • Holding area and acknowledgement
      • Compute the shortest path to every other router. Dijkstra’s algorithm
      oscillation 60 sec 10 sec per update Treat LAN as a Virtual node
    • OSPF – O pen S hortest P ath F irst The Interior Gateway Routing Protocol designated router
      • OSPF = Link state routing PLUS
        • Authentication of routing messages
          • Avoid malicious router
        • Additional hierarchy (area)
          • No need to reach EVERY network in the domain
        • Load balancing
    • Hierarchical Routing
      • Reduce routing table - Scalability
      • Enforce administrative autonomy
        • internet = network of networks
        • each network admin may want to control routing in its own network
      • Divide into regions ( A utonomous S ystems)
        • Optimal # of levels ln N, requiring e ln N entries per router
      • May cause non-optimal routing
        • E.g. 1A to 5C
      5 4+2
    • Broadcast Routing - implementations
      • Distinct packet to each dest
      • Flooding
      • Multi-destination routing
        • Pkt contains a list of dest addr or bit map
        • Optimization form of distinct pkt method
      • Spanning tree
        • Min # of packets necessary
        • All routers need to know the tree (link state routing)
      • Reverse path forwarding
        • IF broadcast pkt arrives from the line that’s used to send to pkt source, THEN forward ELSE drop it
        • Reasonably efficient and easy to implement
      Sink tree for I optimal routes from all sources to a dest First hop Most likely the first one to arrive Most likely a duplicate
    • Multicast Routing
      • Host belongs to Groups
      • Routers learn about which of “their” hosts are in which groups
      • Routers tell their neighbors and build the spanning tree
      Spanning tree for this source Tree Pruning for group 1
    • Routing for Mobile Hosts Fixed Routers – mobile IP
      • Fixed home location
        • Find the location of mobile host and route pkts to mobile host via home agent
      • Mobile Node (host) / foreign agent registration
        • FA broadcast
        • MN registers (HA addr, MAC addr, MN id)
        • FA registers with HA on behalf of MN
        • FA accept / reject MN registration
      • HA responds to a new session
        • Tunnel pkt to FA
        • Tell sender to tunnel future pkts to FA directly
      HA FA
    • M obile A d Hoc NET works Mobile Router -- MANET
      • Possible applications
        • Battlefield, ships, earthquake emergency (no infrastructure support)
      • AODV algorithm Ad hoc On-demand Distance Vector
        • On-demand route discovery
      • B Rcv REQUEST
        • IF dup, THEN drop
        • IF fresher dest route info exists, THEN use-me
        • ELSE Hop count++, add reverse entry (with TTL)
        • Rebroadcast
      A sends to I Uniquely identify A’s Route Request to avoid dup I’s last seq # in A Init to 0 inc when rebroadcast
      • B Rcv RESPONSE
        • IF no entry, THEN add
        • IF fresher dest THEN update
        • IF same freshness, but shorter hop THEN update
      I’s Response Duration of VALID route From I’s system
    • Ad-hoc Routing Table
      • Node receive a REPLY, add the entry to Routing Table IF
        • No route to dest is known
        • Sequence # in REPLY is greater (fresher)
        • Same seq #, but less hops (faster)
      • REQUEST is broadcast, REPLY is unicast
        • Node on the reverse path learns the route for FREE
      • Each node periodically broadcast HELLO and expect replies from Active neighbors
      SEQ # TTL