MPTCP: Design and Deployment. Day 11

Similar documents
Recap. TCP connection setup/teardown Sliding window, flow control Retransmission timeouts Fairness, max-min fairness AIMD achieves max-min fairness

Outline Computer Networking. TCP slow start. TCP modeling. TCP details AIMD. Congestion Avoidance. Lecture 18 TCP Performance Peter Steenkiste

Transport Layer Review

TCP so far Computer Networking Outline. How Was TCP Able to Evolve

Transmission Control Protocol. ITS 413 Internet Technologies and Applications

Chapter 3- parte B outline

TCP. CSU CS557, Spring 2018 Instructor: Lorenzo De Carli (Slides by Christos Papadopoulos, remixed by Lorenzo De Carli)

TCP Sendbuffer Advertising. Costin Raiciu University Politehnica of Bucharest

ECE 435 Network Engineering Lecture 10

Transport layer. UDP: User Datagram Protocol [RFC 768] Review principles: Instantiation in the Internet UDP TCP

Transport layer. Review principles: Instantiation in the Internet UDP TCP. Reliable data transfer Flow control Congestion control

TCP reliable data transfer. Chapter 3 outline. TCP sender events: TCP sender (simplified) TCP: retransmission scenarios. TCP: retransmission scenarios

CMSC 417. Computer Networks Prof. Ashok K Agrawala Ashok Agrawala. October 25, 2018

Design Decisions for Multipath TCP

Chapter 3 outline. 3.5 Connection-oriented transport: TCP. 3.6 Principles of congestion control 3.7 TCP congestion control

cs/ee 143 Communication Networks

COMP/ELEC 429/556 Introduction to Computer Networks

Multiple unconnected networks

CSC 8560 Computer Networks: TCP

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, steam: r Development of reliable protocol r Sliding window protocols

Designing a Resource Pooling Transport Protocol

CSE/EE 461 Lecture 13 Connections and Fragmentation. TCP Connection Management

Transport Layer Marcos Vieira

Outline Computer Networking. Functionality Split. Transport Protocols

6.1 Internet Transport Layer Architecture 6.2 UDP (User Datagram Protocol) 6.3 TCP (Transmission Control Protocol) 6. Transport Layer 6-1

Fall 2012: FCM 708 Bridge Foundation I

Transport Protocols & TCP TCP

CSC 4900 Computer Networks: TCP

Internet Engineering Task Force Internet-Draft Obsoletes: 6824 (if approved)

Transport Layer: Outline

TCP : Fundamentals of Computer Networks Bill Nace

ECE 650 Systems Programming & Engineering. Spring 2018

CSCD 330 Network Programming Winter 2015

TCP Review. Carey Williamson Department of Computer Science University of Calgary Winter 2018

Lecture 12: TCP Friendliness, DCCP, NATs, and STUN

Lecture 10: TCP Friendliness, DCCP, NATs, and STUN

CSCI Topics: Internet Programming Fall 2008

Hashing on broken assumptions

ETSF05/ETSF10 Internet Protocols Transport Layer Protocols

Fast Retransmit. Problem: coarsegrain. timeouts lead to idle periods Fast retransmit: use duplicate ACKs to trigger retransmission

Correcting mistakes. TCP: Overview RFCs: 793, 1122, 1323, 2018, TCP seq. # s and ACKs. GBN in action. TCP segment structure

Overview. TCP & router queuing Computer Networking. TCP details. Workloads. TCP Performance. TCP Performance. Lecture 10 TCP & Routers

MultipathTCP. Alan Ford

Improving Multipath TCP. PhD Thesis - Christoph Paasch

10 minutes survey (anonymous)

Lecture 3: The Transport Layer: UDP and TCP

CS 43: Computer Networks. 19: TCP Flow and Congestion Control October 31, Nov 2, 2018

Outline. TCP: Overview RFCs: 793, 1122, 1323, 2018, Development of reliable protocol Sliding window protocols

Different Layers Lecture 20

Transport Protocols and TCP

Lecture 8. TCP/IP Transport Layer (2)

Chapter 24. Transport-Layer Protocols

CNT 6885 Network Review on Transport Layer

Transport Layer. Application / Transport Interface. Transport Layer Services. Transport Layer Connections

Tuning, Tweaking and TCP

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 10

Transport Protocols and TCP: Review

6. The Transport Layer and protocols

Congestion Control. Lecture 12: TCP Friendliness, DCCP, NATs, and STUN. Chiu Jain Phase Plots. Fair A=B. Responding to Loss. Flow B rate (bps) t 1 t 3

Initial connection setup. Adding subflow setup. Three-way handshake with MP_CAPABLE Exchange 64 bit key(key-a, Key-B)

Transmission Control Protocol (TCP)

image 3.8 KB Figure 1.6: Example Web Page

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

Reliable Transport I: Concepts and TCP Protocol

Sequence Number. Acknowledgment Number. Data

CS Networks and Distributed Systems. Lecture 10: Congestion Control

Networking Technologies and Applications

CMPE 150/L : Introduction to Computer Networks. Chen Qian Computer Engineering UCSC Baskin Engineering Lecture 9

Congestion Control In The Internet Part 2: How it is implemented in TCP. JY Le Boudec 2014

CSC 401 Data and Computer Communications Networks

CS419: Computer Networks. Lecture 10, Part 2: Apr 11, 2005 Transport: TCP mechanics (RFCs: 793, 1122, 1323, 2018, 2581)

Question. Reliable Transport: The Prequel. Don t parse my words too carefully. Don t be intimidated. Decisions and Their Principles.

Transport Layer Chapter 6

CS4700/CS5700 Fundamentals of Computer Networks

Lecture 20 Overview. Last Lecture. This Lecture. Next Lecture. Transport Control Protocol (1) Transport Control Protocol (2) Source: chapters 23, 24

Chapter III: Transport Layer

bitcoin allnet exam review: transport layer TCP basics congestion control project 2 Computer Networks ICS 651

Computer Networks. Sándor Laki ELTE-Ericsson Communication Networks Laboratory

Intro to LAN/WAN. Transport Layer

Transport Layer: outline

Computer Communication Networks Midterm Review

Computer Network Fundamentals Spring Week 10 Congestion Control Andreas Terzis

TCP Congestion Control

Wireless TCP Performance Issues

23-3 TCP. Topics discussed in this section: TCP Services TCP Features Segment A TCP Connection Flow Control Error Control 23.22

A taste of HTTP v1.1. additions. HTTP v1.1: introduces many complexities no longer an easy protocol to implement. G.Bianchi, G.Neglia, V.

CS 162 Operating Systems and Systems Programming Professor: Anthony D. Joseph Spring Lecture 21: Network Protocols (and 2 Phase Commit)

Chapter 3 Transport Layer

TCP/IP Protocol Suite 1

Last Class. CSE 123b Communications Software. Today. Naming Processes/Services. Transmission Control Protocol (TCP) Picking Port Numbers.

Bandwidth Allocation & TCP

TSIN02 - Internetworking

Chapter 3 outline. 3.5 connection-oriented transport: TCP segment structure reliable data transfer flow control connection management

Reliable Transport I: Concepts and TCP Protocol

CSE/EE 461 Lecture 12 TCP. A brief Internet history...

Transport Layer Protocols TCP

Computer Networking Introduction

Transport protocols. Transport Layer 3-1

TCP Congestion Control

TCP Congestion Control

Transcription:

MPTCP: Design and Deployment Day 11

Use of Multipath TCP in ios 7 Multipath TCP in ios 7 Primary TCP connection over WiFi Backup TCP connection over cellular data Enables fail-over Improves performance Currently only being used between phone and Siri servers 2

Outline TCP Background MPTCP Design MPTCP Deployment issues

TCP--Revisited

What is the Point of TCP? Effectively share the network? Goal: Fairness and vague notion of equality Ideal: If N connections, each should get 1/N of BW So, 10MB with 2 connections, each gets 5MB How to determine 1/N in a distributed manner? Each connection probes for available BW by sending more packets When a loss occurs then sso slow down If no losses send more packets

TCP Revisited TCP 3-way handshake SYN-Flag SYN/ACK-Flag Hello Oh, Hello ACK-Flag Let s talk

TCP Revisited TCP 3-way handshake Flow-Control/Congestion-Control AIMD

TCP Revisited TCP 3-way handshake Flow-Control/Congestion-Control Connection Tear-down FIN-Flag I m done talking ACK/FIN-Flag Got it, good bye

Congestion Control: AMID Every RTT increase your Window by 1 Pkt W = W +1 However if you receive a loss Cut your window by half: w = w/2 You aggressively decrease!! 4 3 2 1 Window of packets

Congestion Control Every RTT increase your Window by 1 Pkt W = W +1 However if you receive a loss Cut your window by half: w = w/2 You aggressively decrease!! 1 4 1 4 ACK

Congestion Control Every RTT increase your Window by 1 Pkt W = W +1 However if you receive a loss Cut your window by half: w = w/2 You aggressively decrease!! 9 8 7 6 5 Window of packets: Increased by 1

TCP Congestion Control: AIMD (Additive Increase Multiplicative Decrease) Every RTT increase your Window by 1 Pkt W = W +1 However if you receive a loss Cut your window by half: w = w/2 You aggressively decrease!! Cwnd RENO Probing

Side-effects TCP is fundamentally unfair Every things happens after an RTT Flows with smaller RTT outperform flows with larger RTT TCP is slow It increase one packet at a time Takes a while to reach capacity for links with large BW TCP is inefficient Devices have multiple paths (Data center, mobile) TCP only uses only path

Outline TCP Background MPTCP Design MPTCP Deployment issues

MPTCP Takes advantage of existence of multiple paths Examples: Data center network: as many as 4 paths exists Mobile networks: as many as 2 paths (3G, Wifi) Subflow 1 Subflow 2

MPTCP- Constraints Must be Fair to TCP: Must perform as well as a connection with same loss rate Increase the window of subflow on same path by 1/N, where N is number of subflows on a path. Perform at-least as well as TCP Must send traffic on the efficient path Send traffic on path proportion to the loss rate of path Send probe paths on poor paths to detect change in conditions Resilient to sub-path failure; If at-least one path exists then connection must persist The above solutions helps out here

Implementing MPTCP How do sender/receiver agree to use MPTCP? How do you start new subflows? How do you ensure flow-control and reliable delivery? Sequence numbers and ACKs How do you end the connection?

How do you Extend TCP? TCP header Ten mandatory fields Optional extension field (usually during handshake) How should Options be treated? If Unknown options Ignored by receiving Host/Routers At Router packets should not be changed 18

How do you Extend TCP? TCP header Ten mandatory fields Optional extension field (usually during handshake) How should Options be treated? If Unknown options Ignored by receiving Host/Routers At Router packets should not be changed 20

Negotiating MPTCP Ideal: Use TCP Options Problem: Network Middleboxes MB: strip all TCP options from 10% of paths MB: strip TCP options on SYN/ACK for 5% of paths Solution: Fall back to normal TCP if options are stripped If options are only stripped on SYN/ACK the problematic: Receiver thinks MPTCP Sender think fallback to TCP Receiver should keep sending MPTCP options on subsequent ACKs

TCP Revisited TCP 3-way handshake Hello: I use MPTCP SYN-Flag Hello: I too use SYN/ACK-Flag MPTCP ACK-Flag Let s talk: in MPTCP

Negotiating MPTCP Ideal: Use TCP Options Problem: Network Middleboxes MB: strip all TCP options from 10% of paths MB: strip TCP options on SYN/ACK for 5% of paths Solution: Fall back to normal TCP if options are stripped If options are only stripped on SYN/ACK the problematic: Receiver thinks MPTCP Sender think fallback to TCP Receiver should keep sending MPTCP options on subsequent ACKs

TCP Revisited TCP 3-way handshake Hello: I use MPTCP SYN-Flag SYN/ACK-Flag ACK-Flag

TCP Revisited TCP 3-way handshake Hello: SYN-Flag SYN/ACK-Flag ACK-Flag

TCP Revisited TCP 3-way handshake SYN-Flag SYN/ACK-Flag Hello: ACK-Flag

TCP Revisited TCP 3-way handshake SYN-Flag Hello: SYN/ACK-Flag ACK-Flag

TCP Revisited TCP 3-way handshake SYN-Flag SYN/ACK-Flag ACK-Flag Let s talk

Negotiating MPTCP Ideal: Use TCP Options Problem: Network Middleboxes MB: strip all TCP options from 10% of paths MB: strip TCP options on SYN/ACK for 5% of paths Solution: Fall back to normal TCP if options are stripped If options are only stripped on SYN/ACK the problematic: Receiver thinks MPTCP Sender think fallback to TCP Receiver should keep sending MPTCP options on subsequent ACKs

TCP Revisited TCP 3-way handshake Hello: I use MPTCP SYN-Flag Hello: I use MPTCP SYN/ACK-Flag ACK-Flag

TCP Revisited TCP 3-way handshake SYN-Flag SYN/ACK-Flag Hello: I Use MPTCP ACK-Flag

TCP Revisited TCP 3-way handshake SYN-Flag Hello: SYN/ACK-Flag Hello: I Use MPTCP ACK-Flag

TCP Revisited TCP 3-way handshake SYN-Flag Hello: SYN/ACK-Flag ACK-Flag Let s talk I m expecting MPTCP What Happened???

Negotiating MPTCP Ideal: Use TCP Options Problem: Network Middleboxes MB: strip all TCP options from 10% of paths MB: strip TCP options on SYN/ACK for 5% of paths Solution: Fall back to normal TCP if options are stripped If options are only stripped on SYN/ACK the problematic: Receiver thinks MPTCP Sender think fallback to TCP Receiver should keep sending MPTCP options on subsequent ACKs

Implementing MPTCP How do sender/receiver agree to use MPTCP? How do you start new subflows? How do you ensure flow-control and reliable delivery? Sequence numbers and ACKs How do you end the connection?

Starting New Subflows Ideal: Open new connection and send packets All you need is a different IP address Use same sequence numbers for all connections! allow MPTCP to reuse TCP s congestion control Implication: New connection has no TCP-Handshake Each connection will have gap in sequence numbers Subflow 1 Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other Subflow MB: rewrite 2 beginning seq # to add more random-ness

How do you Start New Subflows? Ideal: Open new connection and send packets All you need is a different IP address Use same sequence numbers for all connections! allow MPTCP to reuse TCP s congestion control Implication: New connection has no TCP-Handshake Each connection will have gap in sequence numbers Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more random-ness

Middleboxes Attack Again! Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more randomness Subflow 1 If no handshake. Then drop Subflow 2

Middleboxes Attack Again! Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more randomness Each subflow starts with TCP-Handshake Change IP address If no handshake. Then drop Subflow 1 NAT Subflow 2

Middleboxes Attack Again! Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more randomness Each subflow starts with TCP-Handshake Change IP address If no handshake. Then drop Subflow 1 NAT Subflow 2

Middleboxes Attack Again! Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Handshake carries two keys: Key-1: allows the receiver to map sub-flow to original Other connections MB: rewrite beginning seq # to add more randomness Each subflow starts with TCP-Handshake Change IP address If no handshake. Then drop Subflow 1 NAT Subflow 2

Middleboxes Attack Again! Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more randomness Subflow 1 I m just evil! Subflow 2

A Regular TCP Stream 4 3 2 1 The same stream split across subflows 6 3 Subflow 1 1 I m just evil! 5 Subflow 2 4 2

Middleboxes Attack Again! Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more randomness Each subflow has unique seq # Change IP address I m just evil! Subflow 1 NAT Subflow 2

The same stream split across subflows 6 3 Subflow 1 1 I m just evil! 5 Subflow 2 4 2 3 2 Subflow 1 1 I m just evil! 4 Subflow 2 3 2

But We still Want to use TCP s Connection Control At the receiver need a way to convert from From: Subflow sequence # Into: flow sequence # 3 2 Subflow 1 1 I m just evil! 4 Subflow 2 3 A Regular TCP Stream 4 3 2 1

But We still Want to use TCP s Connection Control At the receiver need a way to convert from From: Subflow sequence # Into: flow sequence # Each subflow has unique seq # But also carries, as TCP Options, offset to original seq # I m just evil! So 3 Seq # 2can be 1 contiguous Subflow 1 4 Subflow 2 3 A Regular TCP Stream 4 3 2 1

Actual Attacks Can Use the Random Sequence There are Real bad people in the network!! Start new subflows with random sequence # Need a mechanism to validate new subflows Add a random key during start-up Each subflow uses this a token created form this key Subflow 1 Subflow 2 Subflow 3

Middleboxes Attack Again! There are Real bad people in the network!! Start new subflows with random sequence # Each subflow starts with TCP-Handshake Handshake carries two keys: Key-1: allows the receiver to map sub-flow to original Need a mechanism to validate new subflows Add connections a random key during start-up Each Key-2: prevents subflow hackers uses this from a hijacking token the created form this key connection Subflow 1 Subflow 2 Subflow 3

Problems with Starting New Subflows? Ideal: Open new connection and send packets All you need is a different IP address Use same sequence numbers for all connections! allow MPTCP to reuse TCP s congestion control Implication: New connection has no TCP-Handshake Each connection will have gap in sequence numbers Problem: Middleboxes NAT/FW: If no TCP-Handshake, connection is dropped Other MB: if gap in sequence number connection is dropped Other MB: rewrite beginning seq # to add more random-ness Attackers: can new malicious new subflows

MPTCP s Solutions Each subflow starts with TCP-Handshake Handshake carries two keys: Key-1: allows the receiver to map sub-flow to original connections Key-2: prevents hackers from hijacking the connection Each subflow has unique seq # But also carries, as TCP Options, offset to original seq # So Seq # can be contiguous If MB rewrites seq # The offset helps to map back to original TCP

Implementing MPTCP How do sender/receiver agree to use MPTCP? How do you start new subflows? How do you ensure flow-control and reliable delivery? Sequence numbers and ACKs How do you end the connection?

Ending a Flow Traditionally Two ways to end a connection: RST Flag: End connection because of error FIN Flag: End connection! all packets send RST on a subflow! subflow error Other subflows continue FIN on subflow! confusing!!! Is flow finished? Or just subflow? Need to be careful with FIN, if FIN is sent but subflow packets are lost and need to be resent then the connection is in trouble

Ending a Flow Traditionally Two ways to end a connection: RST Flag: End connection because of error FIN Flag: End connection! all packets send RST on a subflow! subflow error Other subflows continue FIN on subflow! confusing!!! Is flow finished? Or just subflow? Need to be careful with FIN, if FIN is sent but subflow packets are lost and need to be resent then the connection is in trouble

Ending a Flow Each subflow Sends FIN as a TCP option After all subflow send FIN Then send FIN as TCP Flag

Outline TCP Background MPTCP Design MPTCP Deployment issues

Keeping the Same Socket API Backwards compatibility with existing apps Present the same socket API and expectations Establish the TCP connection in the same way Create a socket to a single remote IP address/port and then add more subflows to the connection Work in all scenarios where regular TCP works If a subflow fails, the connection should continue as long as some other subflow has connectivity 58

MPTCP in the Network Stack From http://queue.acm.org/detail.cfm?id=2591369 59

Receive Buffer Space Each TCP connection has a receive buffer Buffer space to store incoming data until it is read by the application TCP flow control Receiver advertises the available buffer space using the receive window Should each subflow have its own receive window? Starvation of some subflows in a connection? Fairness relative to other TCP connections? Fragmentation of the available buffer space? Instead, use a common receive window 60

Insights Drawbacks of Normal TCP (TCP Reno) Slow to determine N/W capacity Unfair on the level of RTT Ties congestion control to loss rate rather than RTT Doesn t take advantage of multiple paths Create Subflow for multiple paths Middleboxes make it hard to modify TCP Lots of built in assumptions about TCP