# Lightweight CoAP-Based Bootstrapping Service for the Internet of Things
## 4 Experimental Results
### Experimental Setup  
Figure 8 shows the testbed we have prepared for our performance evaluation. For the testbed we use the Coaja Network Simulator with Contiki OS in its version 2.7 [95]. The Smart Objects used for  
this testbed are the Zolertia Z1 with 92 kB of nominal ROM when compiled with 20-bit architecture support, and 8 kB of RAM. The compiler is _msp430-gcc version 4.7.2_.  
There is an entity in Cooja, the _RPL border router_, that enables the communication between the Cooja Network and the outside physical network where the Controller is located. Between the border router and the Smart Object there can be 1 hop (direct link), or other smart objects between the Controller and the Smart Object performing the bootstrapping. The idea of having several hops is to observe the behavior of the bootstrapping time when intermediate Smart Objects are acting as IP-forwards.  
For the tests, we used a 4-byte length Token in CoAP-EAP, which provides a 32-bit for the session identifier, as in the case of PANA. Following the recommendations in [96], we have performed the simulations in Cooja with a randomly generated seed to automate the process of running the simulations. We have used the default parameters in Contiki for the MAC layer and RDC. In particular, the parameters for the simulation includes the _contikimac_driver_ for RDC and _csma_driver_ for CSMA with default values. Due to the length of the PANA messages, we have had to set the parameter UIP_CONF_BUFFER_SIZE to 250 in the Contiki OS so that PANATIKI works correctly (otherwise no PANA authentication was completed). The same parameter is kept in CoAP-EAP for fair comparison.  
In term of the software packages, on the one hand, we have used the PANA agent (PAA) implementation of OpenPANA [97] for the Controller in PANATIKI [98]. With the purpose of making a fair comparison, we have implemented the Controller-side of our CoAP-EAP bootstrapping service using the same PAA implementation but replacing PANA with our CoAP-based EAP lower-layer source code. To develop this new EAP lower-layer, we used _cantcoap_[99] as CoAP library. Although we tested several CoAP libraries: libcoap [100], erbium [101] and cantcoap, we decided to go for cantcoap for its simplicity, which gave us greater control over the implementation.  
On the other hand, PANATIKI is used to implement the PANA client (PaC) in the smart objects for PANA-based solutions. In CoAP-EAP, we have transformed _cantcoap_ from C++ to C version for the compilation in Contiki OS. The same EAP peer state machine of PANATIKI is used in CoAP-EAP. Finally, we have used freeradius [102] version 2.0.2 for the role of AAA Server. The Cooja Simulator, Controller and the AAA Server run in a computer with the specifications shown in Table 1.  
For CoAP-EAP and PANATIKI, the EAP method used to obtain experimental results is EAP-PSK due to its lightweight nature. The EAP-PSK keys used are 16 bytes long and the EAP identity is 6 bytes long. The implementation of EAP-PSK is common in both cases. In the EAP peer side, EAP-PSK implementation is the one provided in PANATIKI. On the EAP server side, the EAP-PSK implementation is that in freeradius 2.0.2.  
Figure 8: Testbed for the evaluation.