# Performance of the Transport Layer Security Handshake Over 6 TiSCH
## 4 Insights: The (DTLS Handshake over 6 TiSCH
### Burst Traffic  
Section 2 shows how 6 TiSCH uses its SF to manage the available bandwidth on the link-layer by allocating and deleting slots in the TSCH schedule. It is also the responsibility of the SF to ensure that limited packet buffers used by the constrained endpoint do not overflow, which would lead to packet loss. 6 TiSCH defines a default MSF but allows developers to design their own SF. Of particular interest in our scenario is an SF that  
Figure 10: Measured buffer pressure on the constrained endpoint for different network configurations. The y-axis shows the number of packets in the queue. The x-axis shows the number of calls to the packet allocation function in OpenWSN.  
handles bursty network traffic. [PERSON] et al. [25] proposed a fully distributed SF that manages the TSCH schedule through a Proportional, Integral, and Derivative (PID) control algorithm. The authors show that their approach obtains promising results in case of sudden traffic surges.  
Alternatively, we could extend the 6P commands to build a virtual tunnel in the TSCH schedule. The tunnel would allow a burst of IEEE802.15.4 frames to traverse multiple hops quickly to the gateway. All 6P commands follow the same generic structure, defined in [13], containing 2 B of opaque metadata. The SF and not by the 6P protocol interprets these 2 B. We could use the opaque metadata to instruct the SF to forward the slot allocation request recursively to its parent until it reaches the root, see Figure 11. Similarly, a slot deletion request can recursively clean up the previously allocated slots.  
Besides the 6P protocol, a constrained device could use TCP's traffic congestion algorithms. However, the traditional congestion mechanisms--Additive Increase/Multiplicate Decrease (AIMD) and TCP slow start--are not well-suited for wireless networks. The congestion mechanism increases or decreases the size of the congestion window, which is typically up to 4 times the MSS [26]. Alternatively, RFC6928 [27] defines an experimental new value for the initial congestion window, which in practice results in an initial window of 10 times the MSS. The latter is nowadays used in many TCP implementations [16]. In case of bursty traffic like the TLS handshake, an initial small congestion window could limit the sending rate if a low enough MSS was negotiated and rapidly allow for more data in flight. [PERSON]'s algorithm, see Algorithm 1 can also help limit congestion by maximizing the efficiency of the buffer space on the constrained devices.  
The IETF draft on lightweight TCP [16] also mentions the use of the Explicit Congestion Control (ECN) bit in combination with TCP to limit network congestion. ECN allows a router (intermediate node) to signal a warning for looming congestion by setting a bit in the IP header of a packet, for example, when the internal buffer reaches 75% of its capacity. An ECN-enabled TCP receiver echoes back the congestion warning to the TCP sender by setting the ECN flag in its next acknowledgment. The sender then triggers congestion control measures as if a packet loss had occurred.  
Finally, the use of delayed acknowledgment packets can also help reduce congestion. TCP's delayed acknowledgments are meant to reduce the number of acknowledgment packets sent within a TCP connection, thereby reducing network overhead. However, it is well-known that delayed acknowledgments should not be used in combination with [PERSON]'s algorithm since this would impact network throughput.  
Figure 11: Slots are allocated in an interleaved, continuous manner to build a tunnel from the (D)TLS endpoint (C) over the intermediate hop (B) to the gateway (C).  
Congestion control is not available when using UDP, and DTLS does not incorporate any of the TCP congestion control mechanisms. DTLS can, however, still use the 6P tunnel-building mechanism described above. Alternatively, the Datagram Congestion Control Protocol (DCCP) [28] can carry DTLS messages. It provides congestion control for unreliable datagrams.