TCP over Constrained-Node Networks draft-gomez-lwig-tcp-constrained- node-networks-01 Carles Gomez Universitat Politècnica de Catalunya (UPC)/Fundació i2cat carlesgo@entel.upc.edu Jon Crowcroft University of Cambridge Jon.Crowcroft@cl.cam.ac.uk IETF 97 – Seoul, November 2016
Status draft-gomez-core-tcp-constrained- node-networks-00 Presented in Berlin (LWIG and TCPM WGs) draft-gomez-lwig-tcp-constrained- node-networks-00 Not modified draft-gomez-lwig-tcp-constrained- node-networks-01 Several updates
Motivation Several application layer protocols being used for the Internet of Things (IoT) Constrained Application Protocol (CoAP) Originally over UDP CoAP over TCP in progress To overcome middlebox problems HTTP/2 and HTTP/1.1 XMPP MQTT TCP is being / will be used in many IoT scenarios Offer simple measures for suitable TCP implementation/operation over CNNs TCP
Updates in -01 (I/X) RFC 2119 language removed 1. Introduction Purpose is to document how TCP can be used in CNNs (i.e. not proposing a new TCP variant) 1. Introduction XMPP added to the list of protocols used in CNNs that use TCP 2. Characteristics of CNNs relevant for TCP Often, low transmission rates (typically < 1 Mbit/s)
Updates in -01 (II/X) 3. Scenario Asymmetric Resource availability Constrained devices: data sent > data received Majority of constrained devices will be sensors
Updates in -01 (III/X) 4.1. TCP connection initiation Typically initiated by the constrained device Better support sleep periods in some RDC techniques 4.2. Maximum Segment Size If a link layer offers MTU > 1280 bytes, still set MSS so that IPv6 datagram size ≤ 1280 bytes Avoid issues with Internet links with not as high MTU
Updates in -01 (IV/X) 4.3. Window Size 4.4. RTO Recommends single-MSS window Receive and transmit If device can afford it, 5-MSS window may be useful Allow Fast Retransmit and Fast Recovery 4.4. RTO draft-ietf-core-cocoa outperforms RFC 6298 RTO-based improvements (Peak Hopper, Linux RTO) TBD: how to proceed? Using CoCoA for TCP conflicts with RFC 6298 and Karn algorithm...
Updates in -01 (V/X) 4.5. TCP connection lifetime Long TCP connection lifetime Minimize overhead However, firewalls may delete filter state records early TCP keep-alives not useful to solve the issue Short TCP connection lifetime TCP Fast Open (TFO) - RFC 7413 Data carried in SYN or SYN-ACK segments Cookie must be obtained, included in SYNs and refreshed More efficient than frequently opening new TCP connections (with traditional 3WHS) As long as cookie refresh rate well below new connection rate
Updates in -01 (VI/X) 4.7. TCP options For single-MSS receive/transmit window Not supporting, and ignoring if received Window Scale TCP timestamps SACK, SACK-Permitted For less constrained devices SACK avoids unnecessary retries, and reduces latency, bandwidth and energy consumption
Updates in -01 (VII/X) 4.8. Delayed Acknowledgments Device advertising single-MSS receive window needs to avoid supporting delayed ACKs Avoid contributing up to 500 ms extra delay to the RTT Not recommended in CNNs Since traffic mostly of transactional type Transaction size often < MSS Could be useful to reduce # of ACKs in bulk transfers Infrequent, compared to rest of transactions 5. Security considerations If TFO used, security considerations of RFC 7413 apply
Updates in -01 (VIII/X) Annex: TCP implementations for constrained devices uIP TCP/IP stack for 8- and 16-bit CPUs Code size ~5 kB (checksumming, IP, ICMP and TCP) Global, single-packet sized buffer for incoming packets No buffer for outgoing data MSS not modified during a connection Stop-and-wait Avoids sliding window operations (32-bit arithmetic, expensive on 8-bit CPUs)
Updates in -01 (IX/X) Annex: TCP implementations for constrained devices lwIP TCP/IP stack for 8- and 16-bit CPUs Code size: ~14 kB to ~22 kB Memory management, checksumming, network interfaces, IP, ICMP and TCP TCP code size: ~9 kB to ~14 kB Buffering of incoming and outgoing data Applications decoupled from the network stack Transmission window greater than a single segment Slow start, congestion avoidance, fast retransmit, fast recovery SACK and Window Scale not implemented
Updates in -01 (X/X) Annex: TCP implementations for constrained devices RIOT TBD
WG adoption ? IETF 97 – Seoul, November 2016