# A Design for SDN-Based Identifier-Locator Separation Architecture on IoT Networks
## 3 Proposed SDN-Based Identifier-Locator Separation Architecture for IoT Networks
### Main Procedure
#### 3.4.2 Route Optimization Process
Thus, the ROR cost is expressed as:

Figure 3:1

Each AR has to configure flow table entries for forwarding the ROR message. The ROR message may be delivered from the CN's h_AR to the MN's s_AR. After the ROR arrives at the MN's s_AR, the s_AR creates a flow table entry for replacing the CN's EID to the LOC. Similar to the Equation (8), the OpenFlow signaling cost is calculated as:

Figure 3:2

where \(C_{ROR}^{s\_AR}\), \(C_{ROR}^{h\_AR}\), and \(C_{ROR}^{n\_AR}\) indicate the OpenFlow signaling cost at the s_AR, the h_AR, and the n_AR, respectively. Each cost is calculated as:

Figure 3:3

Figure 3:4

Figure 3:5

In Equation (22), \(L_{ROPIN}\) and \(L_{ROPOUT}\) represent the length of the PIN and the POUT, respectively, including the ROR. ### Packet Delivery Cost

The packet delivery cost is calculated with the number of packets and the length of packets. Because the packet delivery manner of MOFI is different from proposed scheme, the cost formula is also different. Under the subsection, the packet delivery cost of MOFI and the proposed scheme are depicted. #### 4.2.1 Mofi

In MOFI, the LOC query is already processed before delivering packets because of the characteristics of the query first data delivery (QFDD) [17]. Therefore, it is possible that packets are forwarded via a direct path between the MN and the CN. For the packet delivery, however, an additional header containing the LOC information is required. The A-LOC, which is used for forwarding packets within the \(LMC_{AR-MN}\), is only routed from the MN to the \(LMC_{AR-MN}\) within the range of \(LMC_{AR-MN}\). On the other hand, the B-LOC, which is included in the additional header, is used for the packet transmission from \(LMC_{AR-MN}\) to \(LMC_{AR-CN}\). Both the inner header that uses the A-LOC and the outer header using the B-LOC have same length, the cost for packet delivery (PD) of MOFI is expressed as \(C_{PD}^{M}\) and calculated as:

Figure 3:6

where N(p) and \(L_{DP}\) represent the number of data packets and the length of data packets, respectively. \(L_{LH}\) indicates the header length of the LOC information. #### 4.2.2 Proposed Scheme

In the proposed scheme, the packet delivery cost is divided into the cost for forwarding data packets (FDP) and the cost for data delivery using OpenFlow (ODP). The first packet is forwarded through a non-optimal path from the OFSs to the ARs. After the RO process is completed, all packets should be routed through the optimal direct path. Therefore, the packet delivery cost \(C_{PD}^{New}\) is expressed as:

Figure 3:7

and the \(C_{FDP}^{New}\) is calculated as:

Figure 3:8

where \(r_{no}\) indicates the ratio of packets delivered using the path that is not optimal. Flow table entries for the path from the MN to the CN's OFS are created when the first packet is delivered. The cost generated by the CN's AR does not occur because the packet arrived at the CN's OFS is directly forwarded to the IP domain. Therefore, the cost for the ODP is only generated by the MN's s_AR n_ARs. The total cost for the ODP contains the cost of the MN's s_AR (\(C_{sODP}^{New}\)) and the cost of the n_ARs (\(C_{nODP}^{New}\)) and is expressed as:

Figure 3:9

Though the first packet is delivered to the destination, flow table entries for the reverse path cannot be created until the reply message is sent back. Thus, \(C_{sODP}^{New}\) and \(C_{nODP}^{New}\) can be calculated as:

\[C_{sODP}^{New}=h_{(AR-S)}*\left( \begin{matrix}L_{fPIN}+L_{FMOD}+L_{fPOUT}\\ \text{and}\end{matrix} \right) \tag{28}\]

\[C_{nODP}^{New}=h_{(AR-S)}*\left(h_{(S-S)}-1\right)*\left(L_{fPIN}+L_{FMOD}+L_{ fPOUT}\right), \tag{29}\]

respectively. In Equation (29), \(L_{fPIN}\) and \(L_{fPOUT}\) represent the length of the PIN and the POUT, respectively, including the first data packet.