1 / 51

Network Routing : Link State Routing and BGP

Network Routing : Link State Routing and BGP. 4/2/2008. Admin. Course feedback two more written assignments one programming assignment (not assigned yet, but already linked on the schedule page just in case you want to play with it; read Chapter 7) Assignment 3.

garth
Download Presentation

Network Routing : Link State Routing and BGP

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Network Routing:Link State Routing and BGP 4/2/2008

  2. Admin. • Course feedback • two more written assignments • one programming assignment (not assigned yet, but already linked on the schedule page just in case you want to play with it; read Chapter 7) • Assignment 3

  3. Implemented in RIP, IGRP, EIGRP Many properties Distributed Asynchronous Convergence in finite steps, independent of initial condition if network is connected Good news propagate fast Counting-to-infinity problem reverse poison/split horizon Recap: Distance Vector Routing

  4. Outline • Recap • Distance vector protocols • synchronous Bellman-Ford (SBF) • asynchronous Bellman-Ford (ABF) • destination-sequenced distance vector (DSDV)

  5. Destination-Sequenced Distance Vector protocol (DSDV) • An extension of distance vector protocol to address the counting-to-infinity problem • Extension • DSDV tags each route with a sequence number • each destination node D periodically advertises monotonically increasing even-numbered sequence numbers • when a node realizes that its link to a destination is broken, it advertises the route to D with an infinite metric and a sequence numberwhich is one greater than the previous route (i.e. an odd seq. number) • the route is repaired by a later even-number advertisement from the destination

  6. route update B A DSDV: More Detail • Let’s assume the destination node is D • There are optimizations but we present a simple version: • each node maintains only (SB, dB), where SB is the sequence number at B for destination D and dB is the best distance using a neighbor from B to D • Both periodical and triggered updates • periodically: D increases its seq. by 2 and broadcasts with (SD, 0) • if B is using C as next hop to D and B discovers that C is no longer reachable • B increases its sequence number SB by 1, sets dB to , and sends (SB, dB) to all neighbors

  7. route update B A DSDV: Update • Update after receiving a message • assume B sends to A its current state (SB, dB) • when A receives (SB, dB) • if SB > SA, then // always update if a higher seq# • SA = SB • if (dB == ) dA = ; else dA= dB + d(A,B) • else if SA == SB, then • if dA > dB + d(A,B) // update for the same seq# only if better route dA= dB + d(A,B) and uses B as next hop

  8. Example • When C discovers that C-D link is down, it increases its seq# and broadcasts its cost to be  1 1 1 1

  9. A B Claim: DSDV Does Not Form Loop • what is a loop? • a loop is a global state (consisting of the nodes’ local states) at a global moment (observed by an oracle) such that there exist nodes A, B, C, … E such that A (locally) thinks B as down stream, B thinks C as down stream, … E thinks A as down stream • Initially no loop (no one has next hop so no loop) • Derive contradiction if a loop forms after a node processes an update, • e.g., when A receives theupdate from B, A decides to use B as next hop and forms a loop update

  10. Background: Global Invariants • This is a very effective method in understanding distributed asynchronous protocols • Invariants are defined over the states of the distributed nodes • Consider any node B. • Let’s identify some invariants over the state of node B, i.e., (SB, dB).

  11. time Invariants of a Single Node B • Some invariants about the state of a node • SB is non-decreasing • dB is non-increasing for the same sequence number

  12. B A Invariants of if A Considers B as Next Hop • Some invariants if A considers B as next hop • SA cannot be an odd number, dA is not  • SB  SA because A is having the seq# which B last sent to A; B’s seq# might be increased after B sent its state • if SB == SA then dB < dAbecause dA is based on dB which B sent to A some time ago, dB < dA since all link costs are positive; dB might be decreased after B sent its state

  13. A B Loop Freedom of DSDV update • Consider a critical moment • A starts to consider B as next hop, and we have a loop • If any link in the loop (X considers Y as next hop) satisfies SY >SX • by transition along the loop SB >SB • If all nodes along the loop have the same sequence number • by transition along the loop dB >dB X Y

  14. Summary: DSDV • DSDV uses sequence number to avoid routing loops • seq# partitions routing updates from different outside events • within same event, no loop so long each node only decreases its distance • EIGRP: a routing protocol by Cisco routers • Diffusive Update Algorithm (DUAL)

  15. Discussion: Distance Vector Routing • What do you like about distance vector routing? • What do you not like about distance vector routing?

  16. Churns of DV: One Example • Problematic Message sequences • Node 2 tells 3. Node 3 tells 4…Node N tells N+1. (N-1 messages) • Node N+1 tells N+2, N+2 tells N+3,…,2N. (N-1 messages) • Now node N-1 tells node N+1 • Step 2 repeats • Now node N-2 tells node N+1 • … 2N Initial Conditions +  All links have cost 1 … N+3 N+2 N+1 A total of N2 – 2 messages … N-1 1 2 3 N Question to think about: is this the worst case?

  17. Outline • Recap • Distance vector protocols • Link state protocols

  18. Net topology, link costs are distributed to all nodes all nodes have same info thus can compute any types of routes Each node computes its shortest paths from itself to all other nodes e.g., use Dijkstra’s algorithm (see backup slides) Link state distribution accomplished via “link state broadcast” Link-State Routing

  19. Link State Broadcast • The hard part is link state broadcast • basic approach: forward a link state (link ID, link status) to all links except the incoming link • Question: what are the problems the link state broadcast needs to handle? • broadcast loop (a problem in exam 1) • ordering of events (link up and down) • network partitioning and then merge

  20. Link State Broadcast • Each link update is given a sequence number: (initiator, seq#, link, status) • the initiator should increase the seq# for each new update • If the seq# of an update of a link is not higher than the highest seq# a router has seen, drop the update • Otherwise, forward it to all links except the incoming link (see backup slides for the real implementation using packet buffer) • Each seq# has an age field (why?) • Updates are sent periodically (why?)

  21. OSPF (Open Shortest Path First) • “Open”: publicly available • Uses Link State algorithm • link state (LS) packet dissemination • topology map at each node • route computation using Dijkstra’s algorithm http://en.wikipedia.org/wiki/Open_Shortest_Path_First

  22. OSPF “Advanced” Features (not in RIP) • Multiple same-cost paths allowed (only one path in RIP) • For each link, multiple cost metrics for different Type Of Service (eg, satellite link cost set “low” for best effort; high for real time) • Security: all OSPF messages authenticated (to prevent malicious intrusion); TCP connections used • Hierarchical OSPF

  23. Hierarchical OSPF run OSPF routing limited to backbone. “summarize” distances to nets in own area, advertise to other Area Border routers. • - Link-state advertisements only in area • each nodes has detailed area topology;- only know direction (shortest path) to nets in other areas. Two-level hierarchy: local area, backbone.

  24. Why Hierarchy? • Information hiding (filtered) => reduce computation, bandwidth, storage 

  25. Discussion: Link State Routing • What do you like about link state routing? • What do you not like about link state routing? Question to think about: which routing protocol (DV or LS) should the Internet use?

  26. Outline • Recap • Distance vector protocols • Link state protocols • Routing in the Internet • overview

  27. Routing in the Internet • The Global Internet consists of Autonomous Systems (AS) interconnected with each other • An AS is identified by an AS Number (ASN), e.g. Yale ASN is 29 • try %whois -h whois.arin.net “a Yale“

  28. Routing with AS • Intra-AS • Different AS’s may run different routing protocols • A protocol running insides an AS is called an Interior Gateway Protocol (IGP) • RIP: Routing Information Protocol • OSPF: Open Shortest Path First • IS-IS: very similar to OSPF (or should we say OSPF is very similar to IS-IS?) • E/IGRP: Interior Gateway Routing Protocol (Cisco) • Inter-AS • a protocol runs among AS’s is also called an Exterior Gateway Protocol (EGP) • for global connectivity, a single interdomain routing protocol

  29. AS C (RIP intra AS B (OSPF intra AS A (OSPF intra routing) routing) routing) a b Routing in the Internet: Example eBGP iBGP b

  30. inter-AS routing between A and B b c a a C b B b a c d Host h1 A A.a A.c C.b B.a Intra-AS and Inter-AS Routing border (exterior gateway) routers Host h2 intra-AS routing within AS B Intra-AS routing within AS A interior (gateway) routers

  31. RIP process OSPF process BGP process RIP routing table BGP routing table Many Routing Processes on a Single Router BGP OSPF Routing table OS kernel RIP domain OSPF domain Forwarding Table Manager Forwarding Table

  32. Why Partition into Intra- and Inter-AS Routing? • This partition allows ASes flexibility to choose their own intra-AS routing protocols • autonomy • By aggregating many destinations inside an AS into a single destination in interdomain routing, it improves scalability • the partition is a type of hierarchical routing • hierarchical routing improves scalability: only a small number of routers are involved with outside

  33. Internet2 AT&T Qwest Yale Internet Connectivity Yale default routes 0.0.0.0/0 pointing to provider. 132.130.0.0/16 128.36.0.0/16

  34. Hierarchical Routing May Pay a Price for Path Quality AS 4 AS 3 AS 2 AS 1

  35. Outline • Recap • Distance vector protocols • Link state protocols • Routing in the Internet • BGP

  36. BGP Setup

  37. Internet Interdomain Routing: BGP • BGP (Border Gateway Protocol):the de facto standard • Path Vector protocol: • similar to Distance Vector protocol • a border gateway sends to a neighbor entire path (i.e., a sequence of ASes) to a destination, e.g., • gateway X sends to neighbor N its path to dest. Z: path (X,Z) = X,Y1,Y2,Y3,…,Z • if N selects path(X, Z) advertised by X, then: path (N,Z) = N, path (X,Z) Z N X

  38. BGP Operations (Simplified) Establish session on TCP port 179 AS1 BGP session Exchange all active routes AS2 while (connection is ALIVE) exchange UPDATE messageselect best available route if route changes, export to neigh. Exchange incremental updates

  39. BGP Messages • Four types of messages • OPEN: opens TCP connection to peer and authenticates sender • UPDATE: advertises new path (or withdraws old) • KEEPALIVE keeps connection alive in absence of UPDATES; also ACKs OPEN request • NOTIFICATION: reports errors in previous msg; also used to close connection

  40. Why Path Vector? • Path vector prevents counting-to-infinity problem • Path vector allows an AS to define local policies on the ASes of a given path

  41. BGP Routing Decision Process route selection policy: rank paths select best path routing cache export policy: which paths export to which neighbors export path to neighbors

  42. Internet2 AT&T Qwest BGP Route Selection Policy • Typical (Cisco) routeselection policy • Highest local pref • Shortest AS path length • Prefer eBGP over iBGP • … Yale default routes 0.0.0.0/0 pointing to provider.

  43. 2 1 0 2 0 2 4 0 preferred 3 2 0 3 0 1 3 0 1 0 3 3 1 less preferred Policy Interactions The BAD GADGET example: - 0 is the destination - the route selection policy of each AS is to prefer its counter clock-wise neighbor Policy interaction causes routing instability !

  44. Backup Slides

  45. Dijkstra’s Algorithm See schedule page for animation

  46. Notation: c(i,j): link cost from node i to j; cost infinite if not direct neighbors D(v): current value of cost of path from source to destination v p(v): predecessor node along path from source to destination v N: set of nodes whose least cost path definitively known Dijkstra’s Algorithm

  47. Dijkstra’s 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) = infty 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

  48. A D B E F C Dijkstra’s Algorithm: Example D(B),p(B) 2,A 2,A 2,A D(D),p(D) 1,A D(C),p(C) 5,A 4,D 3,E 3,E D(E),p(E) infinity 2,D Step 0 1 2 3 4 5 start N A AD ADE ADEB ADEBC ADEBCF D(F),p(F) infinity infinity 4,E 4,E 4,E 5 3 5 2 2 1 3 1 2 1

  49. Use Packet Buffer to Distribute Link States • Add ACK for reliability • Avoid multiple update packets from the same source at the same router • When a router receives a link update from a source S from neighbor X • if no state for S or seq# higher than current, add the state for S, set Ack for X, set Send for other neighbors; • if has state for S and seq# of the received update is smaller, ignore; • if received seq# equals to the current seq#, set Ack for X, clear Send to X • Round-robin among the Ack and Send flags The right figure shows the packet buffer at router BA, C, F are its neighbors

  50. Internet2 AT&T Qwest BGP Route Selection Policy • Typical (Cisco) routeselection policy • Highest local pref • Shortest AS path length • Prefer eBGP over iBGP • … Yale default routes 0.0.0.0/0 pointing to provider.

More Related