The Case for Data Plane
Timestamping in SDN
Tal Mizrahi, Yoram Moses
Technion – Israel Institute of Technology
IEEE INFOCOM Workshop on Software-Driven Flexible and Agile Networking (SWFAN)
Outline
•
Background
•
Timestamp ranges
•
Use cases
•
Discussion
•
Conclusion
Outline
•
Background
•
Timestamp ranges
•
Use cases
The
Timed
Project
Controller
4 Data Plane Timestamping in SDN
Switches
Synchronized clocks
A protocol allowing the controller to
schedule network updates
Using
Timestamps
instead of
Current work: Data Plane Timestamping (DPT) in SDN.
The advantages of timestamping are well-known, e.g., [Lamport ‘78].
ingress switch
vSwitch
Timestamped Domain
External Network
VNF
egress switch
Timestamp is
• Pushed by ingress switch.
• Removed by egress switch.
X
DPT: Data Plane Timestamping
6 Data Plane Timestamping in SDN
ingress switch
vSwitch
Timestamped Domain
External Network
VNF
egress switch
What does DPT require from SDN switches?
• Push/remove timestamps.
• Take decisions based on timestamps.
ingress switch
vSwitch
Timestamped Domain
External Network
VNF
egress switch
DPT: Data Plane Timestamping
What can we gain from DPT?
• One field, can be used for many problems / applications.
• Treated uniformly in the network.
Why is DPT feasible in softwarized environments?
• Network is locally administered.
Adding metadata to header is feasible, e.g., [NSH], [VXLAN-GPE], [Geneve].
• Flexible parsing and header editing
Outline
•
Background
•
Timestamp ranges
•
Use cases
•
Discussion
•
Conclusion
Periodic range Extremal range (T≥T0)
Timestamp Ranges
0
... timestamp
value
0
...
T
0timestamp
value
action
field1 field2 field3 …
Flow Table SDN Switch
packet header
action
timestamp field2 field3 field4 …
Flow Table SDN Switch
packet header
DPT Processing
SDN switch (OpenFlow / P4) matchaction procedure
Timestamp-based ranges [TimeFlip, INFOCOM ‘15] Each bit has ternary value: 0 / 1 / *
32 bits 32 bits
Second Fraction Seconds
Time.Sec Time.Frac
Timestamp Format
10 Data Plane Timestamping in SDN
Timestamp Ranges: Examples
Time.Sec
1Time.Frac
*…
* * … *
1 * …
* * … *
0 1 * …
* * … *
Time.Sec
Time.Frac
Periodic range
0
... timestamp
value
1 second
Extremal range: T≥230
0 ...
230 timestamp
value
T≥231
231>T≥230
action
timestamp field2 field3 field4 …
Flow Table SDN Switch packet header DPT Processing action
timestamp field1 field2 field3 …
Flow Table SDN Switch
packet header
DPT Processing
Outline
•
Background
•
Timestamp ranges
•
Use cases
•
Discussion
•
Conclusion
S2 S1
S3 S4
S2 S1
S3 S4 after
before
Use Case 1: Consistent Updates
•
Two-phase update [Reitblatt et al. ’12].
•
S
2attaches version tags to packets.
•
‘
before
’ / ‘
after
’.
•
Indicate distribution tree.
•
Guarantees
per-packet consistency
.
Two-Phase Consistent Updates
14 Data Plane Timestamping in SDN
S2 S1
S3 S4
S2 S1
S3 S4
S2 S1
S3 S4
1
2
DPT-based
One-
Phase Consistent Updates
15 Data Plane Timestamping in SDN
1. Controller sends the ‘after’ configuration to switches (subject to Timestamp ≥ Tthreshold). 2. Controller updates S2 to start sending ‘after’ version tag.
Switches automatically start using the ‘after’ path when Timestamp ≥ Tthreshold
S2 S1
S3 S4
S2 S1
S3 S4
S2 S1
S3 S4
1
DPT
DPT-based
One-
Phase Consistent Updates
16 Data Plane Timestamping in SDN
DPT reduces the load on the controller.
Stateless load balancing:
- Equal Cost Multiple Paths (ECMP) 50% utilization.
- Random Packet Spraying (RPS) [Dixit et al. ‘13].
Stateful methods, e.g., Round Robin.
Use Case 2: Elephant Flow Load Balancing
S
310
10
src
S
5dst
S
4S
2S
110
10
20
20
20
A
B
DPT-based load balancing:
DPT-based Load Balancing
18 Data Plane Timestamping in SDN
S
310
10
src
S
5dst
S
4S
2S
110
10
20
20
20
A
B
20 Gbps elephant flow.
timestamp
value
...
A B A B
...
toggle interval
DPT-based Load Balancing
S
310
10
src
S
5dst
S
4S
2S
110
10
20
20
20
A
B
How does the controller compute the toggle interval?
• L = maximal packet length.
• BW = total bandwidth of the two links.
• Toggle interval = L / BW Independent of the flow rate !
timestamp
value
...
A B A B
...
Goodput of DPT-based Load Balancing
20 Data Plane Timestamping in SDN
Toggle interval = L / BW
1 msec
• Load balancing using 1-bit from the DPT.
• DPT: higher goodput than RPS / ECMP.
timestamp
value
...
A
B
A
B
Second Fraction Seconds
Time.Sec Time.Frac
Use Case 3: Network Telemetry
The DPT is the only necessary field for:
•
Delay measurement
•
Loss measurement
S
1S
2Ti
m
e
CS1
2CR1
2CS0
1CR0
1CS1
1CR1
1• [Coloring]: All data packets from S1 to S2 include a 1-bit ‘color’.
• Measurement is performed separately for each block.
[Coloring] M. Chen, L. Zheng, G. Mirsky, G. Fioccola, and T. Mizrahi, “IP Flow Performance Measurement Framework,”
draft-chen-ippm-coloring-Using the DPT reduces the controller load
Outline
•
Background
•
Timestamp ranges
•
Use cases
•
Discussion
•
Conclusion
DPT: is it Worth the Overhead?
Timestamp length / flexibility tradeoff:
64 bits fully flexible
1 bit
often suffices
ingress switch
vSwitch
Timestamped Domain
External Network
VNF
egress switch
DPT Header Example: NSH Encapsulation
24 Data Plane Timestamping in SDN
[NSH-Timestamp] R. Browne, A. Chilikin, B. Ryan, T. Mizrahi, and Y. Moses, “Network service header timestamping,” draft-browne-sfc-nsh-timestamp, work in progress, IETF, 2015.
• All traffic is encapsulated with an NSH.
• NSH may include a timestamp [NSH-Timestamp].
Network Service Header (NSH) encapsulation
• NSH is used for Service Function Chaining (SFC).
• Defined by the SFC working group of the IETF.
Outline
•
Background
•
Timestamp ranges
•
Use cases
•
Discussion
Conclusion
26 Data Plane Timestamping in SDN
Load balancing
• Stateless
• High goodput
DPT = Data Plane Timestamping
One header for multiple applications
The
Timed
Project
http://tx.technion.ac.il/~dew/TimedSDN.html
Consistent updates
• Low controller CPU load
• Eliminates management overhead of version tags
Network telemetry
• Low controller CPU load
Evaluation Method
28 Data Plane Timestamping in SDN
•
Emulab
testbed.
•
48 Linux-based OpenFlow software switches.
–
CPqD OFSoftSwitch.
–
Dpctl controller.
•
Slightly modified OpenFlow switches
–
Push timestamp into packet’s Ethernet source address.
The
Project
Why do we need
TimedSDN?
Scheduling
protocol
Accurate scheduling
method
SDN Clock
synchronization
R
EVERSEPTP
[HotSDN ‘14, ISPCS ‘14]
T
IMEF
LIP [INFOCOM ‘15]O
NEC
LOCK [NOMS ‘16] OpenFlowScheduled Bundles
[INFOCOM ’16, OpenFlow 1.5]
NETCONF Time Capability
[NOMS ’16, RFC 7758]
Timed Consistent Updates
[SOSR, ‘15]
ONECLOCK to Rule
Them All
[NOMS, ‘16]
TIME4: Dynamic
Path Updates
[INFOCOM, ‘16]
Data Plane Timestamping
Timestamping vs. Sequence Numbers
30 Data Plane Timestamping in SDN
ingress switch vSwitch Timestamped Domain External Network VNF egress switch
What if clocks are not synchronized? ==
What if we used sequence numbers [Lamport]?
Controller is synchronized to switches
controller can plan the schedule of threshold times for network updates.
Controller can sample the counters / timestamps at fixed (synchronized) time intervals.
S2 S1 S3 S4
• Clock synchronization has benefits.
Load Balancing
S
1S
210
10
20
A
B
C
timestamp
value
A C B C
...
A C B C
...
Periodic range Extremal range (T≥T0)
Timestamps Ranges
32 Data Plane Timestamping in SDN
0
... timestamp
value
0
...
T
0timestamp
value
action
field1 field2 field3 …
Flow Table SDN Switch
packet header
action
timestamp field1 field2 field3 …
Flow Table SDN Switch
packet header
DPT Processing
SDN switch (OpenFlow / P4) matchaction procedure
Timestamp-based ranges [TimeFlip, INFOCOM ‘15] Each bit has ternary value: 0 / 1 / *
Network Telemetry
Delay measurement Loss measurement
T
1T
2Ti
m
e
S
1S
2One-way delay: T2-T1
S
1S
2Ti
m
e
CS1
2CR1
2CS0
1CR0
1CS1
1CR1
1Color-based
Loss
Measurement
34 Data Plane Timestamping in SDN
• [Coloring]: All data packets from S1 to S2 include a 1-bit ‘color’.
• Measurement is performed separately for each block.
Controller can compute:
Packet loss = (CS12-CS11)-(CR12-CR11)
S1 toggles color.
S1 and S2 maintain per-color counters.
S1 and S2 periodically export counters to central point, e.g., SDN controller.
S1 inserts 1-bit color into packet header.
Color-based
Delay
Measurement
T
1T
3T
2T
4S
1S
2Ti
m
e
Controller can compute:
Two-way delay = (T4-T1)-(T3-T2)
S
1S
2Ti
m
e
CS1
2CR1
2CS0
1CR0
1CS1
1CR1
1Color-based Measurement
36 Data Plane Timestamping in SDN
Q: How does an SDN switch toggle the color?
DPT-based Coloring
timestamp
value
...
color
‘1’
‘0’
‘1’
‘0’
Second Fraction Seconds
Time.Sec Time.Frac
• Each block: a constant time interval.
• The controller is not involved in the color toggling.
• Choose 1 bit from the timestamp.
• Use this bit as the color.
• Each switch has two match-action rules:
• Timestamp bit=0
DPT-based Coloring
38 Data Plane Timestamping in SDN
timestamp
value
...
color
‘1’
‘0’
‘1’
‘0’
Second Fraction Seconds
Time.Sec Time.Frac
A 1-bit timestamp is sufficient.
DPT-based coloring reduces
the load on controller.
DPT allows for both
References
[1] T. Mizrahi, Y. Moses, “Software Defined Networks: It’s About Time", IEEE INFOCOM, 2016. (http://tx.technion.ac.il/~dew/Time4INFOCOM.pdf)
[2] M. Chen, L. Zheng, G. Mirsky, G. Fioccola, and T. Mizrahi, “IP Flow Performance Measurement Framework,” draft-chen-ippm-coloring-based-ipfpm-framework, work in progress, 2016.
(https://tools.ietf.org/html/draft-chen-ippm-coloring-based-ipfpm-framework)
[3] R. Browne, A. Chilikin, B. Ryan, T. Mizrahi, and Y. Moses, “Network service header timestamping,” draft-browne-sfc-nsh-timestamp, work in progress, IETF, 2015.
(https://tools.ietf.org/html/draft-browne-sfc-nsh-timestamp)
[4] T. Mizrahi, O. Rottenstreich, Y. Moses, "TimeFlip: Scheduling Network Updates with Timestamp-based TCAM Ranges", IEEE INFOCOM, 2015. (http://tx.technion.ac.il/~dew/TimeFlipINFOCOM.pdf)
[5] T. Mizrahi, E. Saat, Y. Moses, "Timed Consistent Network Updates", ACM SIGCOMM Symposium on SDN Research (SOSR), 2015. (http://tx.technion.ac.il/~dew/TimedConsistentSOSR.pdf)