Low Latency Handover in IEEE 8.11g Wireless LANs Mads Kronborg Agesen, Peter Dalgaard Hansen, Michael Hansen, Søren Brun Madsen and Hans Jørgen Uggerhøj Section for Automation and Control Department of Electronic Systems, Aalborg University Abstract When performing handovers in an IEEE 8.11 wireless network, a low latency handover can be crucial for some applications. Previous attempts to obtain low latency handover times are often based on hardware or driver specific solutions. This paper outlines two hardware and driver independent methods to decrease the handover time. The first method use fixed size wait states in order to resolve timing issues that arises during a handover procedure. The second method resolves the same timing issues, using a dynamic approach. Results show that the two methods achieve handover times below 73 ms and 1 ms respectively with 95 % confidence. These results are obtained when disregarding occassional handover times round 31 ms for the first method and round 5 ms for the second method. Decreasing the scan time further requires a driver modification, which is dependent on the specific hardware and application. offers high bandwidth, is easily accessible and is well documented. A drawback is the limited range of a WLAN Access Point,, which reduces the usability of the UAV. Therefore multiple s are needed to obtain a wireless link of acceptable quality over a larger area. The setup used for monitoring the UAV consists of several GSs connected to multiple s. This is illustrated in Figure 1. 1 UAV Wireless link Wired link Keywords: Handover, Handoff, IEEE 8.11, WLAN, Frequency Scan, TCP/IP I Introduction The background for this paper is the monitoring of an autonomous helicopter designated an Unmanned Aerial Vehicle, UAV. As the UAV is autonomous, controlling it from the ground is unnecessary. However, it is desirable to retrieve data from and send instructions to the UAV from a Ground Station, GS. In this way, the user of the GS is able to monitor a great amount of data and occasionally send instructions to the UAV. This makes it preferable to monitor the UAV from multiple GSs, supporting several users. The wireless connection between the UAV and the GSs is implemented as a WLAN connection complying with the IEEE 8.11 standard. This connection GS 1 GS GS 3 Figure 1: Illustration of the system with the UAV, multiple GSs and s. The GSs are ordinary PCs with a network interface card connected to a local area network. When the link quality between an and the UAV decreases to a critical low level, a handover to another with a better link quality is initiated. To achieve minimum package loss or minimum latency during handover, it is important with a low handover time. Whether a package latency or loss occurs depends on the implementation. Buffering unsent packages results in latency, and disregarding unsent packages results in package loss. The existing IEEE 8.11 implementation of the handover procedure contains a roaming feature providing the ability to roam between s located in the 1
same network and extended service set, ESS. Due to this implementation the handover is not controllable by the user and the timing is unpredictable. This paper contains an outline of the critical aspect in a handover procedure, and propose two methods that ensures a low handover time. In the following, a GS is denoted a and the UAV is denoted a Mobile Node, MN, to generalise the approach in this paper. Related Work Prior research related to handover procedures involves several types of handovers; some relies on changes in the link layer (L) and other introduces changes in the network layer (L3) of the OSI model. A method implementing a L3 handover mechanism, is Mobile IP. Mobile IP requires a Home Agent to manage the routing of traffic to the MN and offers roaming throughout e.g. the internet, by letting the MN act as it is located in its home network. However, this protocol does not provide low latency handovers, as it relies on the existing link layer [] [7]. Other approaches to improve the handover latency introduces changes in the implementation of the link layer. Common issues for all approaches are long scan time [4], which some of the methods handle by caching available s based on channel-wise scanning [6]. However, these approaches require hardware, supported by advanced open source drivers as MadWifi or and all violates the IEEE 8.11 standard specifying scan of all channels when performing active scanning [3]. II Handover Method Using Static Timing A handover in an IEEE 8.11 wireless network can generally be divided into three separate phases: Scanning, authentication, and association [1]. These phases are illustrated in Figure. The figure shows the handover procedure, where a data stream to a is interrupted by the handover and passed on to a new connected through a new. By manually configuring the MAC addresses and frequencies of the s, an active scanning to locate available s during a handover should be avoided. However, this obviously requires that the MAC address and frequency of any is known in advance, and does not entirely ensure that no scanning takes place during the handover. This is due to the occasional scanning performed by the wireless network interface card, in order to cache available s in its vicinity. This is shown as the scan event in Figure. Scan Time 4 4 MN 4 4 Authentication Request Authentication Response Reassociation Request Reassociation Response Figure : Event diagram for a normal handover showing the three phases during a handover procedure, without considering protocol specific issues. The MN can authenticate with an either by means of a shared key, or without any authentication. The latter only involves a -way handshake as shown in Figure. By not using any authentication in the handover procedure, a fast negotiation between the MN and the is ensured. First Timing Issue When performing a handover, two points in the procedure are time critical. The first timing issue occurs when the first connection is closed, initiating the handover. If the close command for the TCP connection is not completed properly before proceeding with the handover procedure, the handover is prolonged. Figure 3 illustrates the process of a TCP connection release used when closing a TCP connection. Mobile node Time FIN, ACK ACK FIN, ACK ACK Figure 3: Event diagram for the TCP connection release procedure. If timing is not considered the <ACK> and <FIN, ACK> from the is not received at the MN, and the TCP protocol repeatedly inquires for the missing response from the. This timing issue is solved by introducing a wait state, wait 1, before switching to another as illustrated in Figure 4. Authentication Association
Second Timing Issue The second timing issue occurs after the handover is performed, that is, after the MAC address and frequency of the new is set. At this point it is important to ensure that the MN is associated with the new before calling the connect command. The connect command connects a socket at the MN with a socket at the. If the association phase is not completed before connecting, the connect call fails and the TCP protocol occasionally attempts to reestablish a connection to the. This results in a longer connection time and thus a longer handover time. To ensure that the association phase with the new is finished before calling connect, a wait state, wait, is introduced before the sockets are connected, allowing the association to complete. An extended diagram of Figure is shown in Figure 4, where the inserted wait states are illustrated. Also the TCP connection release is shown, along with the TCP 3-way handshake performed when a new connection is opened. MAC address and frequency set Wait 1 Scan Time TCP Connection Release 4 4 MN 4 4 Authentication Request Authentication Response Reassociation Request Reassociation Response TCP 3-way handshake Figure 4: Extended event diagram, showing the introduced wait states emphasized in the handover test. Also the TCP operations between MN and s are shown. The length of the first wait state is determined by observing the TCP connection release, using the protocol analyzer Wireshark. The length of the second wait state is determined by trial and error. A limitation of this method is the fact that not all situations are accounted for, when determining the length of the static wait states. Thus, situations can arise where the length of the static waits are either insufficient or exaggerated, as the duration of the handover procedure varies. Authentication Association Wait III Handover Method Using Dynamic Timing This method is based on the same time critical points resolved in the Handover Method Using Static Timing. These time critical points are resolved in this method by a dynamic approach, as an alternative to the static waits in Figure 4. Furthermore the method uses static elements in the Address Resolution Protocol, ARP, table to optimise the handover mechanism. The first time critical point concerns proper TCP connection release before initiating a handover. To ensure the TCP connection release before initiating a handover, the linger socket option must be set for the used socket. By specifying this socket option the closure of the socket waits until the existing TCP connection is correctly closed and the timing is improved. The second time critical point is to ensure association to the new before connecting the sockets. After parsing the MAC address and frequency to the new, a check for the ESSID is periodically performed, as some phases during the handover procedure are time varying. The ESSID is the only available information to test for and is received in a probe response from the specified. As shown in Figure 4, the probe response is not in the final phase of the handover procedure and a reception of the ESSID is not a guarantee for an association. Thus a wait state is necessary after the ESSID is received. The duration of this wait state ensures the association after the ESSID is received, before connecting the sockets. When sending data over a network, an Address Resolution Protocol, ARP, is necessary. In general the ARP must map the logical IP addresses to physical MAC addresses in order to transmit data from one node to another node on a network. Even though the ARP stores the mapping in an ARP cache, the cache is periodically updated. This causes a problem if the update of the ARP cache happens during a handover, as this prolongs the handover procedure. To avoid an update of the ARP cache during the handover procedure, static elements are added to the ARP cache. IV Experimental Design To analyse the handover times obtained by use of the two methods a test bed was designed. The test was performed with use of two Asus WL-5g Deluxe- V s each having a PC connected that represented the. The employed s were installed with Ubuntu 6.6 kernel.6.15-9-686 and Ubuntu 7.1 3
kernel.6.-14 operating systems respectively. The MN was installed with Ubuntu 7.1 kernel.6.-14 and the wireless network interface card was an Intel PRO/Wireless BG with an ipw1.. driver. The test bed used for handover test is shown in Figure 5. The s were set up with different ESSIDs at different frequencies and TCP was used as connection protocol during the handover test. For the s, a server program was written which continuously listened for packages sent from the MN. V Measured Handover Times Using Static Timing The results from the handover test using static timing are shown in Figure 6 and Figure 7. Overall 49 handover tests were conducted and the results are presented as two histograms. The majority of the handover times, are less than 8 ms, but occasionally some handovers takes round 31 ms.. Wireless link Wired link MN Wired link 15 1 5.15.1.5 p(x) Figure 5: Test bed from the test. A client application was developed for the MN. The first step was to associate with the first using its MAC address and frequency. After association the client application started to send packages to the connected. After having sent 5 packages to the a handover was initiated by closing the existing connection, and parsing the MAC address and frequency of the new to the network interface card. After the handover was completed, another 5 packages were sent to the connected to the new. The packages sent to the s, contained the local time of the MN, thus the handover time was calculated by comparing the last and first package times stored at the s. Therefore the handover time is defined as the time from closing the existing connection to a new connection is established, which is the duration where no data is send. During the measurements the s were situated within 5 metres, for which reason the link quality was not taken into consideration. Each package was 16 bytes long, and no congestion had accumulated when sending the packages. The test were performed in an environment were also other s, from a local network, were present. It was assured that the s used a different frequency, than the local network, in order to avoid network interference. The function iwevent was used to observe the events from the wireless network interface card driver [8]. 55 6 65 7 75 x,time [ms] Figure 6: Results of the handover test, with handover times less than 8 ms and an approximated exponential density function. 15 1 5 37 38 39 31 311 31 Time [ms] Figure 7: Results of the handover test, showing the nonperiodic handover times round 31 ms. The difference in handover times below 8 ms and the handover times round 31 ms, is obviously not caused by normal variations. Therefore the two sample groups are treated separately. The distribution of handover times below 8 ms, illustrated in Figure 6, is approximated by a shifted exponential distribution. The approximated distribution is used to calculate a 95 % confidence interval of the mean. This confidence interval is used to decide an upper time limit 4
for 95 % of the handover times. The exponential distribution is given by the probability density function p(x) =λ e λx, (1) where both the mean µ and the variance σ of the distribution depends on the parameter λ. The parameter λ for the distribution is unknown and therefore estimated by the maximum likelihood estimator ˆλ, given by 1 ˆλ = 1 4 4 i=1 x =.13, () i x min where x min is the minimum value in x, i.e. the shift of the distribution, which equals 53.95 ms. A plot of the probability density function for the approximated exponential distribution is illustrated in Figure 6 together with the measured handover times. The 95 % confidence interval of the mean is calculated by applying, that an exponential distribution is approximately chi-square distributed with n degrees of freedom [5] { n i=1 P xi < ˆµ x χ min < n } i=1 xi =1 α. (3) χ α/,n (1 α)/,n This equation gives a two-sided interval for ˆµ x min. For α =.5, it is stated that ˆµ x min lies in the interval ˆµ x min (3.57, 6.58). (4) The density functions for the 95 % confidence interval ofthemeanareshowninfigure8. Probability p(x).3.5..15.1.5 Exponential Distr. Upper Limit for Exponential Distr. Lower Limit for Exponential Distr 5 1 15 5 x, Time [ms] Figure 8: A plot of the approximated exponential distribution compared with the distributions from the 95 % confidence interval of the sample mean. From the upper time limit x t, it is stated that 95 % of the handover times are less than the boundary with 95 % confidence. This is calculated using the cumulative distribution function P (X x t )= xt λ e λx dx =.95. (5) The upper time limit of the approximated exponential distribution x t + x min is calculated to 73.66 ms. The nine previously ignored samples round 31 ms, result from a scan performed by the network interface card at the MN. This fact is indicated by a scan request completed, which occurredateachofthese handovers, observed using the function iwevent provided by wireless extension [8]. The fact that these handovers takes round 31 ms, indicates that the scan takes longer than the wait state of 4 ms inserted in the handover procedure, which results in a stall when connecting the sockets. VI Measured Handover Times Using Dynamic Timing The test results from the method using dynamic timing are shown in Figure 9 and Figure 1 as two histograms. Overall 5 handover tests were conducted and the majority of the handover times, are less than 1 ms, but occasionally some handovers last round 5 ms. 1 1 8 6 4 4 5 6 7 8 9 1 11 1 x,time [ms].5..15.1.5 Figure 9: Results of the handover test, showing handover times without scan and an approximated Gaussian density function. As the high handover times are caused by a scan the two outcomes are processed separately. An approximated distribution is calculated to determine a 95 % confidence interval of the mean, used to determine the upper time limit for 95 % of the handover times. The distribution of the low handover times in Figure 9 is approximated by a Gaussian distribution. The Gaussian distribution is given by the probability density function p(x) = 1 πσ exp ( ) (x µ) σ p(x), (6) 5
1 1.5. Gaussian Distr. Upper Limit for Gaussian Distr. Lower Limit for Gaussian Distr. 8 6 4 Probability p(x).15.1.5 46 48 5 5 54 56 58 6 Time [ms] 5 1 15 x, Time [ms] Figure 1: Results of the handover test, showing handover times during scan. where the mean µ and variance σ are unknown. As the mean and variance are unknown, the maximum likelihood estimators X and S are used to estimate µ and σ, respectively S = X = ( n i=1 n i=1 x i n (x i X) ) 1 n 1 = 69.7 ms, (7) = 15.98 ms. (8) The probability density function for the approximated Gaussian distribution is illustrated in Figure 9. The 95 % confidence interval of the mean is calculated from atwo-sidedt-test [5] { } S S P X + t α/,n 1 n < ˆµ < X t α/,n 1 n =1 α. (9) It is stated that the mean ˆµ from the observed X, lies within the interval ˆµ (63.74, 74.4). (1) The density functions for the 95 % confidence interval ofthemeanareshowninfigure11. Basedonthe estimated confidence interval, the upper time limit is decided for 95 % of the handover times. This is calculated using the cumulative distribution function x ( ) 1 (x µ) P (X x) = exp dx =.95. πσ σ (11) The upper time limit is calculated to 1.69 ms. The outlier handover times round 5 ms in Figure 1 are caused by the unavoidable scan procedure, specified by the network interface card driver. Figure 11: A plot of the approximated Gaussian distribution compared with the distributions from the 95 % confidence interval of the sample mean. VII Discussion The purpose of this paper was to outline the critical aspects during a handover and develop two methods to ensure low handover times. The critical aspects were found to be two timing issues concerning TCP connection release and association with the new. These issues are solved by use of a static and a dynamic method. The two methods showed different results for the distribution of handover times. The minimum handover time is observed using dynamic timing. This handover time is unattainable for the method using static timing, as the sum of the two static waits exceeds this amount of time. However, from the calculated 95 % confidence interval, the handover method using static timing has the lowest upper limit handover time. Another disadvantage for the method using static timing, is some outlier handover times round 31 ms, where the method using dynamic timing has outlier handover times round 5 ms. The low handover times for the two methods do not have the same distribution. The second method using dynamic timing, is depending on a received ES- SID and therefore has more fluctuating handover times compared to the method using static timing. The outlier handover times in each of the developed methods arise because of a scan, ended by a scan request completed. In the method using static timing, the length of the second wait is less than the time of the scan. This entails that connection of the sockets is prolonged, since it is attempted to established the connection before a successful association with the new. In the method using dynamic timing, the connection of the sockets is performed after the scan is com- 6
pleted, which gives lower outlier handover times. This imposes a lower time limit for a handover, whenever a scan is performed. The scanning is unavoidable as the wireless network interface card occasionally must update the information of s in the vicinity. It is the firmware or driver, depending on the specific wireless network interface card, that determines when to scan. A possible solution to reduce the scan time during a handover, is to limit the number of frequencies to scan. However, this solution requires modification of the driver for the wireless network interface card, which eliminates the possibility of obtaining a hardware and driver independent handover solution. The necessity to make a specific solution to decrease the scanning time is also supported by other research [6]. Relating the measured handover times, of the two developed methods, to the UAV GS system, none of the methods are ideal. This is due to the outlier handover times, which causes an undesirable disruption of the data transmission. However, This disruption does not lead to a malfunction of the UAV, but the users of the GSs will experience outage when monitoring the UAV. This is not critical, as the data is stored on the UAV for later retrieval. If one of the developed methods should be implemented on the UAV system, the deciding argument would be based on the outliers. This is due to the fact that an upper time limit of 7 ms or 1 ms is not crucial for monitoring the UAV. Thus, the handover solution using dynamic handover timing is preferable, as a 5 ms outage is less noticeable compared to 3 ms. To summarise, it is not possible to consistently obtain handover times below 5 ms, with a hardware and driver independent handover solution. However, this only affects the monitoring of the UAV in a noncritical way. References [1] M. S. Gast. 8.11 wireless networks,. 1th edition. [] A. I. Hidetoshi Yokota and T. Hasegawa. Link layer assisted mobile IP fast handoff method over wireless LAN networks,. [3] IEEE. ANSI/IEEE std 8.11, 1999 edition (R3), 1999. [4] W. A. Mishra Arunesh, Minho Shin. An emperical analysis of the IEEE 8.11 MAC layer handoff process. [5] S. M. Ross. Probability and statistics for engineers and scientists, 1994. [6] A. S. R. Sangho Shin, Andrea G. Forte and H. Schulzrinne. Reducing MAC layer handoff latency in IEEE 8.11 wireless LANs,. [7] T.-c. C. Srikant Sharma, Ningning Zhu. Lowlatency mobile IP handoff for infrastructure-mode wireless LANs, 4. [8] J. Tourrilhes. Wireless tools for linux, 1996-7. Downloaded 13-1-7. 7