# 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
Here, \(C_{RRQ}^{New}\) is calculated as the aggregate of the registration request cost \(C_{RR}^{New}\) and the registration reply cost \(C_{RP}^{New}\). Thus, the \(C_{RRQ}^{New}\) is calculated as:

\[C_{RRQ}^{New}=C_{RR}^{New}+C_{RP}^{New}. \tag{5}\]

The \(C_{RR}^{New}\) includes the cost for delivering the RR message (DRR) and OpenFlow signaling cost (ORR). Thus, the \(C_{RR}^{New}\) is calculated as:

\[C_{RR}^{New}=C_{DRR}^{New}+C_{ORR}^{New}. \tag{6}\]

The RR message is forwarded from the s_AR to the h_AR of the MN, so \(C_{DRR}^{New}\) is expressed as:

\[C_{DRR}^{New}=h_{(S-S)}L_{RR},\]where \(L_{RR}\) indicates the length of the RR message. The \(C_{ORR}^{New}\) is classified according to the role of the AR. Each AR's OpenFlow signaling cost is expressed as \(C_{RR}^{s,AR}\), \(C_{RR}^{t,AR}\), and \(C_{RR}^{t,AR}\) to process the RR message. Therefore, the total cost of OpenFlow for processing the RR message is calculated as:

Figure 4:0

The cost of sending the RR of each AR is calculated differently. In case of the s_AR, it creates flow table entries in its OFS by sending flow modification (FMOD) control messages with the \"add\" action. FMOD messages consist of two types: one for forwarding the RR message to the next hop and another for replacing the MN's LOC into the EID. Therefore, the cost of the RR in the s_AR is calculated as:

Figure 4:1

In Equation (9), \(L_{FMOD}\) indicates the length of the FMOD message and \(L_{RPOUT}\) represents the length of the packet-out (POUT) message containing the RR message. In the case of the n_AR, it receives a packet-in (PIN) message from its OFS and responds with an FMOD to add a flow table entry to forward the RR message. In addition, the n_AR sends one more FMOD message to set the reverse path of the registration reply message (RP). Thus, we can calculate the cost of the RR at the n_AR as:

Figure 4:2

where \(L_{RPIN}\) indicates the length of a PIN including the RR message. In case of the h_AR, it receives the PIN including the RR message from its OFS and sends FMOD messages to its OFS. The FMOD messages that are sent to the OFS include the actions for replacing the MN's EID into the LOC and for forwarding the RP. Thus, we can calculate the cost of the RR at the h_AR as:

Figure 4:3

By using these calculating processes, the cost of RP can be calculated as:

Figure 4:4

In Equation (12), \(C_{DRP}^{New}\) indicates the RP delivery cost and \(C_{ORP}^{New}\) represents the OpenFlow signaling cost. We can express the RP delivery cost as:

Figure 4:5

In Equation (13,) LRP indicates the RP message length. As the flow table entries for forwarding packets and replacing the LOC for the EID are already inserted in the OFSs, OpenFlow signaling cost is calculated as:

Figure 4:6

In Equation (14), \(L_{RPPIN}\) and \(L_{RPPOUT}\) indicate the length of the PIN and the POUT, respectively, including the RP. The cost for is also divided into the cost of query itself and the cost of the reply. The RO query (ROQ) cost is expressed as \(C_{ROQ}^{New}\), and the RO reply (ROR) cost is expressed as \(C_{ROR}^{New}\). Therefore, the cost for RO (\(C_{RO}^{New}\)) is calculated as:

Figure 4:7In Equation (15), the ROQ cost is consisted of the ROQ delivery cost (ROQD) and the OpenFlow signaling cost (ROQO), so the ROQ cost is expressed as:

Figure 4:8

The ROQ message is delivered from the MN's s_AR to the CN's h_AR, so the cost of the ROQ delivery is calculated as:

Figure 4:9

Flow tables for forwarding the ROQ are already created when the first packet is delivered. Therefore, the OpenFlow cost for forwarding the ROQ is the same as the sum of the PIN and the POUT containing the ROQ. We can express this cost for ROQO as:

Figure 3:0

In Equation (18), \(L_{RQPIN}\) and \(L_{RQPOUT}\) represent the length of the PIN and the POUT containing the ROQ, respectively. \(C_{ROR}^{New}\) is calculated as the sum of the ROR delivery cost (\(C_{RORD}^{New}\)) and the OpenFlow signaling cost (\(C_{RORO}^{New}\)). \(C_{RORD}^{New}\) is calculated by multiplying \(h_{(S-S)}\) by \(L_{ROR}\).