T
IME
F
LIP
: Scheduling Network
Updates with
Timestamp-based TCAM Ranges
Tal Mizrahi
*
, Ori Rottenstreich
†
, Yoram Moses
*
* Technion – Israel Institute of Technology
† Princeton University
Outline
•
Background
•
Motivation
•
Introducing T
IME
F
LIP
•
Efficient T
IME
F
LIP
s
switch
switch
switch
switch
controller
switch
switch
switch
switch
Software Defined Networks (SDN)
data plane
data plane
control plane
Network updates.
TCAM: Ternary Content Addressable Memory
•
Memory for quick searching
•
Top-down search: first match “wins”
•
Ternary: 0 / 1 / *
•
* = don’t care
action
s
u, …, s
1TCAM
Network Device
packet’s search
TCAM Ranges
•
How do you represent a range?
•
Example:
–
F is a 3 bit field
–
Range F
1
•
Range
expansion
= the number of entries
required to represent a range.
Outline
•
Background
•
Motivation
•
Introducing T
IME
F
LIP
•
Efficient T
IME
F
LIP
s
TCAM
1TCAM
2...
TCAM
nincoming
packet
outgoing
packet
Network device
TCAM
1TCAM
2...
TCAM
nincoming
packet
outgoing
packet
Network device
Problem 1: Atomic Bundles
Atomic Bundle [OpenFlow 1.4]:
A set of updates that need to be applied atomically (‘all-or-none’).
S
1
S
2
S
3
S
4
S
5
S
1
S
2
S
3
S
4
S
5
S
1
S
2
S
3
S
4
S
5
S
1
S
2
S
3
S
4
S
5
Problem 2: Time-based Updates
A key benefits of SDN:
dynamic path allocation based on network load
Time is a powerful tool in path allocation or reconfiguration.
Our time extension to the OpenFlow protocol – now in OpenFlow 1.5.
Problem: How do we
accurately
apply a time-based update?
Outline
•
Background
•
Motivation
•
Introducing T
IME
F
LIP
•
Efficient T
IME
F
LIP
s
packet’s search
key
action
s
u, …, s
1TCAM
Network Device
action
s
u, …, s
1TCAM
Network Device
T
s
u, …, s
1T
T
0TCAM
Network Device
action
packet’s search key packet’s search keyT
IME
F
LIP: Timestamp-based TCAM Lookup
The timestamp is used in the TCAM key –
time range
.
COTS switches can synchronize clocks very accurately ~ 1 μsec.
[Using IEEE 1588 Precision Time Protocol (PTP) or GPS]
conventional
TimeFlip
Atomic Bundles Using T
IME
F
LIP
TCAM
1
TCAM
2
...
TCAM
n
incoming
packet
outgoing
packet
Network device
TT0
TT0
TT0
TT0
before
after
Time-based Updates using T
IME
F
LIP
TimeFlip:
switch accurately
starts using ‘after’ at T
0
.
T
s
u
, …, s
1T
T
0TCAM
Network Device
search
key
‘after’
T
IME
F
LIP
Use Cases
Timed Installation
Timed Removal
Timed Action Update
TCAM
s
u
, ...,s
1,
[
T
T
0]
a
TCAM
s
u
, …,s
1,
[
T
<
T
0]
a
s
u
, …, s
1,
*
…
*
TCAM
a
32 bits
48 bits
Nanoseconds
Seconds
What is a Timestamp?
IEEE 1588 Time Of Day (TOD):
Timestamp-based TCAM Lookup
T
s
u, …, s
1T
T
0TCAM
Network Device
search
key
action
Problem:
•
Small number of entries in T
T
0
.
•
Small number of timestamp bits per entry.
•
Without compromising the scheduling accuracy !
Large # of bits in timestamp field?
Efficient T
IME
F
LIP
s
The Punctual Teacher Problem
•
Afternoon lesson
•
Synchronize watches
The Punctual Teacher Problem
•
Afternoon lesson
•
Synchronize watches
•
Write down
date
time
The Punctual Teacher Problem
•
Afternoon lesson
•
Synchronize watches
•
Write down
date
time
Flexible + punctual !
2015-04-30 15:38
Scheduling Tolerance
T
min
time
T
max
•
Assume: we allow the
controller
to schedule the
update to any time in the range [T
min
, T
max
]
•
It
selects
T
0
that minimizes the expansion of
T
T
0
•
Without compromising the accuracy !
scheduled time
T
0
TOL
Scheduling Tolerance – TOL
controller
switch switch
Optimal Scheduling Algorithm
•
Theorem:
T
SCH
is optimal.
No other scheduling algorithm
produces an extremal range with
a lower expansion.
•
Theorem: the average expansion is:
controllerswitch switch
T
0T
1T
0T
1TCAM
The Punctual Teacher Problem
time
I know the date.
No need to write it.
2015-04-30 15:38
2015-04-30
15:38
Periodic Ranges
TCAM
controller
switch switch
T
0scheduled
time
time
insertion
Assumption: a TimeFlip with
T
T
0
is present during [T
0
-Δ,T
0
+Δ)
For example, if
Δ
=0.5 second:
T
0+
D
T
0-
D
cleanup
Installation Bounds –
Δ
T
T
0
TCAM
s
u, ...,s
1,[TT0] aTCAM
s
u, ...,s
1,*...* aI know which
second it is.
2015-04-30 15:38:10.251987326
2015-04-30 15:38:10
.251987326
controller
Periodic Continuation Algorithm
A periodic continuation algorithm for
T
T
0
:
Period=2
VThe
V
most significant bits are
don’t care
!
Period
2
Δ
Nyquist ?
controller
switch switch
Outline
•
Background
•
Motivation
•
Introducing T
IME
F
LIP
•
Efficient T
IME
F
LIP
s
Resource Consumption
•
Theorem: using S
CHEDULE
and B
OUNDED
R
ANGE:
–
The
expansion
is bounded by:
Example: Efficient T
IME
F
LIP
What can we do with an 8-bit timestamp field?
Switches:
Δ = 8 seconds
Controller:
TOL = 100 milliseconds
The 8-bit timestamp can represent any TimeFlip.
log
(𝟐∆) − log
𝑻𝑶𝑳 ≤ 𝟖 𝒃𝒊𝒕𝒔
action
5-tuple
TCAM
packet’s search
key
metadata timestamp
160 bits
The Cost of T
IME
F
LIP
: 1 Bit / 1 Entry
•
Theorem: if
𝑇𝑂𝐿 ≥ 2
𝑙𝑜𝑔
2
(∆)
, then the
timestamp range requires as little as:
–
1 TCAM entry.
–
1 bit in the timestamp field.
* * * *
*
timestamp
field
* * * * * *
function of
TOL
Timed Action Updates
Using the
complementary action
[Rottenstreich et al.]:
Complementary encoding has been shown to be
optimal for extremal ranges of the form T
T
0
.
s
u
, …, s
1,
*
…
*
TCAM
a
s
u
, …, s
1,
[
T
T
0]
a’
s
u
, …, s
1,
*
…
*
TCAM
a’
s
u
, …, s
1,
[
T
<
T
0]
a
=
Outline
•
Background
•
Motivation
•
Introducing T
IME
F
LIP
•
Efficient T
IME
F
LIP
s
T
IME
F
LIP
: Would it Work on a Real Switch?
Yes !!
Microbenchmark: TimeFlip was tested on a
TCAM range is
chosen
Conclusion
TimeFlip
Atomic Bundles
Time-based Updates
TimeFlips can be represented
very efficiently
Scheduling Tolerance
Periodic Ranges
Simulation verifies
Microbenchmark:
References
[1] T. Mizrahi, O. Rottenstreich, Y. Moses, "TimeFlip: Scheduling Network Updates with
Timestamp-based TCAM Ranges", INFOCOM, 2015.
http://tx.technion.ac.il/~dew/TimeFlipINFOCOM.pdf
[2] T. Mizrahi, Y. Moses, "Time-based Updates in Software Defined Networks", the second
workshop on hot topics in software defined networks (HotSDN), 2013.
http://tx.technion.ac.il/~dew/TimeSDN.pdf
[3] O. Rottenstreich, R. Cohen, D. Raz, and I. Keslassy, “Exact worst case TCAM rule
expansion,” IEEE Trans. Computers, vol. 62, no. 6, pp. 1127–1140, 2013.
http://webee.technion.ac.il/people/or/publications/tc12_exact.pdf
[4] Open Networking Foundation, OpenFlow switch specification, Version 1.5.0, 2015.
https://www.opennetworking.org/images/stories/downloads/sdn-resources/onf-specifications/openflow/openflow-switch-v1.5.0.noipr.pdf
[5] Open Networking Foundation, OpenFlow extensions 1.3.x package 2, 2015.