Inter-Domain Routing Multi

advertisement
A Logical View of the Internet
Hierarchical ordering of
autonomous systems
n
Area routing
n Details of internals not
necessary for routing
Provides scalability but might
degrade performance
n
Inter-Domain Routing
n
Tier 3Customer
Provider
Tier 2
Tier 2
Relationships between
autonomous systems:
n
Arvind Krishnamurthy
Fall 2003
Tier 2
Transit relationship: paying
relationship
Peering relationship: nonpaying one
n Avoid traffic through a
transit relationship
n Find lower latency paths
n
n
Economics of the Internet
Tier 1
Peering Relationships
ISP P
ISP P
Transit ($$$)
Transit ($$$)
Transit ($)
Transit ($$$)
Peering
Peering
ISP Y
Transit ($$)
ISP Z
n
n
Transit ($)
C2
C3
C4
n
n
n
n
Transit ($$$)
n
Transit ($$$)
Peering
ISP Y
Transit ($$)
C1
C2
C3
C4
Y informs Z of C2 and C3
Z informs Y of C4
C has a transit relationship with P
C needs to send a packet into P’s domain
n
Transit ($$$)
n
Transit ($$)
Multi-Exit Discriminator
ISP P
Transit ($)
ISP Z
Transit ($)
ISP Y peers with ISP Z
Peering Relationships
Peering
Peering
ISP Y
Transit ($$)
C1
n
Reveal customers to everyone
Reveal all known paths to customers
ISP Y will advertise paths to C2 and C3
ISP X
Peering
Transit ($)
Transit relationship:
n
ISP X
Transit ($$)
C1
n
Transit ($$$)
Transit ($$$)
Transit ($$$)
ISP X
Tier 1
ISP Z
n
Packet origin: Boston, packet destination: SF
It has two choices: transit into P earlier (near Boston) or transit
later (near SF)
Prefer early transit
Transit ($)
Transit ($$)
C2
C3
C4
ISP Y peers with ISP X
n
n
n
n
Y
X
Y
Y
informs X of C2 and C3
informs Y of C1
does not tell X of the path to C4
needs to have transit relationship with P to route to C4
1
Routing Preferences
n
In general, customer > peer > provider
n
Use LOCAL PREF to ensure this
Routing through customer and peer could lower latency and lower
traffic costs
n
n
n
Routing algorithms for the internet
n
n
Announcements
Can we use distance-vector algorithms for policy routing?
The Bouncing Effect
Reminder:
First quiz will be held next Monday
n
n
LS database too large – entire Internet
Metric used by routers not the same
May expose policies to other AS’s
n
n
Select route with highest LOCAL-PREF
Select route with shortest AS-PATH
For routes learned from same neighbor:
n Apply multi-exit discriminator
n
Link state or distance vector?
Problems with link state:
n
Processing order of path attributes:
n
n
n
dest
B
C
Project dynamics will be announced later this week
cost
1
2
dest cost
1
X
A
B
C
dest cost
A
B
dest
B
C
dest cost
A
B
1
25
C
2
1
B Updates Distance to A
cost
1
2
1
1
1
25
C Sends Routes to B
A
C
~
1
dest
B
C
cost
1
2
dest cost
A
B
2
1
A
C
3
1
1
25
dest cost
A
B
A
C
C
dest cost
A
B
2
1
2
B Sends Routes to C
dest
B
C
C Sends Routes to B
dest cost
cost
1
2
A
B
A
C
dest
C
n
C
n
n
A
B
n
n
n
When metric increases
Implicit path has loops
A
In our example, B delays advertising route
C eventually thinks B’s route is gone, picks its own route
B then selects C as next hop
1
n
Split horizon: C does not advertise route to B
Poisoned reverse: C advertises route to B with infinite distance
n
n
n
X1
A now thinks best path to D is through B
A reports D unreachable to B and a
route of cost=3 to C
C thinks D is reachable through A at cost
4 and reports that to B
B reports a cost 5 to A who reports new
cost to C
etc...
D
Does not work for loops with more nodes
What problem is BGP solving?
When AS gets route check if AS already in path
n If yes, reject route
n If no, add self and (possibly) advertise route further
Advantage:
n
n
1
C
Each routing update carries the entire path
Loops are detected as follows:
n
n
B
When link breaks, C marks D as
unreachable and reports that to A and B
Suppose A learns it first
n
Solution: Distance Vector with Path
n
n
1
Works for two node loops
n
n
4
1
Example Where Split Horizon Fails
Adversely affects convergence
Other “Solutions”:
n
5
1
dest cost
4
1
Solution 1: If metric increases, delay propagating
information
n
A
C
1
Problems arise:
n
n
B
25
Solutions
n
A
dest cost
A
B
n
dest cost
1
2
1
25
n
cost
B
C
3
1
Metrics are local - AS chooses path, protocol ensures no loops
Hop-by-hop Model
n
BGP advertises to neighbors only those routes that it uses
n Consistent with the hop-by-hop Internet paradigm
n e.g., AS1 cannot tell AS2 to route to other AS’s in a manner
different than what AS2 has chosen (need source routing for
that)
Underlying problem
Distributed means of
computing a solution.
Shortest Paths
BF: RIP, OSPF …
X?
BGP
Having an X can
n
n
n
n
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
3
Stable-Paths Problem
Solution to SPP
210
2
20
Input:
n
A graph of nodes and edges,
n
Node 0, called the origin,
n
For each non-zero node, a set or
permitted paths to the origin. This
set always contains the “null path”.
n
A ranking of permitted paths at each
node. Null path is always least
preferred. (Not shown in diagram)
5
5210
2
4
420
430
0
n
1
3
130
10
30
n
most preferred
…
least preferred (not null)
1
2
210
20
A solution is an assignment of
permitted paths to each node
such that
2
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,
1
1
0
2
DISAGREE
210
20
230
210
2
1
10
1230
1
primary
link
0
2
0
2
0
230
310
3
3
Remove primary link
3210
30
3
Restore primary link
Second solution
First solution
2
PRECARIOUS: Has solution, but can get
trapped
210
20
4
310
3120
4
0
130
10
1
3210
30
BAD GADGET: No solution
1
10
1230
backup
link
2
210
20
210
20
30
A Solution need not represent
a shortest path tree, or
a spanning tree.
1
0
2
3
130
10
“Route Triggering”
120
10
0
420
430
0
1
SPP may have multiple solutions
120
10
4
1
each node is assigned the highest ranked
path among those consistent with the
paths assigned to its neighbors.
Yes, the translation
gets messy!
120
10
5210
5
5
5310
563120
53120
3
320
30
4310
453120
43120
1
3
120
10
0
6
2
6310
643120
63120
This part has a solution only
when node 1 is assigned the
direct path (1 0).
210
20
As with DISAGREE, this part
has two distinct solutions
4
Solving SPP
3-SAT
Variables V = {X1, X2, …, Xn}
Just enumerate all path assignments
And check stability of each….
Clauses
Exponential complexity !!
C1 = X17 or ~X23 or ~X3,
C2 = ~X2 or X3 or ~X12
….
Cm = X6 or ~X7 or X18
Question Is there an variable assignment
A:V
{true, false} such that
each clause C1, … ,Cm is true?
But, in worst case you (probably)
can’t do any better…
3-SAT is NP-complete
Assignment to variable X
Solvability is NP-Complete
XX0
X0
X
X
C
X7 or X5 or X3
X
0
BAD GADGET
C X7 0
C X5 0
C X3 0
0
0
X7
X7
X5
X
X
X
XX0
X0
X5
X3
X3
0
X = false
BAD GADGET
X = true
Simple Path Vector Protocol (SPVP)
Example 1
Pick the best path available at any given time…
rib(u): u’s best path to origin
rib-in(ußw): recent path sent from w
process spvp[u]
{
receive P from w à
{ rib-in(ußw) := u P
if rib(u) != best(rib-in(ußx)) {
rib(u) := best(rib-in(ußx))
foreach v in peers(u) {
send rib(u) to v
}
}
}
}
210
20
2
430
420
4
0
1
130
10
3
30
5
Example 2
210
20
Example 2 (contd.)
210
20
2
4
420
430
4
0
3
1
3420
30
130
10
3420
30
130
10
Example 2 (contd.)
Example 2 (contd.)
210
20
210
20
2
4
2
420
430
4
0
3
1
3420
30
130
10
3420
30
130
10
Example 2 (contd.)
Example 2 (contd.)
210
20
210
20
2
4
130
10
2
420
430
4
0
1
420
430
0
3
1
420
430
0
3
1
2
420
430
0
3
1
3420
30
130
10
3
3420
30
6
Example 2 (contd.)
210
20
Example 3
210
20
2
2
420
430
4
430
420
4
0
0
3
1
3420
30
130
10
SPVP wanders around assignment space
= assignment
3
1
3420
30
130
10
Unsolvable after link failure
210
20
= solution
2
40
420
430
4
0
3
1
3420
30
130
10
Dispute Digraph
u
v
…
(u v)P
…
(u v)Q
...
…
Q
…
P
...
Dispute Digraph (cont.)
P
0
u
P
v
…
(u,v)P
...
0
…
P
...
Q
Gives the transmission arc
Gives the dispute arc
Q
(u v)P
P
(u,v)P
7
Dispute Digraph example
130
10
210
20
1
2
0
10
420
210
3420
3
4
3420
30
420
430
BAD GADGET II
Sufficient Condition for Sanity
20
Static (SPP)
CYCLE
430
130
30
If an instance of SPP has an
acyclic dispute digraph, then
Dynamic (SPVP)
solvable
safe (can’t diverge)
unique solution
predictable restoration
all sub-problems
uniquely solvable
robust with respect to
link/node failures
8
Download