COS 561: Advanced Computer Networks

Slides:



Advertisements
Similar presentations
TCP--Revisited. Background How to effectively share the network? – Goal: Fairness and vague notion of equality Ideal: If N connections, each should get.
Advertisements

Jennifer Rexford Fall 2014 (TTh 3:00-4:20 in CS 105) COS 561: Advanced Computer Networks Multipath.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transmission Control Protocol (TCP)
IS333, Ch. 26: TCP Victor Norman Calvin College 1.
TDTS21 Advanced Networking
Fundamentals of Computer Networks ECE 478/578 Lecture #20: Transmission Control Protocol Instructor: Loukas Lazos Dept of Electrical and Computer Engineering.
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
UDP & TCP Where would we be without them!. UDP User Datagram Protocol.
1 TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
1 CS 4396 Computer Networks Lab Transmission Control Protocol (TCP) Part I.
1 Chapter 3 TCP and IP. Chapter 3 TCP and IP 2 Introduction Transmission Control Protocol (TCP) Transmission Control Protocol (TCP) User Datagram Protocol.
BZUPAGES.COM 1 User Datagram Protocol - UDP RFC 768, Protocol 17 Provides unreliable, connectionless on top of IP Minimal overhead, high performance –No.
Transport Layer – TCP (Part1) Dr. Sanjay P. Ahuja, Ph.D. Fidelity National Financial Distinguished Professor of CIS School of Computing, UNF.
Chapter 7 – Transport Layer Protocols
CSEE W4140 Networking Laboratory Lecture 6: TCP and UDP Jong Yul Kim
CSCE 515: Computer Network Programming TCP Details Wenyuan Xu Department of Computer Science and Engineering.
EEC-484/584 Computer Networks Lecture 13 Wenbing Zhao (Part of the slides are based on Drs. Kurose & Ross ’ s slides for their Computer.
TCP. Learning objectives Reliable Transport in TCP TCP flow and Congestion Control.
Transport Layer TCP and UDP IS250 Spring 2010
Gursharan Singh Tatla Transport Layer 16-May
Module A Panko and Panko Business Data Networks and Security, 9 th Edition © 2013 Pearson.
TCP : Transmission Control Protocol Computer Network System Sirak Kaewjamnong.
TCP Lecture 13 November 13, TCP Background Transmission Control Protocol (TCP) TCP provides much of the functionality that IP lacks: reliable service.
CS332, Ch. 26: TCP Victor Norman Calvin College 1.
TCP1 Transmission Control Protocol (TCP). TCP2 Outline Transmission Control Protocol.
Transmission Control Protocol
More on TCP Acknowledgements Sequence Number Field Initial Sequence Number Acknowledgement Number Field.
Multipath TCP ACM Queue, Volume 12 Issue 2, pp. 1-12, February 2014 Christoph Paasch and Olivier Bonaventure University College London 1.
© Jörg Liebeherr (modified by Malathi Veeraraghavan) 1 Overview Formats, Data Transfer, etc. Connection Management.
Transport Protocols.
TCP/IP1 Address Resolution Protocol Internet uses IP address to recognize a computer. But IP address needs to be translated to physical address (NIC).
1 Three ways to (ab)use Multipath Congestion Control Costin Raiciu University Politehnica of Bucharest.
11 CS716 Advanced Computer Networks By Dr. Amir Qayyum.
Computer Networks 1000-Transport layer, TCP Gergely Windisch v spring.
1 TCP ProtocolsLayer name DNSApplication TCP, UDPTransport IPInternet (Network ) WiFi, Ethernet Link (Physical)
3. END-TO-END PROTOCOLS (PART 1) Rocky K. C. Chang Department of Computing The Hong Kong Polytechnic University 22 March
Advanced Computer Networks
Distributed Systems 11. Transport Layer
Introduction to TCP/IP networking
By, Nirnimesh Ghose, Master of Science,
Internet Networking recitation #9
COMP2322 Lab 6 TCP Steven Lee Mar 29, 2017.
Introduction to Networking Recital 4
5. End-to-end protocols (part 1)
Chapter 17 and 18: TCP is connection oriented
Process-to-Process Delivery, TCP and UDP protocols
Long-haul Transport Protocols
TCP.
Process-to-Process Delivery
TCP.
Net 221D : Computer Networks Fundamentals
TCP.
Multipath TCP Yifan Peng Oct 11, 2012
Introduction of Transport Protocols
TCP - Part I Karim El Defrawy
Multi-addressed Multipath TCP
CSCI-1680 Transport Layer I
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Layer Jennifer Rexford COS 461: Computer Networks
Internet Networking recitation #10
PART 5 Transport Layer.
TCP - Part I Relates to Lab 5. First module on TCP which covers packet format, data transfer, and connection management.
Transport Protocols: TCP Segments, Flow control and Connection Setup
Chapter 5 Transport Layer Introduction
Introduction to Computer Networks
Transport Protocols: TCP Segments, Flow control and Connection Setup
Transport Layer 9/22/2019.
TCP Connection Management
Presentation transcript:

COS 561: Advanced Computer Networks Multipath TCP Jennifer Rexford Fall 2017 (TTh 1:30-2:50 in CS 105) COS 561: Advanced Computer Networks http://www.cs.princeton.edu/courses/archive/fall17/cos561/

Multipath Mobile user High-end servers Data centers WiFi and cellular at the same time High-end servers Multiple Ethernet cards Data centers Rich topologies with many paths Benefits of multipath Higher throughput Failover from one path to another Seamless mobility

Multipath TCP Protocol

Working With Unmodified Apps Present the same socket API and expectations Identified by the “five tuple” (IP address, port #, protocol) From http://queue.acm.org/detail.cfm?id=2591369

Working With Unmodified Hosts Establish the TCP connection in the normal way Create a socket to a single remote IP address/port And then add more subflows, if possible A B SYN SYN ACK Each host tells its Initial Sequence Number (ISN) to the other host. ACK Data Data

Negotiating MPTCP Capability How do hosts know they both speak MPTCP? During the 3-way SYN/SYN-ACK/ACK handshake If SYN-ACK doesn’t contain MP_CAPABLE Don’t try to add any subflows!

Adding Subflows, Idealized How to associate a new subflow with the connection? Use a token generated from original subflow set-up How to start using the new subflow? Simply start sending packets with new IP/port pairs … and associate them with the existing connection How could two end-points learn about extra IP addresses for establishing new subflows? Implicitly: one end-point establishes a new subflow, to already-known address(es) at the other end-point

Sequence Numbers Challenges across subflows Out-of-order packets due to RTT differences Access networks that rewrite sequence numbers Middleboxes upset by discontinuous TCP byte stream Need to retransmit lost packets on a different subflow Two levels of sequence numbers Sequence numbers per subflow Sequence numbers for the entire connection Enables Efficient detection of loss on each subflow Retransmission of lost packet on a different subflow

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

Fairness and Efficiency in Multipath Congestion Control Slides from Damon Wischik

Goal #1: Fairness at Shared Bottlenecks To be fair, Multipath TCP should take as much capacity as TCP at a bottleneck link, no matter how many paths it is using. A multipath TCP flow with two subflows Regular TCP This is the very first thing that comes to mind with multipath TCP, and it’s something that many other people have solved in different ways. This is just a warm-up... Design Goal 3 is a much “richer” generalization of this goal, which accommodates different topologies, different RTTs. So there’s no point giving an evaluation here.

Goal #2: Use Efficient Paths 12Mb/s 12Mb/s 12Mb/s Each flow has a choice of a 1-hop and a 2-hop path. How should split its traffic? I’m thinking of the paths as given. MPTCP has the choice of how to split its traffic over those given paths.

Use Efficient Paths If each flow split its traffic 1:1 ... 12Mb/s

Use Efficient Paths If each flow split its traffic 2:1 ... 12Mb/s

Use Efficient Paths 12Mb/s 12Mb/s Better: Each connection on a one-hop path Each connection should send all traffic on the least-congested paths 12Mb/s 12Mb/s 12Mb/s 12Mb/s

Use Efficient Paths Better: Each connection on a one-hop path Each connection should send all traffic on the least-congested paths But keep some traffic on the alternate paths as a probe 12Mb/s 12Mb/s 12Mb/s 12Mb/s 12Mb/s 12Mb/s

Goal #3: Be Fair Compared to TCP Least-congested paths may not be best! Due to differences in round-trip time Two paths WiFi: high loss, low RTT Cellular: low loss, high RTT Using the least-congested path Choose the cellular path, due to low loss But, the RTT is high So throughput is low!

Be Fair Compared to TCP To be fair, Multipath TCP should give a connection at least as much throughput as it would get with a single-path TCP on the best of its paths. Ensure incentive for deploying MPTCP A Multipath TCP should take no more capacity on any path (or collection of paths) than if it was a single-path TCP flow using the best of those paths. Do no harm!

Achieving These Goals Regular TCP MPTCP Maintain a congestion window w On an ACK, increase by 1/w (increase 1 per window) On a loss, decrease by w/2 MPTCP Maintain a congestion window per path wr On an ACK on path r, increase wr On a loss on path r, decrease by wr/2 How much to increase wr on an ACK?? If r is the only path at that bottleneck, increase by 1/wr

If Multiple Paths Share Bottleneck? Don’t take any more bandwidth on a link than the best of the TCP paths would But, where might the bottlenecks be? Multiple paths might share the same bottleneck So, consider all possible subsets of the paths Set R of paths Subset S of R that includes path r E.g., consider path 3 Suppose paths 1, 3, and 4 share a bottleneck … but, path 2 does not Then, we care about S = {1,3,4}

Achieving These Goals What is the best of these subflows achieving? Path s is achieving throughput of ws/RTTs So best path is getting maxs(ws/RTTs) What total bandwidth are these subflows getting? Across all subflows sharing that bottleneck Sum over s in S of ws/RTTs Consider the ratio of the two Increase by less if many subflows are sharing And pick the results for the set S with min ratio To account for the most paths sharing a bottleneck

Incremental Deployment Challenges of Middleboxes

Middleboxes In-network services, e.g., Interaction with TCP Firewall Network address translator Transparent proxy Intrusion detection system Interaction with TCP Change IP addresses and port numbers Change TCP initial sequence number Remove TCP options Dividing large block of data into smaller packets Expect to see all packets of the connection Etc.

Negotiating MPTCP Capability What if middleboxes strip the TCP option? On the SYN? On the SYN-ACK? Include capability on the ACK of the SYN-ACK? What if the ACK is lost? Carry on all subsequent packets What if the middlebox drops SYN packets with unfamiliar options? Sender can retransmit lost SYN without the option … and fall back to regular TCP behavior

Challenges: NAT Network Address Translators (NAT) NAT1 Problem: NAT changes the IP address and port number How to identify a connection? Using a token established during connection set-up How to establish new subflows? Allow one end-point to tell another about its addresses WiFi NAT1 NAT2 LTE

Challenges: Security Security How to bootstrap security? Malicious parties creating subflows To highjack (part of) the connection How to bootstrap security? Include a random key during connection set-up … and use it to verify authenticity of new subflows How to identify the connection on new subflows? A token generated from the key How to authenticate the addition of subflows? Exchanging nonces and computing message authentication codes using the keys

Use of Multipath TCP in iOS 7 Multipath TCP in iOS 7 (fall 2013) Primary TCP connection over WiFi Backup TCP connection over cellular data Failover If WiFi becomes unavailable… … iOS 7 will use the cellular data connection For destinations controlled by Apple E.g., Siri See https://support.apple.com/en-us/HT201373

Discussion

Backup Slides: Review of TCP Protocol

Establishing a TCP Connection SYN SYN ACK Each host tells its Initial Sequence Number (ISN) to the other host. ACK Data Data Three-way handshake to establish connection Host A sends a SYN (open) to the host B Host B returns a SYN acknowledgment (SYN ACK) Host A sends an ACK to acknowledge the SYN ACK

Initial Sequence Number (ISN) Sequence number for the very first byte E.g., Why not a de facto ISN of 0? Practical issue: reuse of port numbers Port numbers must (eventually) get used again … and an old packet may still be in flight … and associated with the new connection Security issue: adversary injecting packets Adversary may try to inject packets in a connection … by guessing the Initial Sequence Number … to send counterfeit packets to the receiving host … e.g., counterfeit packets that reset the connection Some firewalls change the ISN to further randomize

Step 1: A’s Initial SYN Packet A’s port B’s port A’s Initial Sequence Number Flags: SYN FIN RST PSH URG ACK Acknowledgment 20 Flags Advertised window Checksum Urgent pointer Options (variable) A tells B it wants to open a connection…

Step 2: B’s SYN-ACK Packet B’s port A’s port B’s Initial Sequence Number Flags: SYN FIN RST PSH URG ACK A’s ISN plus 1 20 Flags Advertised window Checksum Urgent pointer Options (variable) B tells A it accepts, and is ready to hear the next byte… … upon receiving this packet, A can start sending data

Step 3: A’s ACK of the SYN-ACK A’s port B’s port Sequence number Flags: SYN FIN RST PSH URG ACK B’s ISN plus 1 20 Flags Advertised window Checksum Urgent pointer Options (variable) A tells B it is okay to start sending … upon receiving this packet, B can start sending data

Sequence number = 1st byte Host A ISN (initial sequence number) Byte 81 Sequence number = 1st byte TCP Data TCP Data Host B

TCP Header Data Source port Destination port Sequence number Flags: SYN FIN RST PSH URG ACK Acknowledgment HdrLen Flags Advertised window Checksum Urgent pointer Options (variable) Data

Receive Buffering: Flow Control Receive window size Amount that can be sent without acknowledgment Receiver must be able to store this amount of data Receiver tells the sender the window Tells the sender the amount of free space left Window Size Data ACK’d Outstanding Un-ack’d data Data OK to send Data not OK to send yet

TCP Header: Receive Window Source port Destination port Sequence number Flags: SYN FIN RST PSH URG ACK Acknowledgment HdrLen Flags Advertised window Checksum Urgent pointer Options (variable) Data

Tearing Down the Connection B ACK SYN SYN ACK Data ACK FIN ACK FIN ACK A time Closing (each end of) the connection Finish (FIN) to close and receive remaining bytes And other host sends a FIN ACK to acknowledge Reset (RST) to close and not receive remaining bytes

Extending TCP: TCP Options TCP header Ten mandatory fields Optional extension field (usually during handshake) Examples Maximum segment size (MSS) Window scaling Support for Selected ACKs Unknown options Ignored by receiving host Routers and TCP options Should ignore them, passing them through unchanged But, some middleboxes: (i) strip TCP options from some packets or (ii) drop packets with TCP options