## 4 Simulations and Results
### Results  
Firstly the latency in the process of assigning addresses. Figures 11 and 12 show the evolution of the latency value depending on the nodes number in the network. Figure 11 shows the values using IPv4 addresses from class C, _i.e._, with 254 available addresses. Figure 12 uses IPv4 addresses from Class B, providing 65534 addresses. Figure 11 shows that the increase in time address allocation begins to grow more quickly from the 125 nodes. However, using addresses from class B (Figure 12), the time experiences a very slight growth up to 1,600 nodes which were simulated. These results indicate that the parameter that further determines the latency is the percentage of occupied addresses. When this percentage is nearly 50% the node number that do not have addresses to offer increases in direct proportion way. This does not allow a local assignment to be done and it is necessary to request the address from another node, increasing the time needed to complete the process. Anyway the average latency in the address assignment process is low. Against auto-configuration protocols based on auto duplicate address detection (DAD), the protocol D2 HCP also presents a great reduction in the overhead of control packets in the network. In fact, in most cases, the configuration is performed locally, _i.e._, a neighbor will assign address to the new node. This involves the sending of four control packets which do not spread to the rest of the network. In the case where no local address may be assigned, a _unicast_ transmission is performed with \begin{table}
\begin{tabular}{l l} \hline
**Parameter** & **Value** \\ \hline Simulation Area & 1,500 m \(\times\)1,500 m \\ Mobile Node Number & 50 to 1,600 \\ Mobility Pattern & Random Waypoint (_setdest_) \\ Routing Protocol & OLSR \\ Node Range or Coverage & 125 m \\ Simulation Number & 10 \\ Simulation Area & 1,500 m \(\times\)1,500 m \\ \hline \end{tabular}
\end{table} 
Table 1: Simulation Parameters. the chosen server, which causes much less overhead than a _broadcast_ sending. The probability that cannot be assigned addresses locally depends on the relationship between the node number in the network and the available address number. In Figure 13 we can see the average number of control packets involved in each address configuration process. In the simulations have been used IP addresses from Class C, thus we have 254 network addresses. In Figure 13, you can see that when there are few nodes in the network, the required control message number to carry out auto-configuration is near the minimum, since in most cases the configuration can be performed locally. However, when the free address number is close to 0, no configuration can be performed locally and remote nodes must use to perform such configuration, increasing the sent message number. Figure 11: Latency in the IPv4 address assignment of a network from Class C.  
Figure 12: Latency in the IPv4 address assignment of a network from Class B. Figure 14 shows the evolution of the necessary control message number to assign an address based on the request number per second. In the case of the pink line the simulation was carried out in a scenario with 250 nodes. In the case of the blue line a scenario with similar characteristics has been used, but with 225 nodes. The used frequency of node departures in the network is similar to the frequency of node joins to hold the address availability. As shown in Figure 14 in the case of a network with 225 nodes (about 90% occupancy) the required control messages number is practically independent from the request number per second, which means that the protocol efficiently supports the network scalability. Only in the limit (around 100% occupancy) the protocol reduces its performance in terms of overhead. In fact, the main performance problem found is given in the situation that reflects the pink line in Figure 14. In situations where errors occur in the choice of the remote server, the latency increases in direct proportion to the control message number sent.