You are on page 1of 5

2019 2nd International Conference on Communication Engineering and Technology

A TCP Fairness Control Method for Two-Host Concurrent Communications in


Elastic WLAN System Using Raspberry Pi Access-Point

Rahardhita Widyatra Sudibyo, Nobuo Funabiki, Wen-Chung Kao


Minoru Kuribayashi, Kwenga Ismael Munene, Md. Department of Electrical Engineering
Manowarul Islam National Taiwan Normal University
Department of Electrical and Communication Taipei, Taiwan
Engineering, Okayama University e-mail: jungkao@ntnu.edu.tw
Okayama, Japan
e-mail: funabiki@okayama-u.ac.jp

Abstract—The IEEE802.11 wireless local-area network (WLAN) However, our preliminary experiments using the elastic
has been extensively deployed as inexpensive and flexible WLAN system testbed revealed that the TCP throughput is
Internet access services. We have studied the elastic WLAN not fair among the two hosts communicating with the same
system that dynamically optimizes the network configuration AP when they are located at difference distances from the
depending on traffic demands. Our testbed experiments using AP and are concurrently communicating. This unfairness can
Raspberry Pi revealed that concurrent TCP communications of be caused by both differences in the modulation and coding
multiple hosts with a single AP cause the unfairness in scheme (MCS) and the TCP window size among them. As a
throughput performances. In this paper, we propose the TCP result, the packet transmission interval for the faster host
fairness control method for two-host concurrent
further becomes shorter and that for the slower host turns
communications. The delay is introduced in the AP at the
packet transmissions to the faster host, to increase
into longer.
transmission opportunities with the slower host. The delay is In this paper, we propose the TCP fairness control
initially estimated by the received signal strength (RSS) from method for two-host concurrent communications in the
each host, and then, is dynamically optimized using the PI elastic WLAN system using Raspberry Pi AP. The delay is
controller. For evaluations, we implement the proposal in the introduced in the AP at the packet transmissions to the faster
elastic WLAN system testbed, and conduct extensive host using Linux commands, in order to increase the
experiments, where the TCP throughput fairness is achieved. transmission opportunities with the slower host. Then, it is
expected that the faster host will reduce the throughput,
Keywords wireless local-area network; raspberry Pi; TCP while the slower host increases it. This delay is initially
throughput fairness; delay; PI controller; testbed calculate by the received signal strength (RSS) from each
host, and then, is dynamically optimized to achieve the better
I. INTRODUCTION fairness using PI controller [10].
For evaluations, we implement the proposal in the testbed,
Nowadays, the IEEE802.11 wireless local-area network and verify the effectiveness through extensive experiments in
(WLAN) has been widely deployed around the world due to outdoor and indoor network fields, where the TCP
several advantages of simple installations, flexible coverages, throughput fairness is achieved.
and low costs [1]. WLAN facilitates the wireless access to The rest of this paper is organized as follows: Section II
the Internet, providing users with a convenient and viable presents the TCP fairness control method. Section III
alternative to the wired Ethernet LAN connectivity. As a evaluates the proposal through testbed experiments. Section
result, WLAN has become the most common access way to IV presents the dynamic delay optimization using the PI
the Internet in governments, companies, and schools. controller. Finally, Section V concludes this paper with
For the 802.11n WLAN, we have studied the elastic future works.
WLAN system [2] that dynamically optimizes the network
configuration depending on traffic demands, to reduce II. PROPOSAL OF TCP FAIRNESS CONTROL METHOD
energy consumptions while enhancing performances. Also,
In this section, we propose the TCP fairness control
we have implemented the elastic WLAN system testbed
method and its implementation on Raspberry Pi AP.
using Raspberry Pi for the access-point (AP) [3].
In WLAN, the fairness of the throughput performance A. Idea
among hosts is important for service providers to ensure fair Our testbed experiments revealed that concurrent TCP
services among the users [4]. That is, fairness issues in communications of two hosts with a single AP cause
WLAN have been studied extensively [5]-[9]. Since the unfairness in throughput performances, because the packet
majority of network applications use TCP, the TCP fairness transmission intervals become much different among them.
appears to be extremely critical in WLAN. Figure 1(a) illustrates the unfairness of the packet
transmitting intervals between the near and far hosts, which

978-1-7281-1439-2/19/$31.00 ©2019 IEEE 76


may be caused by the differences in MCS and the TCP  $sudo iw dev wlan0 station dump — egrep
window size between the links. The near host will use the “Station—signal:”.
faster MCS than the far host, which makes the TCP window Here, the AP does not need to have the privilege to the
size larger. Then, the near host occupies much more host. Since the measured RSS tends continuously fluctuating,
bandwidth for packet transmissions than the far host, which we measure RSS by 30 times with one second interval and
results in increasing the interval difference between them. use the average for Eq. (1).
To solve this unfairness problem, the delay is introduced 2) Transmission Delay Application: Then, the delay will
at the communication of the near host (fast host). By be applied to the AP by the following procedure:
reducing the transmission bandwidth of the fast host, it can a. Delete any previously allocated delay at the interface
give more bandwidth to the far host (slow host). This delay wlan0:
should be controlled such that the packet transmission  $sudo tc qdisc del root dev wlan0.
intervals of the two hosts become equal as shown in Figure b. Set the delay, namely delay1 and delay2, for the packet
1(b), to achieve the throughput fairness. transmission from the AP to each host:
 $sudo tc qdisc del root dev wlan0.
 $sudo tc qdisc add dev wlan0 root handle 1: prio
bands 3.
 $sudo tc qdisc replace dev wlan0 parent 1:1 netem
delay delay1.
(a) without proposal.  $sudo tc qdisc replace dev wlan0 parent 1:2 netem
delay delay2.
c. Apply each delay to the packet transmission to the host
specified by the IP address:
 $sudo tc filter add dev wlan0 protocol ip parent 1:
u32 match ip dst 172.24.4.7 flowid 1:1.
(b) with proposal.  $sudo tc filter add dev wlan0 protocol ip parent 1:
Figure 1. Background of TCP fairness control method. u32 match ip dst 172.24.4.8 flowid 1:2.
Here, the IP address of the host is manually set. The
In the proposed method, the initial delay is calculated automatic set will be in future works.
using the measured RSS at the AP from the two hosts,
because RSS determines the MCS. Then, the delay is III. EVALUATION OF PROPOSAL WITH MANUAL DELAY
dynamically optimized to achieve the better fairness during OPTIMIZATION
communications, which will be presented in Section V. In this section, we evaluate the proposal through
experiments using the testbed in the outdoor and indoor
B. Initial Delay Calculation
fields. Here, to confirm the validity of the delay introduction,
Based upon the experimental results, the initial delay D(0) the initial delay is first calculated by Eq. (1) and then, is
in the TCP fairness control method is calculated from the optimized manually.
difference of the measured RSS at the AP between the two
hosts: A. Experiment Setup
In experiments, the TCP traffics are generated from two
hosts to the server at the same time to measure throughputs
under concurrent communications. Figure 2 shows the TCP
   link configuration between the server and the host through
the AP. The server and the AP are connected with the
where RSSfast represents the RSS at the AP from the fast host, 100Mbps wired Ethernet, and the AP and the host are
RSSslow does the RSS from the slow host, RSSmin does the connected with the IEEE 802.11n wireless link. Using iperf
constant minimum RSS in WLAN, and a, b are the constant [11], the host generates TCP traffics with the 477KB TCP
parameters that should be adjusted in each environment, window and the 8KB buffer to the server.
respectively. In this paper, RSSmin = -88dBm, a = 9, and b = Table I shows the device and software specifications
0.17 are used. This equation with the parameter values is used in experiments. One Raspberry Pi is employed for the
derived from our measurement results in the outdoor/indoor AP operating at 2.4GHz on channel 13, and three laptops are
fields. for the two hosts and the server.
C. Testbed Implementation
Then, we present the implementation of our proposal on
the elastic WLAN system testbed.
1) RSS Measurement: The Raspberry Pi AP collects the
measured RSS at the AP from each host by the following
command: Figure 2. TCP link configuration.

77
TABLE I. DEVICES AND SOFTWARE SPECIFICATIONS 2) Throughput Results: Figures 3 and 4 show throughput
software AP
results for the two hosts without and with the proposal
model Raspberry Pi 3
respectively. They confirm that our proposal greatly
CPU Broadcom BCM2837 @1.2Ghz
improves the fairness. Figure 5 compares the total
memory 1GB LPDDR2 900MHz
throughput for each host location between them.
NIC chipset Broadcom BCM43438 Unfortunately, by the proposal, the total throughput
OS Raspbian diminished by 10% to 31% at each location.
software hostapd
server and hosts
model Toshiba Dynabook R731/B
CPU Intel Core i5-2520M @2.5Ghz
memory 4GB DDR3 1333MHz
OS Linux Ubuntu 14
software Iperf 2.0.5

B. Experiments in Outdoor Field


First, we discuss experiment results in the outdoor
network field.
1) Outdoor Field: Asahi Riverbed is selected for the Figure 5. Total throughput result in outdoor field.
outdoor field without interfering signals, which is confirmed
by using Homedale [12]. The AP is located with the 135cm 3) Fairness Index Results: The Jain’s fairness index F
height and the host is with the 70cm height. During [13] can be calculated by:
measurements, H1 is located at 0m, 5m, 10m, and 15m
distance from the AP. For each H1 distance, H2 is moved
from 0m to 30m distance with the 5m interval from the AP.   
In the end, the throughput measurements have been
conducted in both cases with and without applying the where TPslow and TPfast represent the throughput of the slower
proposal. host and that of the faster host respectively. Figure 6 shows
the fairness index result. It is noted that the best fairness
index is 1. Without the proposal, the fairness index is often
smaller than 1. However, with the proposal, the result will
become close to 1 in general.

Figure 3. Throughput result without proposal in outdoor field.

Figure 6. Fairness index results in outdoor field.

C. Experiment in Indoor Field


Next, we discuss experiment results in the indoor
network field.
1) Indoor Field: The third floor in Engineering Building
#2 at Okayama University in Figure 7 is used for the indoor
field. This field has a complex structure that consists of
several rooms and walls. The figure demonstrates the
locations of the AP (triangle), the hosts (circles), and the
server (square). The heights of the AP and the host are the
Figure 4. Throughput result with proposal in outdoor field.
same as in the outdoor field.

78
IV. DYNAMIC DELAY OPTIMIZATION BY PI CONTROLLER
In this section, we present the dynamic delay
optimization in the TCP fairness control method.
A. Delay Optimization by PI Controller
The initial delay D(0) is dynamically optimized by
applying the PI controller [13] to make the measured fairness
index be equal to the given target fairness index:
Figure 7. Indoor field.

2) Throughput Results: Figures 8 and 9 show throughput 


results for the two hosts without and with the proposal where D(n) and F(n) represent the delay and the fairness
respectively. Figure 10 compares the total throughput for index at the n-th time step during communications, Ftar does
each host location between them. With the proposal, the total the given target fairness index, KP does the P control gain,
throughput has decreased by 6% to 61% in each location. and KI does the I control gain, respectively. In this paper, Ftar
The solution to the tradeoff between the individual = 0.97, KP = 3, and KI = 0.8 are adopted. In the
throughput fairness and the total throughput performance implementation, this equation is modified by:
will be in the future works.


B. Testbed Implementation
The implementation of the dynamic delay optimization is
discussed. First, to assign the initial delay for the packet
transmission to the fast host at the AP, the following
procedure is implemented on the server:
Figure 8. Throughput result without proposal in indoor field. 1) Collect the MAC and IP addresses of the associated
hosts.
2) Request the AP to collect RSS from each host with
1sec interval for 30sec and to send them to the server.
3) Calculate the average of the received RSS.
4) Calculate the initial delay D(0) from the average RSS
by Eq. (1).
5) Set D(0) as the delay to the fast host at the AP.
Figure 9. Throughput result with proposal in indoor field. Then, to dynamically optimize the delay, the following
procedure is implemented on the server, where it is repeated
at every 20sec:
1) Measure the throughput of each host for 20sec using
iperf.
2) Calculate F(n) by Eq. (2).
3) Update D(n) by Eq. (4).
4) Set D(n) as the delay to the fast host at the AP.
Figure 10. Total throughput result in indoor field.
C. Result
3) Fairness Index Results: Figure 11 illustrates the
fairness index result. Without the proposal, the fairness index
turns out smaller than 1, including 0.6. However, with the
proposal, it will grow into 1 nearly. The effectiveness of our
proposal is confirmed in the indoor field.

Figure 12. Testbed topology.

Figure 13 compares the observed fairness indices in the


experiments in the network field in Figure 12 among the
three methods: 1) proposal, 2) initial delay only, and 3) no
Figure 11. Fairness index result in indoor field.
delay. During the first 60sec, the system collected the

79
necessary data to calculate the throughput. Then, it found [2] M. S. A. Mamun, N. Funabiki, K. S. Lwin, M. E. Islam, and W.-C.
that the fairness index between the two hosts is about 0.7. Kao, “A channel assignment extension of active access-point
configuration algorithm for elastic WLAN system and its
After that, 1) proposal achieves the target fairness index at implementation using Raspberry Pi,” Int. J. Netw. Comput., vol. 7, no.
about 130sec. On the other hand, 2) initial delay only and 3) 2, pp. 248-270, July, 2017.
no delay could not achieve it. Thus, the effectiveness of the [3] M. M. Islam, N. Funabiki, M. Kuribayashi, S. K. Debnath, K. I.
dynamic delay optimization is confirmed. Munene, K. S. Lwin, R. W. Sudibyo, and M. S. A. Mamun,
“Dynamic accesspoint configuration approach for elastic wireless
local-area network system and its implementation using Raspberry
Pi,” Int. J. Netw. Comput., vol. 8, no. 2, pp. 254-281, July 2018.
[4] S. Pilosof, Ramachandran Ramjee, D. Raz, Y. Shavitt, Prasun Sinha,
“Understanding TCP fairness over wireless LAN,” Proc. IEEE
INFOCOM, April 2003.
[5] F. Nadeem, E. Leitgeb, M. S. Awan, and S. Chessa, “Comparing the
life time of terrestrial wireless sensor networks by employing hybrid
FSO/RF and only RF access networks,” Proc. Int. Conf. Wirel. Mobi.
Commun., pp. 134-139, 2009.
[6] T. Nandagopal, T. Kim, X. Gao, and V. Bharghavan, “Achieving
MAC layer fairness in wireless packet networks,” Proc. ACM Mobi.
2000, Aug. 2000.
[7] N. Blefari-melazzi, A. Detti, A. Ordine, and S. Salsano, “A
Figure 13. Observed TCP fairness index. mechanism to enforce TCP fairness in 802.11 wireless LANs and its
performance evaluation in a real test-bed,” Proc. World. Wirel. Mob.
Multi. Net., pp. 1-7, 2007.
V. CONCLUSION
[8] B. A. H. S. Abeysekera, T. Matsuda, and T. Takine, “Dynamic
In this paper, we proposed the TCP fairness control contention window control mechanism to achieve fairness between
method for two-host concurrent communications in the uplink and downlink flows in IEEE 802.11 wireless LANs,” IEEE
elastic WLAN system using Raspberry Pi AP. In future Trans. Wirel. Commun. vol. 7, no. 9, pp. 3517-3525, 2008.
works, we will implement the automatic function of setting [9] E. Park, D. Kim, H. Kim, and C. Choi, “A cross-layer approach for
per-station fairness in TCP over WLANs,” IEEE Trans. Mobi.
the host IP addresses, extend the proposal to concurrent Comput. vol. 7, no. 7, pp. 898-911, 2008.
communications of three or more hosts, and conduct
[10] K. Astrom and T. Hagglund, “PID controller: theory, design, and
experiments in various network fields and topologies. tuning,” 2nd Edition, Instrument Society of America, 1995.
[11] Iperf, The ultimate speed test tool for TCP, UDP and SCTP,
ACKNOWLEDGMENT https://iperf.fr/.
This work is partially supported by JSPS KAKENHI [12] Software Verzeichnis development, Homedale WLAN Monitor,
(16K00127). http:// www.the-sz.com/products/homedale.
[13] R. Jain, D. Chiu and W. Hawe, “A quantitative measure of fairness
REFERENCES and discrimination for resource allocation in shared computer
system,” East. Res. Lab. (DEC), vol. 38, 1984.
[1] B. P. Crow, I. Widjaja, J. G. Kim, and P. T. Sakai,“IEEE 802.11
wireless local area networks,” IEEE Commun. Mag., vol. 35, no. 9,
pp. 116-126, Sept. 1997.

80

You might also like