# An Efficient Routing Protocol for Quantum Key Distribution Networks
## 3 Simulation Results and Analysis  
### Comparative Study of AODV, DSDV, and OLSR  
A comparative study is done with AODV, DSDV, and OLSR through simulator NS3. In this paper, the QKD simulation module based on NS3 developed in the literature [21] is used to simulate the QKD network. The open source code with this QKD simulation module can be downloaded from the git repository supplied in [21]. A modified USNET network is selected as the network topology in this experiment, as shown in Figure 6. There are 24 nodes and 27 edges in this network topology [32]. The numbers on each edge represent the length of the optical fiber link (in km). The parameters of QKD devices and key pools are the same as in Section 2.3.3. We first discuss the concept of communication level before moving on to the network requirement configuration in this experiment. The communication level is defined as follows:  
\[\text{communication\_level}=\frac{\text{communication\_demand}}{ITS\_communication \_capability}. \tag{4}\]  
The highest communication demand that the network topology can theoretically accommodate is its \(ITS\_communication\_capacity\)[31]. If the network's communication demand exceeds the \(ITS\_communication\_capacity\), severe network congestion will occur. Please refer to [31] for a detailed calculation of the \(ITS\_communication\_capacity\). The communication level is calculated as the ratio of the average communication requirement and the \(ITS\_communication\_capacity\). The QKD network cannot work normally when the average communication requirement exceeds the \(ITS\_communication\_capacity\). Therefore, the range of values of the ITS communication level is [0, 1]. In this experiment, the entire network communication mode is used for communication settings in the simulation process. In other words, there is a communication requirement between any two nodes in the network. The communication level in this experiment is set to 0.01, 0.2, 0.4, 0.6, 0.8, and 1. The packet size is set to 500 bytes, and the simulation time is 100 s. Due to path switching, some packets will be lost throughout the network's communication process. Since the lost data packets are also encrypted by a quantum secure key, the quantum secure key utilized by the lost data packets appears to have been ineffectively employed. As a result, quantum secure key utilization refers to the fraction of quantum secure keys consumed by successfully transmitted data packets compared to the total number of quantum secure keys consumed, calculated as follows:  
\[QKU=\frac{DPS}{TPS}, \tag{5}\]  
where \(DPS\) and \(TPS\) represent the number of quantum secure keys consumed by delivered data packets and total data packets, respectively, and \(QKU\) stands for quantum secure key utilization. Quantum secure key utilization is mainly affected by the packet delivery rate (PDR), as can be observed from the formula. Therefore, real-time PDR in the 100 s simulation is also used in this experiment to reflect the evolution of quantum secure key utilization. Figure 7 shows that AODV performs the worst among the three protocols, whereas the OLSR protocol performs the best. The DSDV protocol performs better when the communication level is low. However, as the communication level rises, its PDR drops sharply. The variation of the PDR curve also shows that the OLSR protocol recovers the PDR faster than AODV and DSDV, implying that OLSR has better link-state awareness. The statistical experimental results shown in Figure 8 indicate that quantum secure key utilization of OLSR is significantly higher than that of AODV and DSDV at all communication levels. The performance of the OLSR protocol is mainly attributed to its dynamic link state awareness and selective broadcasting. It can detect changes in network topology faster than AODV and DSDV protocols, thereby reducing the loss of data packets during path switching. As a result, a higher PDR is obtained. At the same time, fewer quantum secure keys are wasted, resulting in increased quantum secure key utilization.