Does BGP Solve the Shortest Paths Problem?

# Does BGP Solve the Shortest Paths Problem?

## Does BGP Solve the Shortest Paths Problem?

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Does BGP Solve the Shortest Paths Problem? Timothy G. Griffin Joint work with Bruce Shepherd and Gordon Wilfong Bell Laboratories, Lucent Technologies {griffin, bshep, gtw}@research.bell-labs.com NANOG 18 February, 2000

2. Underlying problem Distributed means of computing a solution. Shortest Paths RIP, OSPF, IS-IS X? BGP What Problem is BGP solving? Having an X can • aid in the design of policy analysis algorithms and heuristics, • aid in the analysis and design of BGP and extensions, • help explain some BGP routing anomalies, • provide a fun way of thinking about the protocol This talk Griffin NANOG 18

3. 2 1 0 2 0 5 2 1 0 4 2 0 4 3 0 1 2 4 5 0 3 3 0 1 3 0 1 0 Q : How simple can X get? A: The Stable Paths Problem (SPP) 2 An instance of the SPP : • A graph of nodes and edges, • Node 0, called the origin, • For each non-zero node, a set or permitted paths to the origin. This set always contains the “null path”. • A ranking of permitted paths at each node. Null path is always least preferred. (Not shown in diagram) 1 most preferred … least preferred (not null) When modeling BGP : nodes represent BGP speaking border routers, and 0 represents a node originating some address block Yes, the translation gets messy! Griffin NANOG 18

4. 5 2 1 0 5 0 1 3 4 2 A Solution to a Stable Paths Problem 2 2 1 0 2 0 A solution is an assignment of permitted paths to each node such that 4 2 0 4 3 0 • node u’s assigned path is either the null path or is a path uwP, where wP is assigned to node w and {u,w} is an edge in the graph, • each node is assigned the highest ranked path among those consistent with the paths assigned to its neighbors. 3 0 1 3 0 1 0 1 A Solution need not represent a shortest path tree, or a spanning tree. Griffin NANOG 18

5. 1 1 1 0 0 0 2 2 2 A Stable Paths Problem may have multiple solutions 1 2 0 1 0 1 2 0 1 0 1 2 0 1 0 2 1 0 2 0 2 1 0 2 0 2 1 0 2 0 First solution Second solution DISAGREE Griffin NANOG 18

6. 1 0 2 Multiple sets of BGP routing policies can map down to the same Stable Paths Problem : DISAGREE in RPSL (Version I) 1 2 0 1 0 import : from AS1 action pref = 0; accept ANY; from AS0 action pref = 10; accept ANY; export : to AS2 announce ANY; export : to AS1, AS2 announce AS0; import : from AS2 action pref = 0; accept ANY; from AS0 action pref = 10; accept ANY; export : to AS1 announce ANY; 2 1 0 2 0 Griffin NANOG 18

7. 1 0 2 DISAGREE in RPSL (Version II) import : from AS-ANY action pref = 0; accept community.contains(1:1); from AS-ANY action pref = 10; accept ANY; export : to AS2 announce ANY; 1 2 0 1 0 export : to AS1 set community.append(2:1); announce AS0; to AS2 set community.append(1:1); announce AS0 2 1 0 2 0 import : from AS-ANY action pref = 0; accept community.contains(2:1); from AS-ANY action pref = 10; accept ANY; export : to AS1 announce ANY; Assume AS1 and AS2 use “neighbor send-community” command …. Griffin NANOG 18

8. 1 0 2 DISAGREE in RPSL (Version III) 1 2 0 1 0 import : from AS-ANY accept ANY; export : to AS2 announce ANY; export : to AS1 action aspath.prepend(AS0, AS0, AS0); announce AS0; to AS2 announce AS0 2 1 0 2 0 import : from AS1 action pref = 0; accept ANY; from AS0 action pref = 10; accept ANY; export : to AS1 announce ANY; The interaction of all BGP policies is directly represented in SPP Griffin NANOG 18

9. 1 1 1 0 0 0 3 2 3 2 2 3 Multiple solutions can result in “Route Triggering” 1 0 1 2 3 0 1 0 1 2 3 0 primary link 2 3 0 2 1 0 2 3 0 3 1 0 backup link 3 2 1 0 3 0 3 2 1 0 3 0 Remove primary link Restore primary link Griffin NANOG 18

10. Solvable Can Diverge The SPP view : must converge must diverge SPP helps explain possibility of BGP divergence • BGP is not guaranteed to converge to a stable routing. Policy inconsistencies can lead to “livelock” protocol oscillations. • See “Persistent Route Oscillations in Inter-domain Routing” by K. Varadhan, R. Govindan, and D. Estrin. ISI report, 1996 Griffin NANOG 18

11. BAD GADGET : No Solution With a BGP-like protocol, each node will do the best it can, so at least one node will always have the opportunity to improve its path. Result : persistent oscillation. 2 1 0 2 0 2 4 2 0 4 3 0 4 0 3 1 3 4 2 0 3 0 1 3 0 1 0 Griffin NANOG 18

12. SURPRISE : Beware of Backup Policies 2 1 0 2 0 Becomes BAD GADGET if link (4, 0) goes down. 2 4 0 4 2 0 4 3 0 BGP is not robust : it is not guaranteed to recover from network failures. 4 0 3 1 3 4 2 0 3 0 1 3 0 1 0 Griffin NANOG 18

13. 4 3 1 0 4 5 3 1 2 0 4 3 1 2 0 1 2 0 1 0 3 1 0 3 1 2 0 1 3 0 5 3 1 0 5 6 3 1 2 0 5 3 1 2 0 6 3 1 0 6 4 3 1 2 0 6 3 1 2 0 2 1 0 2 0 4 2 5 6 As with DISAGREE, this part has two distinct solutions This part has a solution only when node 1 is assigned the direct path (1 0). Has a solution, but can get “trapped” PRECARIOUS Griffin NANOG 18

14. a 1 0 b 3 r 2 y q z Proposal : Allow AS-path length to include member ASes within a confederation. SPP simplifies analysis of proposed extensions AS path of routes in BGP table seen from member-AS 2 0 (b) 0 3 0 a q r 0 a b 0 a z y 0 Corresponding SPP paths : no solution All paths appear to be of equal length. Ties are broken using IGP metric, or Next-Hop. z a b 0 z y 0 z q r 0 q z y 0 q r 0 q a b 0 1 0 (y) 0 2 0 3 0 (r) 0 1 0 Griffin NANOG 18

15. 4 3 6 0 7 5 1 2 PREFER_ME Global Community? Imagine a world with no LOCAL_PREFERENCE but with PREFER_ME … A single AS can use PREFER_ME to create a “BAD GADGET” even when others are doing vanilla routing. Does PREFER_ME make it easier to do bad things? Guidelines for safe use of PREFER_ME? 2 5 1 4 7 0 2 0 shortest paths, no transit across 3 2 Import only from 1, no transit across 3, send PREFER_ME to 2 0 3 1 3 2 0 3 6 0 1 3 6 0 1 4 7 0 shortest paths shortest paths, no transit across 1 Ties at 1 and 3 are broken by next-hop address... Griffin NANOG 18

16. What is to be done? Static Approach Dynamic Approach Extend BGP with a dynamic means of detecting and suppressing policy-based oscillations? Inter-AS coordination Automated Analysis of Routing Policies (This is very hard). These approaches are complementary Griffin NANOG 18

17. Work in Progress... “An Analysis of BGP Convergence Properties” Timothy G. Griffin, Gordon Wilfong SIGCOMM’99 Model BGP, show static analysis is hard “Policy Disputes in Path Vector Protocols” Timothy G. Griffin, F. Bruce Shepherd, Gordon Wilfong ICNP ‘99 Define Stable Paths Problem and develop sufficient condition for “sanity” “A Safe Path Vector Protocol” Timothy G. Griffin, Gordon Wilfong INFOCOM’00 Dynamic solution based on histories “Stable Internet Routing without Global Coordination” Lixin Gao, Jennifer Rexford SIGMETRICS’00 Show that if certain guidelines are followed, then all is well. Griffin NANOG 18