Métaroutage [email protected] L’école d’été RÉSCOM 2007 Calcotoggio, Corse, 21 Juin Tutorial Outline • Motivation : shortage of routing protocols • Review of Metarouting paper [GS_MR] • Open problems – – – – – Expressive power of “abstract metalanguage” User-oriented languages Compilation Forwarding Other applications? MANET routing. Architecture of Dynamic Routing IGP EGP (= BGP) AS 1 IGP = Interior Gateway Protocol Metric based: OSPF, IS-IS, RIP, EIGRP (cisco) EGP = Exterior Gateway Protocol IGP AS 2 Policy based: BGP The Routing Domain of BGP is the entire Internet Technology of Distributed Routing Link State • • • • • • Topology information is flooded within the routing domain Best end-to-end paths are computed locally at each router. Best end-to-end paths determine next-hops. Based on minimizing some notion of distance Works only if policy is shared and uniform Examples: OSPF, IS-IS Vectoring • • • • • • Each router knows little about network topology Only best next-hops are chosen by each router for each destination network. Best end-to-end paths result from composition of all next-hop choices Does not require any notion of distance Does not require uniform policies at all routers Examples: RIP, BGP The Gang of Four Link State IGP EGP OSPF IS-IS Vectoring RIP BGP !! BGP The Joy of Interdomain Routing RBNet C B A B 201 ms 4 ms A = HP Palo Alto B =Intel Berkeley C =Moscow State U A 257 ms C http://www.larrysface.com/ The Problem • Small number of routing protocols • Design, implementation, deployment, standardization long, slow process • BGP is being pressed into service as an IGP – No convergence guarantees – BGP Wedgies (RFC 4264) • Endless stream of BGP extensions – Cost Communities – Use of BGP for VPN routing (RFC 2547) What is a BGP Wedgie? [RFC 4264] The half wedgie The full wedgie • BGP policies make sense locally • Interaction of local policies allows multiple stable routings • Some routings are consistent with intended policies, and some are not – If an unintended routing is installed (BGP is “wedged”), then manual intervention is needed to change to an intended routing • When an unintended routing is installed, no single group of network operators has enough knowledge to debug the problem Half Wedgie Example AS 3 peer peer provider AS 4 provider customer AS 2 provider primary link backup link customer customer AS 1 • AS 1 implements backup link by sending AS 2 a “depref me” community. • AS 2 implements this community so that the resulting local pref is below that of routes from it’s upstream provider (AS 3 routes) And the Routings are… AS 3 AS 4 AS 2 AS 3 AS 4 AS 2 AS 1 Intended Routing Note: this would be the ONLY routing if AS2 translated its “depref me” community to a “depref me” community of AS 3 AS 1 Unintended Routing Note: This is easy to reach from the intended routing just by “bouncing” the BGP session on the primary link. Recovery AS 3 AS 4 AS 2 AS 3 AS 4 AS 2 AS 1 Bring down AS 1-2 session AS 3 AS 4 AS 2 AS 1 AS 1 Bring it back up! • Requires manual intervention • Can be done in AS 1 or AS 2 What the heck is going on? • There is no guarantee that a BGP configuration has a unique routing solution. – When multiple solutions exist, the (unpredictable) order of updates will determine which one is wins. • There is no guarantee that a BGP configuration has any solution! – And checking configurations NP-Complete – Lab demonstrations of BGP configs never converging • Complex policies (weights, communities setting preferences, and so on) increase chances of routing anomalies. – … yet this is the current trend! Load Balancing Example AS 3 peer provider peer AS 4 provider customer customer AS 2 AS 5 primary link for prefix P2 backup link for prefix P1 primary link for prefix P1 backup link for prefix P2 AS 1 Simple session reset my not work!! Can’t un-wedge with session resets! 3 4 2 5 3 all up 4 BOTH P1 & P2 wedged 2 all up 5 3 4 2 5 1 1 1 3 2 1—2 & 1—5 down P2 wedged 4 5 Note that when bringing all up we could actually land the system in any one of the 4 stable states --- depends on message order…. 3 2 1—2 & 1—5 down P1 wedged 1 1 1—2 up 1—5 up 3 4 2 3 5 1 2 1—2 down INTENDED 1 4 5 4 3 4 5 2 5 1—5 down 1 Recovery 3 2 4 P2 wedged 5 Temporarily filter P2 from 1—5 session Temporarily filter P1 from 1—2 session 3 2 4 P1 wedged 1 1 1—2 up 1—5 up 3 4 2 3 5 1 2 1—2 down INTENDED 1 5 4 3 4 5 2 5 1—5 down 1 Who among us could figure this one out? When 1—2 is in New York and 1—5 is in Tokyo? Full Wedgie Example peer • peer AS 3 AS 4 provider provider customer customer AS 2 peer provider • peer • AS 5 backup links primary link customer customer AS 1 AS 1 implements backup links by sending AS 2 and AS 5 a “depref me” communities. AS 2 implements its community so that the resulting local pref is below that of its upstream providers and it’s peers (AS 3 and AS 5 routes) AS 5 implements its community so that the resulting local pref is below its peers (AS 2) but above that of its providers (AS 3) And the Routings are… AS 3 AS 4 AS 5 AS 2 AS 3 AS 4 AS 5 AS 2 AS 1 AS 1 Intended Routing Unintended Routing Resetting 1—2 does not help!! AS 3 AS 4 AS 5 AS 2 AS 3 AS 4 AS 5 AS 2 AS 1 AS 1 Bring down AS 1-2 session Bring up AS 1-2 session Recovery AS 3 AS 2 AS 4 AS 5 AS 3 AS 2 AS 1 Bring down AS 1-2 session AND AS 1-5 session AS 4 AS 5 AS 3 AS 2 AS 4 AS 5 AS 1 AS 1 Bring up AS 1-2 session AND AS 1-5 session A lot of “non-local” knowledge is required to arrive at this recovery strategy! Try to convince AS 5 and AS 1 that their session has be reset (or filtered) even though it is not associated with an active route! That Can’t happen in MY network!! NA EMEA LA AP AU++ An “normal” global global backbone (ISP or Corporate Intranet) implemented with 5 regional ASes The Full Wedgie Example, in a new Guise NA AP LA EMEA Intended Routing for some prefixes in AU, implemented with communities. DOES THIS LOOK FAMILIAR?? AU Message: Same problems can arise with “traffic engineering” across regional networks. The Problem • Small number of routing protocols • Design, implementation, deployment, standardization long, slow process • BGP is being pressed into service as an IGP – No convergence guarantees – BGP Wedgies (RFC 4264) • Endless stream of BGP extensions – Cost Communities – Use of BGP for VPN routing (RFC 2547) Is there a Betterer way? Metarouting = Let Operators Decide • We don't know how to define generic IGPs for every network ---let the operators decide. • We don't know how to define IBGPs for every network --let the operators decide. • We don't know how to fix EBGP or how to evolve it for changing requirements --let the operators decide. • Operators can decide, if only they are given the right tools. Central Dogma Routing Protocol = Routing language + Routing Algorithms + • How routes are described • How routes are compared • How policy is described • How policy is applied • How routing solutions are computed • How adjacencies are established and maintained • … Proof • Does the protocol converge? • Is resulting forwarding loop-free? • … Basic Thesis Routing languages should not be hard-coded into protocols specifications and implementations. • Allow the operator community to define routing languages and routing protocols that fit the needs of their networks (IGPs, IBGPs). • Allow the operator community to standardize and evolve interdomain routing languages. How? Define a metalanguage for the specification of routing languages. This language must be carefully constructed to be highly expressiveness while at the same time allowing the automatic derivation of properties required for proofs. Standardize the metalanguage (IETF?) Standardize (IETF) and implement a generic (routing language Independent) set of algorithms such as BGP-like hard state path vector, RIP-like soft-state path-vector, OSPF-like link state flooding and generalized Dijkstra. Routing Protocol = Routing Language + Routing Algorithms + Proof LIBERATE NETWORK OPERATORS FROM THE IETF Proofs are automated: simply match the derived properties of the metalanguage specification with the required properties of each algorithm used. Routing Algebras [JS_Alg] m+n m n Generalize Shortest Paths Routing Algebras S (, ) An ordered set of signatures A ( S , , ) ( ) is a set of policy labels Is the policy application function ( )( ) Note : the notations in this tutorial differ a bit from those in [JS_Alg, GS_MR]. Important Properties Non-decreasing (ND) Increasing (IN) Monotonicity (M) (SI) Strict Monotonicity ( ) What makes these algorithms work? • Generalized Dijkstra (Think Link State) – Correctness proof uses M, – Loop-freedom for hop-by-hop forwarding uses IN. • Generalized Bellman-Ford (Vectoring) – Convergence proof uses IN, – Loop-freedom for hop-by-hop forwarding uses strict IN An algebra for OSPF? (hand-coded from careful reading of RFC 2328 I’m not sure that it is correct, but that’s not the point….) (1, ) e (1, e , (1, (1, v), ) (1, e, ) e) (1, e , ) (1, (1, v), (1, (2, v), ) ) (1, (2, v), (2, (1, v), ) (2, e, ) ) (2, e , ) (2, (1, v), (2, (2, v), ) ) (2, (2, v), (1, (1, v), ) (1, (1, v), e) f f f f f f (1, (2, v), ) (1, (2, v), e) f f f f f f f f (2, ) (2, e , e) (2, e , ) (2, (1, v), ) (2, (2, v), ) f (2, (1, v), ) (2, (1, v), e) f f f f f f (2, (2, v), ) (2, (2, v), e) f f f f f f <1, …> = intra-area route <2, …> = inter-area route <{1,2}, <1, v>, > = type I external ) <{1,2}, > = “normal” route <{1,2}, <2, v>, > = type II external Routing Algebras are a good start, but… • The algebraic framework does not, by itself, provide a way of constructing new and complex algebras. – Algebra definition is hard… – Proofs are tedious… – Modifications to an algebra’s definitions are difficult to manage… Routing Algebra Meta-Language A ::= B | Op(A) | A Op A (base algebras) (unary operator) (binary operators) • “Abstract syntax” for generating new Algebras • Key innovation: automatically derive properties (ND, IN, …) of the algebra represented by an expression from properties of base algebras and preservation properties of operators • Other goals – Simplicity – Expressiveness Some Examples: Lexicographic Product ( S A , A , A) ( S B , B , B ) ( S A S A , A B , A B ) (1, 1 ) ( 2 , 2 ) (1 A 2 ) ((1 A 2 ) (1 B 2 )) ( , ) (A , B ) (A A , B B ) Property Preservation with Lex Product A B A B ND ND IN ND IN A B A B ND EQ,SM M M IN EQ,SM SM SM IN A design pattern: EQ EQ EQ ( EQ ) IN A1 A2 Ai 1 Ai An All at least ND IN Don’t care! Disjoint Label Union (S , A , A) L (S , B , B) (S , A B , A L B) Same order Structure left (A ) A A right (B ) B B Disjoint Union : Property Preservation A B A L B A B A L B ND ND ND M M M IN ND ND SI M M ND IN ND M SM M IN IN IN SM SM SM Local Preference, Origin Preference S A ( A , A ) A (S A , A , A) LP( A) (S A , A ,l ) l OP( A) (S A ,{},r ) r (NOT NICE!) (Always ND, M) BGP-like Partition A B internal B external internal BGP EBGPIBGP Scoped Product AB ( A LP( B)) L (OP( A) B) ( , ) left (A , ) (A A , ) right ( , B ) ( , B B ) Scoped Product : Property Preservation A B AB IN ND ND IN IN IN These rules can be automatically derived Area Product AB ( A OP( B)) L (OP( A) B) ( , ) left (A , ) (A A , ) right ( , B ) ( , B B ) OSPF InterAreaIntraArea Area Product : Property Preservation A B ND ND ND IN IN IN AB These rules can be automatically derived Current work and Open Problems • Current prototype implemented in Ocaml – Compilation : generating C code implementation – using Quagga and XORP code base • Modeling – – – – Forwarding, tunneling Administrative distance Protocol interaction Protocol migration • Design and implementation of routing metalanguage – Relational algebra vs. SQL • Novel IGP design and testing • What is the right mathematical setting for the metalanguage? Quadrants Model of Algebraic Routing [email protected] [email protected] WORK IN PROGRESS Languages for defining Languages A space of Routing Languages Routing Languages that can be expressed in a fixed meta-language Question: What is a good formalism for the space of routing languages? Mind the Gap Metarouting. tgg & Sobrinho (2005) Sobrinho’s Routing Algebra (2003) Semiring routing (1970’s …) Shortest paths (1950’s) Maze Solving (1800’s) Sobrinho’s QoS Algebra (2002) BGP analysis (mid 1990’s present) 3 Basic Structures O pre - ordered set O ( , ) Blue = optional properties Antisymmetric Total Bounded … S semigroup S (,) commutative selective has identity element has absorbtive element … F T (, F ) has identity closed under composition idempotent … Two Approaches to Path Weight path p i1 , i2, , ik , ik 1 Algebraic w(i1 , i2 ) i1 w(i2 , i3 ) i3 i2 … w(ik , ik 1 ) ik ik 1 w( p) w(i1 , i2 ) w(i2 , i3 ) w(ik , ik 1 ) f i1 ,i2 a i1 Functional f i2 ,i3 i2 i3 … f ik ,ik 1 ik w( p) f ik ,ik 1 ( ( f i2 ,i3 ( f i1 ,i2 (a))) ) ik 1 Two Approaches to Path “Selection” p i j q Ordered weights w( p) w(q) ? Algebraic w( p) w(q) Quadrants Model Bisemigoup Order Semigroup (S , S ) (O, S ) Semigroup Transforms (S , T ) Order Trasforms (O, T ) Coverage Bisemigroup Vast literature on semiring routing, starting in 1970’s Order Semigroup Sobrinho QoS Algebras. ToN 2002. Ordered Semigroups Non-commutative structures Semigroup Tranforms Monoid endomporphisms M. Minoux (1976) Order Transforms Sobrinho Routing Algebras. SIGCOMM 2003. CRASH COURSE in Semigroups a nonempty set : ( ) a binary operation This operation must be associative: a, b, c : (a b) c a (b c) S (,) is a semigroup Semigroup Examples Boolean : Powerset : B ({T , F},) P () (2 ,) Free semigroup: free () ( ,) Projections: left () (, left ) a left b a B ({T , F},) P () (2 ,) is concatenation right () (, right ) a right b b Some (Optional) Properties Commutative (comm): a, b : a b b a Idempotent (idem): a : a a a Selective (sel): a, b : a b {a, b} Special Elements (Optional) Neutral element b : b b b If it exist, then it is unique. Absorbing element b : b b If it exist, then it is unique. Note: if , then the semigroup is trivial, {} Examples revisited Name B B P () P () left () right () free () {T , F } {T , F } 2 2 F T f properties T comm idem sel F comm idem sel comm idem f comm idem left idem sel right idem sel More Examples! Name min( n) {0...n} min n 0 comm idem sel max( n) {0...n} max 0 n comm idem sel 0 comm plus ( n) {0...n} {} properties min[ 0,1] [0,1] min 1 0 comm idem sel max[ 0,1] [0,1] max 1 comm idem sel [0,1] [0,1] 0 1 0 comm Natural Orders If S is a commutative and idempotent, then ( a b) ( a a b) L (a R b) (b a b) Examples revisited Name B B P () P () {T , F } {T , F } 2 2 F T f T f F (a R b) (b a b) R F T TF examples Name min( n) {0...n} min n 0 max( n) {0...n} max 0 n min[ 0,1] [0,1] min 1 0 max[ 0,1] [0,1] max 0 1 (a R b) (b a b) R Special Elements Neutral element: Absorbing element: b : b b b b : b b (a b) (b a b) From we get R (a L b) (a a b) b : b R R b : b L :L Property Translations (, ) S (,) associative transitive reflexive idempotent reflexive idempotent and commutative anti-symmetric bounded selective total Cayley Maps ( , C ) L S ( , ) ( , C ) R CL { f b | b , a : f b (a) b a} C {g b | b , a : g b (a) a b} R Include mappings in metalanguage … S S O (,,) (, L ,) (,, CL ) (, L , C L ) T … and property mappings S S a a (b a) O a L (b a ) T a a f (a ) a L f (a) Acknowledgements • • • • • John Billings Alex Gurney Samuel Hym Peter Sewell Joao Sobrinho ([email protected]) ([email protected]) ([email protected]) ([email protected]) ([email protected]) Financial support thanks to HELP WANTED • 1 Studentship. 3 year PhD. • 2 Post Doc Research Positions. Suggested Reading (1) • [JS_QoS] – "Algebra and Algorithms for QoS Path Computation and Hop-byHop Houting in the Internet," João L. Sobrinho. In Proc. IEEE INFOCOM 2001 – "Algebra and Algorithms for QoS Path Computation and Hop-byHop Routing in the Internet," João L. Sobrinho. IEEE/ACM Transactions on Networking , pp. 541-550, August 2002. • [JS_Alg] – “Network Routing with Path Vector Protocols: Theory and Applications” João L. Sobrinho. SIGCOMM 2003 – "An Algebraic Theory of Dynamic Network Routing," João L. Sobrinho. IEEE/ACM Transactions on Networking, pp. 11601173, October 2005. • [GS_MR] – Metarouting. Griffin & Sobrinho. SIGCOMM 2005. Metarouting project page: http://www.cl.cam.ac.uk/~tgg22/metarouting Suggested Reading (2) • Chapitre 1: Pré-semi-anneaux, semi-anneaux et dioïdes • Chapitre 2: Propriétés combinatoires des (pré-)semianneaux • Chapitre 3: Topologies des ensembles ordonnés • Chapitre 4: Résolution de systèmes linéaires dans les dioïdes • Chapitre 8: Répertoire de (pré)semi-anneaux et dioïdes END
© Copyright 2026 Paperzz