# A Service-Efficient Proxy Mobile IPv6 Extension for IoT Domain
## 3 Proposed Scheme
### Handover Latency in Non-Location-Based RSS Extensions  
Handover latency is the amount of time the MN is not receiving the services during handover. Such services become unavailable when MN is disconnected from pMAG until it receives the first packet from nMAG. Handover latency is affected by RSS error as the handover moment is predicted early. Such a problem is referred to as false handover initiation. In an RSS-based scheme, such additional added latency is identified by Equation (3).  
\[t_{error}=\sum_{k=1}^{\frac{T_{R}}{f}}{(1-p_{e})}^{k-1}.p_{e}.\{T_{R}-(k-1)f\} \tag{3}\]  
Equation (3), \(T_{R}\) shows the time during which the MN reaches within nMAG's domain. \(f\) and \(p_{e}\) are the frequency for RSS checking and the probability of RSS error. Furthermore, the probability of MN to reach to the MN is shown using \((1-p_{e})^{k-1}*p_{e}\). Furthermore, the RSS error is the event when the MN threshold is lower than its defined value.  
Handover latency in FPMIPv6 is started when the RSS event or RSS error occurs. After the falling of the RSS value to the defined threshold, the pMAG requests handover initiation by sending an HI message to nMAG. Handover acknowledgment is responded to through a HAck message from nMAG to pMAG. Handover latency is calculated when MN receives its packets from nMAG from the disconnection \(\phi\) of MN from pMAG. As a result, handover latency is the function of the L2 report, the cost of the HI message, and the HAck message. Furthermore, if the tunnel is established after the L2 down then MN does not receive its packets from pMAG, even if MN roams inside the domain of pMAG. In addition, FPMIPv6 is suffering from additional latency due to RSS error \(t_{error}\) too. Equation (4) represents the handover latency in FPMIPv6.  
\[t_{FPMIPv6}=max\{t_{error}+\varnothing-\big{(}t_{HI}+t_{scan}+t_{HAck}+t_{ report}\big{)},0\}+t_{L2}+t_{WRS}+t_{RS}+t_{w-data} \tag{4}\]  
Handover latency is initiated after the disconnection of MN from pMAG and stopped when LMA and target MAG share PBU and PBA messages in the smart buffering scheme. RSS error does not affect the RSS error as the packets are delivered to MN if it is inside the pMAG domain. PBU and PBA messages are exchanged when MN is detected by nMAG. In the meantime, FREQ and FRep messages are also communicated between pMAG and LMA.  
After the nMAG receives these messages, the process for handover ends. The required handover in a smart buffering scheme can be calculated using Equation (5).  
\[\text{t}_{\text{smart-buff}}=\text{t}_{\text{L2}}+\text{t}_{\text{RS}}+\text{t}_{ \text{WRS}}+\text{t}_{\text{RA}}+\text{max}\big{\{}\big{(}\text{t}_{\text{PUB}}+ \text{t}_{\text{PBA}}\big{)},\,\big{(}\text{t}_{\text{FRep}}+\text{t}_{\text{ FReq}}\big{)}\big{\}} \tag{5}\]  
Handover starts in low latency scheme when DeReg-PBU is received by LMA in low latency scheme. After the nMAG detects the MN then PBU messages are forwarded to LMA and LMA responds with PBA to nMAG. LMA then provides the buffered packets to nMAG that is further delivered to MN. The low latency scheme is also affected by the RSS error. In such cases, the handover starts early, which also adds additional latency to the scheme. Overall handover latency in a low latency scheme is computed using Equation (6).  
\[\text{t}_{\text{Low-latency}}=\text{t}_{\text{error}}+\varnothing+\text{t}_{ \text{WRS}}+\text{t}_{\text{L2}}+\text{t}_{\text{RS}}+\text{t}_{\text{PBA}}+ \text{t}_{\text{RA}} \tag{6}\]