Multipath TCP by vef11fF0

VIEWS: 103 PAGES: 62

									       Multipath TCP
Protocol Overview and Standards

             Costin Raiciu
    Department of Computer Science
    University Politehnica of Bucharest
TCP is the main transport protocol on the
Internet
   Defined in RFC 793 and used by many apps
     Web

     Email

     Remote login

     Chat

     Video streaming

     Peer-to-peer



   TCP provides two functions: reliable delivery and
    congestion control.
TCP: How do we use it?
   You open your browser and type www.google.com
   The browser figures out the IP address using DNS
      Creates a TCP connection to IP on port 80

      Writes request (GET INDEX.HTML)

      Reads reply (HTML page)

   The server:
      Wait for connections

      Reads requests

      Writes web-pages
TCP Connection Setup


                           HTTP server
                       listening on port 80
TCP Connection Setup


          SYN
     DPORT 80 SPORT
         12572
TCP Connection Setup


                          SYN/ACK
                       DPORT 80 SPORT
                           12572
TCP Connection Setup


          ACK
     DPORT 80 SPORT
         12572
TCP Service:
reliable, in order, byte stream delivery

   Apps send any numbers of bytes
      Say 100.000B

   TCP split bytes into segments
      Because network works with limited-size

       packets
   Sends them over the network
      Segments can be lost/reordered

   TCP receiver MUST read data in order
 TCP Data Transmission




Browser: Send 3KB of data   HTTP Server:
                            Read Request
 TCP Data Transmission


          Data: 0-1000




Browser: Send 3KB of data   HTTP Server:
                            Read Request
 TCP Data Transmission


          Data: 1000-
                            Data: 0-1000
             2000




Browser: Send 3KB of data                  HTTP Server:
                                           Read Request
 TCP Data Transmission


       Data: 2001-    Data: 1001-
                                    Data: 1-1000
          3000           2000




Browser: Send 3KB of data                   HTTP Server:
                                            Read Request
 TCP Data Transmission: Lost Packets



      Data: 2001-
                            Data: 1-1000
         3000




Browser: Send 3KB of data            HTTP Server:
                                     Read Request
 TCP Data Transmission: Reordering


       Data: 1001-    Data: 2001-
                                    Data: 1-1000
          2000           3000




Browser: Send 3KB of data                  HTTP Server:
                                           Read Request
 TCP Data Transmission:
 Sequence Numbers and ACKs

SEQ    Data: 2001-   SEQ    Data: 1001-   SEQ
2001                 1001                  1    Data: 1-1000
          3000                 2000




Browser: Send 3KB of data                           HTTP Server:
                                                    Read Request
 TCP Data Transmission:
 Sequence Numbers and ACKs

               SEQ    Data: 2001-   SEQ    Data: 1001-
               2001      3000       1001      2000




                                    ACK 1001

Browser: Send 3KB of data                        HTTP Server:
                                                 Read Request
 TCP Data Transmission:
 Sequence Numbers and ACKs

                             SEQ    Data: 2001-
                             2001      3000




                  ACK 1001    ACK 2001

Browser: Send 3KB of data                   HTTP Server:
                                            Read Request
 TCP Data Transmission:
 Sequence Numbers and ACKs




            ACK 1001        ACK 2001   ACK 3001

Browser: Send 3KB of data                   HTTP Server:
                                            Read Request
TCP is stuck with using the path given it by
the routing system.

                                               there




     here




                                 Source: Bill Cheswick, Lumeta
The routing system is not aware of
congestion. TCP can’t choose a better
uncongested path.
                                             there




     here

                               link is very
                               congested


                               Source: Bill Cheswick, Lumeta
Mobility with TCP

                    3G celltower
Mobility with TCP

                    3G celltower
Mobility with TCP

                    3G celltower
Mobility with TCP

                            3G celltower




               Make Before Break
What is a good mobility strategy?

                             3G celltower
Redundancy is the only way to get reliability
greater than that of all the parts.

   If an Internet link fails, routing can switch to a
    different path.

   Routing is too slow to congverge.
     Can we use redundancy at the TCP level?

   Routing doesn’t know about congestion.
     Can we avoid congestion at the TCP level?
   Obvious answer:
Use more than one path
Smartphone


                       3G celltower




Mobile client
                                 Server

                Wifi
Multi-homed server

   Client            Stripe data from one
                     connection across both
                     paths.
                     We call these subflows.




                     Load balances between
                     access links
            Server
Sending simultaneously across more than
one path can provide robustness.
                            Client


If any path dies, can
detect it immediately and
switch all traffic to the
working path.




                            Server
Multipath TCP Primer [IETF MPTCP WG]

   MPTCP is a drop in replacement for TCP
     Works with unmodified applications

     Over the existing network
MPTCP Operation
MPTCP Operation
MPTCP Operation

                  STATE 1
                  CWND
                  Snd.SEQNO
                  Rcv.SEQNO
MPTCP Operation

                  STATE 1
                  CWND
                  Snd.SEQNO
                  Rcv.SEQNO
MPTCP Operation

                  STATE 1
                  CWND
                  Snd.SEQNO
                  Rcv.SEQNO
MPTCP Operation

                  STATE 1
                  CWND
                  Snd.SEQNO
                  Rcv.SEQNO




                  STATE 2
                  CWND
                  Snd.SEQNO
                  Rcv.SEQNO
MPTCP Operation
             options
                              STATE 1
      SEQ    DSEQ
    …      …           DATA   CWND
      1000   10000            Snd.SEQNO
                              Rcv.SEQNO




                              STATE 2
                              CWND
                              Snd.SEQNO
                              Rcv.SEQNO
MPTCP Operation
             options
                              STATE 1
      SEQ    DSEQ
    …      …           DATA   CWND
      1000   10000            Snd.SEQNO
                              Rcv.SEQNO




                              STATE 2
                              CWND
                              Snd.SEQNO
                              Rcv.SEQNO
MPTCP Operation
             options
                               STATE 1
      SEQ    DSEQ
    …      …            DATA   CWND
      1000   10000             Snd.SEQNO
                               Rcv.SEQNO




                               STATE 2
              options          CWND
                               Snd.SEQNO
       SEQ    DSEQ
     …      …           DATA   Rcv.SEQNO
       5000   11000
MPTCP Operation
             options
                               STATE 1
      SEQ    DSEQ
    …      …            DATA   CWND
      1000   10000             Snd.SEQNO
                               Rcv.SEQNO




                               STATE 2
              options          CWND
                               Snd.SEQNO
       SEQ    DSEQ
     …      …           DATA   Rcv.SEQNO
       5000   11000
MPTCP Operation
             options
                               STATE 1
      SEQ    DSEQ
    …      …            DATA   CWND
      1000   10000             Snd.SEQNO
                               Rcv.SEQNO




                               STATE 2
              options          CWND
                               Snd.SEQNO
       SEQ    DSEQ
     …      …           DATA   Rcv.SEQNO
       5000   11000
MPTCP Operation
             options
                               STATE 1
      SEQ    DSEQ
    …      …            DATA   CWND
      1000   10000             Snd.SEQNO
                               Rcv.SEQNO




                               STATE 2
              options          CWND
                               Snd.SEQNO
       SEQ    DSEQ
     …      …           DATA   Rcv.SEQNO
       5000   11000
MPTCP Operation

                             STATE 1
                    ACK
                  …      …   CWND
                    2000     Snd.SEQNO
                             Rcv.SEQNO




                             STATE 2
                             CWND
                             Snd.SEQNO
                             Rcv.SEQNO
MPTCP Operation
             options
                              STATE 1
      SEQ    DSEQ
    …      …           DATA   CWND
      2000   11000            Snd.SEQNO
                              Rcv.SEQNO




                              STATE 2
                              CWND
                              Snd.SEQNO
                              Rcv.SEQNO
So, why would you care?


   Google can multihome to different networks.
      Network outages have minimal effect.

   Your iPhone can use WiFi and 3G simultaneously.
      Sleep radios when unneeded for better battery
       life.
   Share your DSL and your neighbour’s Cable
    broadband.
   Very high reliability possible by using many paths.
Summary

   The Internet was designed to be cheap, general
    purpose, and inherently redundant.
      Hard to utilize the redundancy in practice.

   Not easy to make it dependable for today’s
    demanding applications.
      But we think we finally know how to utilize

       redundancy effectively.
What is a protocol?

   A set of rules that participants MUST obey
     Some rules they SHOULD obey

     Other rules they MAY obey

   Rules prescribe:
     Packet formats

     What the acceptable sequence of packets is

      (e.g. SYN/SYN-ACK/ACK)
Standardization
   Internet Engineering Task Force:
      A group of volunteers: anybody can go

      Meets three times per year

      Organized in area directorates, each with many

       working groups
        • Transport – tcpm, mptcp, etc.
        • Routing
        • Security
        • Applications
IETF Standards


   Protocols defined as Internet Drafts
      Written in plaintext format

      Anyone can submit an Internet Draft

   Standards are called Request for Comments
    (RFC)
      Even some keywords to use in RFC are

       standardized (RFC2119, RFC1208)
RFCs fully specify a protocol


   Implementations conforming to the spec will be
    able to interoperate
   The spec does not dictate how the functionality is
    implemented in the OS
      Implementers have (some) freedom
How do you standardize an Internet protocol?


   Phase 1
     Write an Internet-Draft describing your proposal

     Convince a bunch of people from the IETF this

      is interesting
     Make your I-D part of an existing working group

     Or create a new working group

        • Organize a Birds-of-a-Feather session (BOF)
How do you standardize an Internet protocol?


   Phase 2: In the working group (active)
     Present your draft

     Expect (a lot of) feedback from WG

     Incorporate feedback into draft or provise

      counter-arguments
     Iterate until all points raised are solved
How do you standardize an Internet protocol?


   Phase 3:
     The draft enters Working Group Last Call

     Then it is reviewed by the IESG

     Then passed to the RFC Editor

     Finally it is published
Congestion Control
Sending simultaneously across more than
one path can balance load and pool
resources.          [Kelly & Voice, Key, Massoulie & Towsley]

Each path runs its own
congestion control, to
detect and respond to
the congestion it sees.
                                      be less aggressive


But link the congestion               be more aggressive
control parameters, so
as to move traffic away
from the more congested
paths.
But we don’t want to be more aggressive than
a regular TCP when the bottleneck is
common to all our subflows.

Sometimes the
flows won’t take
                        a1          a1+ a2 = b
different paths. We
still need to be fair
                        a2
to competing traffic.

                                b
Linked increases algorithm


“Linked increases” algorithm:
    Each RTT, increase window wi by wi/wtotal.

    Each loss, decrease window wi by wi /2.
Linked-increases is not flappy



                          Same random loss
           Window         on both paths
           of
           subflow 2



                       Window
                       of
                       subflow 1
Linked increases does move congestion




  Window of
  more congested
  subflow




                             Window of
                             less congested
                             subflow
Fairness



Goal 1: Improve Throughput
  Do at least as well as a single-path flow on the best path.

Goal 2: Do no harm.
  Affect other flows no more than a single-path flow on their
     path.

Goal 3: Balance congestion
  Move the maximum amount of traffic off the more
     congested path
Fair “Linked increases” algorithm:



       Each RTT, increase window i by awi/wtotal.
       Each loss, decrease window i by wi /2.

   Linked increases itself moves traffic away from the
    congested path.
   a is the aggressiveness. It doesn’t change relative
    window sizes
      By tuning a, we can also improve throughput
       and do no harm

								
To top