métaroutage l’école d’été rÉscom 2007 calcotoggio, corse, 21 juin...

73
Métaroutage L’école d’été RÉSCOM 2007 Calcotoggio, Corse, 21 Juin [email protected]

Upload: mary-malone

Post on 28-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Métaroutage

L’école d’été RÉSCOM 2007Calcotoggio, Corse, 21 Juin

[email protected]

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

AS 1

AS 2

EGP (= BGP)

EGP = Exterior Gateway Protocol

IGP = Interior Gateway Protocol

Metric based: OSPF, IS-IS, RIP, EIGRP (cisco)

Policy based: BGP

The Routing Domain of BGP is the entire Internet

IGP

IGP

• 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

• 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

Link State Vectoring

Technology of Distributed Routing

The Gang of FourLink State Vectoring

EGP

IGP

BGP

RIPIS-IS

OSPF

BGP !!

The Joy of Interdomain Routing

A

B

CRBNet

AT&T

Cable & Wireless

CAIS

Above Net

Telefonica

A = HP Palo Alto

B =Intel Berkeley

C =Moscow State U A

B

C257 ms

201 ms4 ms

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]• 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

The halfwedgie

The fullwedgie

Half Wedgie Example

• 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)

AS 1

AS 2

AS 3 AS 4

customer

provider

peer peer

provider

customer

customer

providerbackup link

primary link

And the Routings are…

AS 1

AS 2

AS 3 AS 4

Intended Routing

AS 1

AS 2

AS 3 AS 4

Unintended RoutingNote: This is easy to reach from the intended routing just by “bouncing”the BGP session on the primary link.

Note: this would be the ONLY routing if AS2 translated its “depref me” community to a “depref me” community of AS 3

Recovery

AS 1

AS 2

AS 3 AS 4

AS 1

AS 2

AS 3 AS 4

AS 1

AS 2

AS 3 AS 4

Bring down AS 1-2 session 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

primary link for prefix P1backup link for prefix P2

AS 1

AS 2

AS 3 AS 4

provider

peer peer

provider

customer

AS 5customer

primary link for prefix P2backup link for prefix P1

Simple session reset my not work!!

Can’t un-wedge with session resets!

1

2

3 4

5

1

2

3 4

5

1

2

3 4

5

1

2

3 4

5

1

2

3 4

5

1—2 down 1—5 down

1—2 up 1—5 up

P2wedged

P1wedged

INTENDED

Reset 1—2 Reset 1—5

1

2

3 4

5

BOTHP1 & P2wedged

1—2 & 1—5 down

1

2

3 4

5

1

2

3 4

5

1—2 & 1—5 down

all up all up

Note that when bringingall up we could actually landthe system in any one of the 4 stable states --- dependson message order….

Recovery

1

2

3 4

5

1

2

3 4

5

1

2

3 4

5

1

2

3 4

5

1

2

3 4

5

1—2 down 1—5 down

1—2 up 1—5 up

P2wedged

P1wedged

INTENDED

Temporarilyfilter P2 from 1—5 session

Temporarilyfilter P1 from 1—2 session

Who among us could figure this one out? When 1—2 is in New York and 1—5 is in Tokyo?

AS 1

AS 2

AS 3 AS 4

customer

provider

peer peer

provider

customer

customer

provider

primary link

Full Wedgie Example

AS 5

backup links

• 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)

customer

peer peer

And the Routings are…

AS 1

AS 2

AS 3 AS 4

AS 5

AS 1

AS 2

AS 3 AS 4

AS 5

Intended Routing Unintended Routing

Resetting 1—2 does not help!!

AS 1

AS 2

AS 3 AS 4

AS 5

AS 1

AS 2

AS 3 AS 4

AS 5

Bring down AS 1-2 session

Bring up AS 1-2 session

Recovery

AS 1

AS 2

AS 3 AS 4

AS 5

AS 1

AS 2

AS 3 AS 4

AS 5

Bring down AS 1-2 sessionAND AS 1-5 session

AS 1

AS 2

AS 3 AS 4

AS 5

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!

Bring up AS 1-2 sessionAND AS 1-5 session

That Can’t happen in MY network!!

AU++

APEMEA

LA

NA

An “normal” global global backbone (ISP or Corporate Intranet) implemented with 5 regional ASes

The Full Wedgie Example, in a new Guise

AU

EMEA

NA AP

LA

Intended Routing for some prefixes in AU,implementedwith communities.

DOES THIS LOOK FAMILIAR??

Message: Same problems can arisewith “traffic engineering” acrossregional 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

• How routes are described

• How routes are compared

• How policy is described

• How policy is applied

Routing Protocol = Routing language + Routing Algorithms + Proof

• How routing solutions are computed

• How adjacencies are established and maintained

• …

• Does the protocol converge?

• Is resulting forwarding loop-free?

• …

Basic Thesis

• 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.

Routing languages should not be hard-coded into protocols specifications and implementations.

How?

Routing Protocol = Routing Language + Routing Algorithms + Proof

Define a metalanguage for the specificationof routing languages. This language must be carefully constructedto be highly expressiveness while at the same time allowing the automatic derivation of propertiesrequired 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 stateflooding and generalized Dijkstra.

Proofs are automated: simplymatch the derived properties of the metalanguage specification withthe required propertiesof each algorithm used.

LIBERATE NETWORK OPERATORS

FROM THE IETF

Routing Algebras [JS_Alg]

m + nm

n

GeneralizeShortest Paths

Routing Algebras

),,( SA

),( S

)(

An ordered set of signatures

is a set of policy labels

Is the policy applicationfunction

))(( Note : the notations in this tutorial differ a bit from those in [JS_Alg, GS_MR].

Important Properties

Non-decreasing Increasing

(ND)

(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?

(1, )

v

v)

(1, v)

(1, v)

(2, )

(2, v)

(2, v)

v

v)

v v)

v v)

vv vv

vv

<1, …> = intra-area route <2, …> = inter-area route <{1,2}, > = “normal” route

<{1,2}, <1, v>, > = type I external <{1,2}, <2, v>, > = type II external

(hand-coded from careful reading of RFC 2328I’m not sure that it is correct, but that’s not the point….)

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 (base algebras)

| Op(A) (unary operator)

| A Op A (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

),,(),,(),,( BABAAABBBAAA SSSS

),( ),( BBAA ),( BA

))()(()(),(),( 2121212211 BAA

Property Preservation with Lex Product

BA

A BND

IN

ND

ND

IN

ND

IN

IN

A BEQ,SM

EQ,SM

M M

SM

BA

nii AAAAA

121

A design pattern:

SM

EQ EQEQ

All at least ND IN Don’t care!

IN

)( EQ

Disjoint Label Union

),,(),,(),,( BLABABBLAA SSS

AA )( Aleft

)( Bright BB

Same order Structure

Disjoint Union : Property Preservation

BA LA BND

IN

ND

IN

ND

ND

IN

IN

ND

ND

ND

IN

BA LA BM

SI

M

SM

M

M

SM

SM

M

M

M

SM

Local Preference, Origin Preference

),,( AAASA

),,()( lAASALP l

)},{,()( rASAOP r(Always ND, M)

),( AAAS

(NOT NICE!)

BGP-like Partition

GPIBEBGPBGP

A

BB

internal external internal

Scoped Product

))(())(( BAOPBLPABA L

),(

),( AA),( Aleft

),( Bright ),( BB

Scoped Product : Property Preservation

BAA BIN

IN

ND

IN

ND

IN

These rules can be automatically derived

Area Product

))(())(( BAOPBOPABA L

),(

),( AA ),( Aleft

),( Bright ),( BB

IntraAreaInterAreaOSPF

Area Product : Property Preservation

BAA BND

IN

ND

IN

ND

IN

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 Languagesthat can be expressedin a fixed meta-language

Question: What is a good formalism for the space of routing languages?

Mind the Gap

Maze Solving (1800’s)

Shortest paths (1950’s)

Semiring routing (1970’s …)

BGP analysis (mid 1990’s present)

Sobrinho’s QoSAlgebra (2002)

Sobrinho’s Routing Algebra (2003)

Metarouting. tgg & Sobrinho (2005)

3 Basic Structures

set ordered-preO

semigroupS F),( S

),( OAntisymmetricTotal Bounded …

commutativeselectivehas identity elementhas absorbtive element …

Blue = optional properties

),( FT has identityclosed under compositionidempotent…

Two Approaches to Path Weight

),(),(),()( 13221 kk iiwiiwiiwpw

1,21 ,,,path kk iiiip

1ki…3i ki2i1i

),( 21 iiw ),( 1kk iiw),( 32 iiwAlgebraic

Functional

))))(((()(21321 ,,, afffpw iiiiii kk

1ki…3i ki2i1i

21 ,iif1, kk ii

f32 ,iif

a

Two Approaches to Path “Selection”

p

)()( qwpw

i jq

AlgebraicOrdered weights

?)()( qwpw

Quadrants Model

),( SS

),( TS ),( TO

),( SO

Bisemigoup Order Semigroup

Semigroup Transforms Order Trasforms

Coverage

Bisemigroup Order Semigroup

Semigroup Tranforms Order Transforms

Vast literature on semiringrouting, starting in 1970’s

Non-commutative structures

Monoid endomporphismsM. Minoux (1976)

Sobrinho Routing Algebras. SIGCOMM 2003.

Sobrinho QoS Algebras. ToN 2002.Ordered Semigroups

CRASH COURSE in Semigroups

),( S

)()(:,, cbacbacba

)(:

is a semigroup

a nonempty set

a binary operation

This operation must be associative:

Semigroup Examples

)},,({ FTB )},,({ FTBBoolean :

Powerset : ),2()( P ),2()(

P

Free semigroup: ),()(free

Projections: )left,()(left )right,()(right

aba left bba right

is concatenation

Some (Optional) PropertiesCommutative (comm):

abbaba :,Idempotent (idem):

Selective (sel):

aaaa :

},{:, bababa

Special Elements (Optional)

bbbb :Neutral element

bbb :

Absorbing element

If it exist, then it is unique.

If it exist, then it is unique.

Note: if , then the semigroup is trivial, }{

Examples revisited

F

Name propertiesB },{ FT T comm idem sel

FB },{ FT T comm idem sel

2)(P

comm idem 2)(P comm idem

)(left left idem

)(right right idem

)(free

sel

sel

More Examples!

}...0{ n min

1

}...0{ n max 0

n

min

max 0]1,0[

]1,0[

]1,0[

Name

1

properties

}{}...0{ n 0

comm idem sel

0

n

)min(n

)max(n

)(plus n

0

0

1

]1,0min[

]1,0max[

]1,0[

comm idem sel

comm idem sel

comm idem sel

comm

comm

Natural Orders

)()( babba R

)()( baaba L

then

If S is a commutative and idempotent,

Examples revisited

F

Name B },{ FT T

FB },{ FT T2)(P

2)(P

)()( babba R

R

TF FT

examples

}...0{ n min

1

}...0{ n max 0

n

min

max 0]1,0[

]1,0[

Name 0

n

)min(n

)max(n

0

1

]1,0min[

]1,0max[

)()( babba R

R

Special Elements

bbbb :Neutral element:

bbb :Absorbing element:

)()( babba R

RR bb :

LL bb ::

)()( baaba L

From

we get

Property Translations

),( ),( S

associative transitive

idempotent reflexive

idempotent and commutative anti-symmetric

reflexive

bounded

selective total

Cayley Maps

),( S

),( LC

),( RC

})(:,|{ abafabfC bbL

})(:,|{ baagabgC bbR

Include mappings in metalanguage …

S

S

T

O

),,( ),,( L

),,( LC )C,,( LL

… and property mappings

S

S

T

O

)( abaa )( aba L

)(afa L)(afaa

Acknowledgements

• John Billings ([email protected])• Alex Gurney ([email protected])• Samuel Hym ([email protected]) • Peter Sewell ([email protected])• Joao Sobrinho ([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-by-Hop Houting in the Internet," João L. Sobrinho. In Proc. IEEE INFOCOM 2001

– "Algebra and Algorithms for QoS Path Computation and Hop-by-Hop 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. 1160-1173, 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é-)semi-anneaux

• 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