# Multilayered Network Model for Mobile Network Infrastructure Disruption
## 5 Routing in DRONET Layer
### Routing Stage of DRONET Layer  
Routing stage in DRONET layer begins after the Initial and search stage, where at least two UAVs are connected to each other. As a communication technology, UAVs of DRONET layer in MNM should use at least IEEE 802.11 Wi-Fi. However, in terms of possible interference, it is better to use second technology such as IEEE 802.16 WiMAX. The same as in WSN layer, the UAVs, therefore, needs to implement dual protocol stack.  
The earliest version of WiMAX is based on IEEE 802.16 and is optimized for fixed and roaming access. This solution was further extended to support portability and mobility based on IEEE 802.16e, also known as Mobile WiMAX. In recent years, multiple studies provide performance comparisons of routing protocols for WiMAX. [PERSON] et al. [39] perform a comparison of DSDV, DSR and AODV routing protocols, where table-driven protocol DSDV has the best performance in terms of the packet delivery fraction parameter. On the contrary, a [PERSON] [40] suggests, AODV outperforms DSR and DSDV routing protocols. The performance comparison in [41] shows that in a mobile environment, ZRP and AODV perform better than DSR and OLSR. [PERSON] et al. [42] also consider the performance of routing protocols for sending Health-care data over the WiMAX network. The results show that from studied protocols AODV, OLSR, ZRP and the LAR1, the last mentioned can offer better results in sending telemedicine data over the wireless channel with high throughput and better reproducibility.  
In MNM, the reactive protocol is suggested, since periodic updates can be energy-demanding on limited UAVs resources. The deployed routing protocol also needs to implement necessary adjustments. We assume that the UAV is able to extract information about AP availability from topology obtained from a MANET gateway node. Therefore, this information should be taken into account in the routing metrics. The routing algorithm is described by the flowchart depicted in Figure 13.  
The routing algorithm begins with urgent data obtained from the MANET layer. UAV than check for available UAV that has connectivity to MANET network with accessible AP. If UAV with MANET connectivity to accessible AP is not available, the Data Backup algorithm for DRONET layer is called. This algorithm store data and set timer. If the timer is zero, Data Backup returns Fail Status. If Continue status is returned, UAV check for UAV with MANET connectivity to accessible AP again. Otherwise, data are dropped. The timer is decremented and Continue status is returned. Since the DRONET layer is not connected to AP, Data Backup algorithm presented by Algorithm 1 needs to be edited. Data Backup algorithm for DRONET layer is, therefore, described by Algorithm 2.  
If UAV with MANET connectivity to accessible AP is available, the urgent data are transported to particular UAV. This UAV then tries to send data to the MANET gateway node. If this node is not available, the main algorithm calls Data Backup. If the returned status is Continue, UAV check MANET gateway node again. Otherwise, data are dropped.  
```
input :Data from NodeID\(\rightarrow\) Data1D ifData1D is not Repository?then ifNew Data1D from NodeID in Repository?then do: delete previous Data1D in Repository go to: line 6 else \(Data1D\rightarrow\) Repository, set:\(\mathit{Timer1D}\leftarrow\mathit{time}\) \(\leftarrow\) Begin Return:Status end if else ifTimer1D == 0 then  Delete Data1D in Repository Status \(\leftarrow\) Fail Return:Status else Update \(\mathit{Timer1D}\) \(\leftarrow\) Continue Return:Status end if  end if
```  
**Algorithm 2**Data Backup algorithm for DRONET layer  
Figure 13: DRONET routing stage algorithm flowchart.