Upload
others
View
2
Download
0
Embed Size (px)
Citation preview
1 © Nokia 2015
Bell Labs
SDN Enabled Path Switching
• Gordon Wilfong Bell Labs
• Joint work with Adiseshu Hari (Bell Labs) and Urs Niesen (Qualcomm)
Bell Labs
2 © Nokia 2015
How is routing currently
done?
Destination-Based Forwarding Table
Destination Output Port
10.1.0.0/24
10.1.2.0/24
10.2.1.0/24
10.3.1.0/24
20.2.0.0/16
20.1.1.0/28
3
2
2
1
2
3
1
2
3
R:
R
20.1.1.0/28
10.2.1.0/24
10.3.1.0/24
3
• Destination-based tables grow as address blocks fragment and increase in number
• Does not allow for flexible policy-based routing
Destination-based Routing Disadvantages
Destination-based Routing Advantages
• Destination-based routing tables populated locally by distributed routing protocols (e.g., BGP or RIP or …)
4
Policy-Based Routing
firewall
codecS
D
5
Policy-Based Routing
firewall
codecS
D
6
Policy-Based Routing
firewall
codecS
D
7
Policy-Based Routing
firewall
codecS
D
8
Flow-Based Forwarding Table
Flow Output Port
Red
Blue
Purple
Green
Black
??
3
2
2
1
3
3
1
2
3
R:
R
9
• Flow-based tables grow as more and more complex policies are introduced
Flow-based Routing Disadvantages
Q: Is there a way to allow for unbounded growth in policy-complexity (i.e., growth in number of flows) while keeping forwarding table size fixed?
Flow-based Routing Advantages
• Allows for flexible policy-based routing
10
11 © Nokia 2015
Our
proposal
1S
• For each node, the outgoing ports are given a distinct binary label
• Each packet header includes path encoded as a sequence of port labels
Path Encoding
1S
1S
1S
10
11
11
1011
11
12
Path Encoding Table
Label Output Port
label1
label2
label3
1
2
3
1
2
3
R:
Rlabel1 …
13
Software defined network
SDN Controller
14
• Takes up space in packet headers
Path Encoding Disadvantages
Path Encoding Advantages
• Table size is bounded by the number of ports
• As flows or destinations increase, table size remains fixed
15
Fixed-length Labels
1S4S 0S 5S 8S
3S2S 7S 6S 9S
01
00
10
11
10 01
00
1
0
Longest path encoding from to a leaf is 5,
e.g., encoding 00000 of path 8510 ,,, SSSS
0S
In the next few slides, we consider paths from to all leaf nodes. 0S
A node with k output ports uses labels of length klog
16
Variable-length Binary Labels
1S4S 0S 5S 8S
3S2S 7S 6S 9S
100
0
101
10
11 10
0
1
0
Longest path encoding from to a leaf has length 3
e.g., encoding 000 of path .
How to unambiguously decode a path label?
8510 ,,, SSSS
0S
17
• Path labels may not be unique
• and both have label 01
Decoding Variable-length Binary Labels: Uniqueness
1S4S 0S 5S
3S2S 7S 6S
10
0
0
01
11 01
1
510 ,, SSS 40 ,SS
18
• Path labels may not be locally decodable even if encodings are unique• does not know that sending packet out port labeled 01
will not end at leaf
• is unique path to leaf with label 01 and so should send
packets labeled 01 on port labeled 0
• Nodes also should not have to know labels at other nodes to decode
Decoding Variable-length Binary Labels: Local
1S4S 0S 5S
3S2S 7S 6S
01
0
0
10
11 01
1
510 ,, SSS
0S
0S
19
Prefix-free Labeling (PFL)
1S4S 0S 5S 8S
3S2S 7S 6S 9S
100
0
101
11
11 10
0
1
0
PFL: At each node, no label is a prefix of another label at that node.
• PFL implies distinct path encodings for paths from same source
• PFL implies unambiguous decoding at each node with only local information
20
Computing a prefix-free labeling
21
Preliminaries
0S
1S 2S
3S
1a
},)(:{)( SatailAaSout
},,{)( 3210 aaaSout
Def:
2a
3a
),( AVD Directed graph:
VS
22
Arc Label Lengths
0S
1S 2S
3S
1aL2aL
3aL
Def: Length of binary label of arc a = aL
23
Kraft’s Inequality
12
1
1
ki
Li
A code with codewords having
lengths is said to satisfy Kraft’s Inequality if: kLLL ,...,, 21
kwww ,...,, 21
24
Tree Codes
0
10
0
0
0 0 01 1
1
1
1 1
= 110
= 01
Prefix-free if no two chosen nodes on the same path to the root
25
Prefix-free Code Kraft’s Inequality
Theorem: A prefix-free code with codewords having lengths
exists if and only if the lengths satisfy Kraft’s Inequality.
Proof: Assume wlog .
Suppose lengths satisfy Kraft’s Inequality.
Start with full binary tree of depth .
At step i: choose a node at depth to determine codeword and remove all descendants.
Must show this is always possible for steps i:
},...,,{ 21 kLLL
kLLL ...21
kL
iL
ki 1
26
Example
0
10
0
0
0 0 01 1
1
1
1 1
= 01
2iL
27
Example
0
10
0
0
0 01 1
1
1
1
= 01
Remove descendants of
28
Example
0
10
0
0
0 01 1
1
1
1
= 110
= 01
31 iL
29
Proof continued
We show that at step i there is at least one remaining leaf at depth .
Number of remaining leaves at step i is:
iL
0212212221
1
1
1
1
k
j
LLi
j
LLi
j
LLL jkjk
jkk
Kraft’s Inequality
30
Proof continued … again
1222111
k
i
LLk
i
LLk
i
iikikS
Kraft’s Inequality
• Suppose it is a prefix-free code.
• Consider a complete binary tree of depth .
• A length codeword has a set of leaves under it where
and ∅ for .
kL
ik LL
iS
2iL iS
ji SS ji
total number of leaves
31
Definition: A valid labeling is a labeling of the arcs in A where if is thelength of the label of arc a then for each the label lengths of outgoing arcs
satisfy Kraft’s Inequality
Definition: The length of a path P is
Definitions
12)(
vouta
La
aL
Pa
aLPL )(
Vv
32
Given a digraph D=(V,A) and a set of paths P in D.
Find a valid labeling of the arcs of A to minimize .
Problem statement
kiPi 1:
kiPL i 1:)(max
We call this the optimal path encoding problem.
33
Examples
v 2
1
31
8
1
8
1
4
1
2
1
3
v 2
2
21
4
1
4
1
4
1
4
1
2
34
Optimal Path Encoding is APX-hard
Theorem: Approximating the optimal path-encoding problem to within a factor better than 8/7 is NP-hard.
Proof: Reduction from SAT where each clause has 2 or 3 literals and eachvariable is involved in at most 3 clauses [Tovey84]. => Each literal in 1 or 2 clauses
__,,
_,_,
__,,
3
2
1
i
i
i
xC
xC
xC
__,,
__,,
_,_,
__,,
3
3
2
1
i
i
i
i
xC
xC
xC
xC
or
35
Gadget for variable
i id
ix
ix
1
it
2
it
1
if
2
if
ix
36
Gadget for clause
id
ix
ix
1
it
2
it
jf i 1
2
if
)xxx(C kji
kt j 1
jd
jx
jx
2
jt
1
jf
2
jf
i
kd
kx
kx
1
kt
2
kt
1
kf
2
kf
CP
37
Gadget for clause
id
ix
ix
1
it
2
it
jf i 1
2
if
)xxx(C kji
kt j 1
jd
jx
jx
2
jt
1
jf
2
jf
i
kd
kx
kx
1
kt
2
kt
1
kf
2
kf
1
12
11
1
C satisfied by 7,, Ckji Lfalsextruextruex
1
1
2
2
2
2
2
)(: CC PLengthL
38
Gadget for clause
id
ix
ix
1
it
2
it
jf i 1
2
if
)xxx(C kji
kt j 1
jd
jx
jx
2
jt
1
jf
2
jf
i
kd
kx
kx
1
kt
2
kt
1
kf
2
kf
1
12
12
1
C not satisfied
2
2
2
1 1
1
2
8,, Ckji Lfalsexfalsextruex
39
Dummy gadget for variable
'iy'iu
'iz'iv
ix
'i
40
Gadget for clause
id
ix
ix
1
it
2
it
jf i 1
2
if
)xx(C ji
'1 jt j
jd
jx
jx
2
jt
1
jf
2
jf
i
CP
'ju
'jv
'jy
'jz
41
Optimal Path Encoding: Convex Minimization Problem
AaZL
ZL
Vv
PLL
L
a
vouta
L
i
Pa
a
,
,12
,
:subject to
min
)(
a
i
P
AaLa ,0
I
a
I LL ,Optimal solution:
(Kraft)
42
Relaxed version
AaRL
RL
Vv
PLL
L
a
vouta
L
i
Pa
a
,
,12
,
:subject to
min
)(
a
i
P
** , aLLOptimal solution:
0))2ln(exp(ln)(
vouta
aLor
Geometric program(efficiently solved by interior point methods)
43
Rounding Relaxed Solution
Define R
aL *
aL Aa,
pa
R
ap
R LLP
max
44
Solutions
** , aLL
I
a
I LL ,
R
a
R LL ,
Optimal integer solution (what we want)
Optimal relaxed solution (what we can get)
Rounded optimal relaxed solution (settle for this)
45
If wlog we can assume
Useful Fact
Lemma:
Proof: only if a is the only outgoing arc at tail(a).
0I
aL 0* aL
0I
aL
0I
aL 0*
aLFact:
46
Rounding Gives a 2-Approx
Theorem:
Proof:
IRI LLL 2
122)()(
*
vouta
L
vouta
L aRa
(hence valid labeling)
Let p be a path where
I
pa
I
a
I
I
a
a
pa
*
a
pa
R
a
R
L
LL
LpaL
LpaL
LL
2
0:
0:
*
*
(By Lemma)
Rounded solution is valid and
47
Experimental Results
48
Gradient Descent Algorithm
• An entropy form of the dual can be obtained (see paper)• Dual used to derive “simple” projected gradient descent algorithm
Graph FixedLength
GDA Nodes Edges Paths
AT&T MPLS backbone network 15 bits 10 bits 25 224 600
AS 4323 (Rocketfuel database) 25 bits 17 bits 51 284 2550
49
Note 1: Finer Grained Model
v
v
0
0
0
0
0
50
Note 1: Finer Grained Model
v
v
10
0
0
0
1
1
0
1
12
2
51
Conclusions
• Introduced and formalized the optimal path-encoding problem
• Showed that optimal path encoding is APX-hard
• Presented a 2-approximation algorithm
• Experiments show > 30% reduction in longest path encoding in real networks
52
Future Work
• Close gap between 2-approx and 8/7 lower bound on approx.• What about multicast?
53
Thank you!
54