Effects of the use of an IEEE 802.11 Snoop Agent on TCP

Effects of the use of an IEEE 802.11 Snoop Agent
on TCP timeouts
Lucas Dias Palhão Mendes and José Marcos Câmara Brito
Abstract—The development of wireless networks can damage
networks Transport Layer operation. There has been much research
effort to solve these problems. One of the approaches is known as
Cross-Layer Design (CLD), where interactions between non-adjacent
layers, forbidden by the layered model, become possible. However,
CLD proposals must be carefully tested in order to discover if a
gain in one parameter does not result in a loss in any other. Thus,
we propose to test the influence of the use of a Cross-Layer Snoop
Agent on TCP timeouts. In order to perform this test, we have created
a Monte Carlo Simulator and we have presented, in this work, the
algorithm followed in its implementation. Also, we have used our
analysis to propose an equation to predict the TCP Throughput in the
considered scenario, achieving results that agree with the simulated
ones. Finally, we have concluded that the use of the Snoop Agent
increases TCP Throughput, decreasing TCP timeout probability as
well.
Keywords—Cross-Layer Design; IEEE 802.11; Monte Carlo Simulator; TCP Throughput Prediction; Wireless TCP.
I. I NTRODUCTION
ACH day, more wireless devices become part of networks around the world. Every different technology, like
Worldwide Interoperability for Microwave Access (WiMAX),
Wi-Fi, Universal Mobile Telecommunications System (UMTS),
and many others, must deal with an increasing number of
challenges. First of all, they must provide user access to the
Internet at growing speeds, accepting new users without losing
quality. Also, they must interoperate in a transparent manner
from the users’ side. In this scenario, we can see that extensive
research to improve these technologies is necessary.
One popular technology used in Wireless Local Area Networks (WLANs) is the IEEE 802.11, also known as Wi-Fi. It is
also an example of the growing demand for faster transmission
rates — in its first version (1997), the transmission rate was
1 Mbit/s, but in its n-Draft (2009), it can achieve up to 600
Mbit/s.
Despite the evolution of wireless technologies, the Transport
Network has not been evolving at the same pace. Approximately 85% of the traffic is still carried by the Transmission
Control Protocol (TCP). TCP network throughput can be
severely degraded by channel errors, which trigger its congestion control procedures. In [1], Choi et al. have considered
a TCP network over IEEE 802.11, where the number of
transmitting TCP stations was maximized by prioritizing the
transmission of TCP ACKs. Also, Cheng and Lin [2] have
used TCP over IEEE 802.11 to propose the enhanced selective
E
Lucas Dias Palhão Mendes is with the National Institute of Telecommunications, Inatel, Santa Rita do Sapucaı́ - MG - Brazil, email: [email protected]
José Marcos Câmara Brito is with the National Institute of Telecommunications, Inatel, Santa Rita do Sapucaı́ - MG - Brazil, email: [email protected]
negative acknowledgment (SNACK-S), a scheme to enhance
TCP throughput.
One of the current research trends to overcome TCP
throughput degradation on wireless channels is Cross-Layer
Design (CLD). This kind of design is as subject to deployment
problems as well-known solutions, according to Foukalas et
al. [3], however it has proven to achieve better gains, what
makes these solutions worth further research to overcome these
deployment difficulties. One example of CLD is the work
proposed by Ravichandran et al. [4]. Considering the use of
TCP over IEEE 802.11, they have used Wi-Fi frame reserved
fields to perform loss notifications. Thus, TCP throughput was
increased since the TCP congestion control mechanism was
not triggered due to channel errors.
Given that the use of CLD can result in gains but deployment problems may occur, in this work we propose to
test the impact of the Cross-Layer Snoop Agent proposed by
Kliazovich and Granelli in [5] on TCP timeouts in an IEEE
802.11 network. We also present the algorithm we have used
to implement our Monte Carlo Simulator and a new equation
to estimate TCP throughput.
The remainder of this paper is organized as follows. Next
section shows the tested system and the parameters considered.
A new equation to estimate TCP Throughput in our topology,
when using the Snoop Agent, is derived in section III. Our
simulations and results are presented and discussed in Section
IV. Finally, we present our conclusion in Section V.
II. S YSTEM D ESCRIPTION
In order to test the effects of the insertion of the Snoop
Agent proposed by Kliazovich and Granelli in [5], we have
used the network model presented in Fig. 1.
Fig. 1.
Two mobile nodes connected by an IEEE 802.11 link.
A TCP session is established between the two nodes, and
each TCP/IP packet is sent in an IEEE 802.11 frame through
the wireless medium. We have considered that interleaving is
_____________________________________
978-1-4244-5852-3/10/$26.00 ©2010 IEEE
493
used to randomize channel burst errors. Thus, the frame error
probability is considered to have a Binomial distribution.
A. TCP/IP Parameters
We have considered that the TCP source has infinite data
to send. This data will be divided in 1 kB pieces, which will
result in 1040 bytes TCP/IP packets, including headers.
Also, in order to calculate the retransmission timeout (RTO)
timer, we have followed the algorithm in RFC 2988 [6].
However, since we are considering a transmission between
only two mobile nodes, the minimum RTO of 1 second is
ignored to make the behavior of the TCP variables visible. This
will not affect our conclusions because in real networks there
are wired sections that will increase the packets round-trip
times (RTTs) to values greater than 1 second. The maximum
RTO was set to 64 seconds.
D. Monte Carlo Simulator
We have developed a Monte Carlo Simulator to investigate
the effects of the insertion of the Snoop Agent on the TCP
timeouts. Moreover, we have used the simulator to study the
behavior of the network when there are channel errors. Our
simulator is based on Algorithm 1. When the Snoop Agent
is not used, the CalculateDelays(ber, PHY, TxRate) procedure
includes the time to transmit the packet through one IEEE
802.11 connection and the time to transmit the TCP ACK
through another connection. When the Snoop Agent is used,
CalculateDelays(ber, PHY, TxRate) procedure includes only
the time to transmit the packet through one connection, since
the TCP ACK will be generated at the source node by the
Snoop Agent.
input : The transmission rate T xRate, the PHY
scheme P HY in use, and the bit error
probability ber.
output: The network throughput B, the timeout
probability T oP rob, and the last values of
SRT T , RT T V AR and RT O, which are
updated every time
FirstRTOCalculation(PacketTimer)
or UpdateRTO(PacketTimer) are invoked.
B. IEEE 802.11 Parameters
We have chosen to use the orthogonal frequency division
multiplexing (OFDM) physical layer (PHY) with 20 MHz
channel spacing, which is the most adopted IEEE 802.11
technology currently in use, and also achieves the highest
transmission rate — 54 Mbit/s. Also, we have used the
distributed coordination function (DCF) mode, the same mode
used in Kliazovich’s work [5].
We summarize, in Table I, the IEEE 802.11 parameters used.
Their meaning can be found in the IEEE 802.11 Standard [7].
PacketTimer ←
CalculateWiFiBackoff(PHY);
PacketTimer ← PacketTimer +
CalculateDelays(ber,PHY,TxRate);
FirstRTOCalculation(PacketTimer);
TotalTime ← PacketTimer;
PacketTimer ← 0;
PacketCounter ← 0;
timeouts ← 0;
for i ← 1 to 2500000 do
PacketTimer ←
CalculateWiFiBackoff(PHY);
PacketTimer ← PacketTimer +
CalculateDelays(ber,PHY,TxRate);
if PacketTimer < RTO then
UpdateRTO(PacketTimer);
PacketCounter ← PacketCounter +1;
end
else
RTO ← 2×RTO;
timeouts ← timeouts +1;
end
TotalTime ← TotalTime + PacketTimer;
PacketTimer ← 0;
end
B ← (PacketCounter ·8000)/TotalTime;
ToProb ← timeouts/2500000;
Algorithm 1: Algorithm followed in the Monte Carlo
simulations.
TABLE I
IEEE 802.11 PARAMETERS .
Parameter (Symbol)
Transmission Rate (R)
RTS Threshold
Short Retry Limit (SRCLimit)
Long Retry Limit (LRCLimit)
Slot Time
SIFS
DIFS
RTS transmission delay (r)
CTS transmission delay (c)
ACK transmission delay (a)
CTS Timeout (CT ST O )
ACK Timeout (ACKT O )
Transmission delay of a
frame containing a TCP/IP packet
Transmission delay of a
frame containing a TCP/IP ACK
Value
54Mbps
3000 octets
7 retries
4 retries
9μsec
16μsec
34μsec
2.963μsec
2.074μsec
2.074μsec
50μsec
50μsec
159.407μsec
11.259μsec
C. Snoop Agent
The Snoop Agent proposed by Kliazovich and Granelli in
[5] is placed in the mobile stations, between Transport and
Link Layers. After a packet is successfuly sent through the
wireless link, i.e., after the reception of the IEEE 802.11 ACK,
the Snoop Agent in the source node does not wait for the
TCP ACK to be transmitted back through the wireless link. It
generates a TCP ACK and delivers it to the Transport Layer,
which will reduce the packet RTT. On the destination side, the
TCP ACK generated by its Transport Layer will be discarded
by the Snoop Agent.
III. TCP T HROUGHPUT E STIMATION
In order to compare results with our Monte Carlo Simulator,
we have developed a probabilistic analysis of the use of
494
is the backoff random variable for retry number x. The
other variables were defined in Table I.
the Snoop Agent in our topology. Thus, we could derive an
equation to calculate the mean time to transmit a packet, and
finally, the TCP throughput.
In Fig. 2, we show the optimal flow of frames, i.e., when
there are no channel errors.
P0 = PeRT S = 1 − (1 − ber)RT Ssize
•
where P0 is the probability of successfully transmiting
0 frames — error in the first frame —, PeRT S is the
probability of occurence of an error at the RTS frame,
ber is the channel bit error rate, and RT Ssize is the size,
in bits, of an RTS frame — 160 bits.
When the CTS frame is corrupted:
T1 = TeCT S = bx + r + SIF S + c
Fig. 2.
•
•
•
The RTS frame is corrupted: The CTS will not be
generated by the receiver. After a CTS Timeout period
(defined in Table I), the transmission will start again from
the backoff procedure.
The CTS frame is corrupted: As soon as the CTS arrives
at the transmitter and an error is detected, the transmission starts again from the backoff procedure.
The data frame is corrupted: The ACK will not be
generated by the receiver. After an ACK Timeout period,
equal to CTS Timeout, the transmission will start again
from the backoff procedure.
The ACK frame is corrupted: As soon as the ACK
arrives at the transmitter and an error is detected, the
transmission starts again from the backoff procedure.
Every time the backoff procedure is invoked, its contention
window (CW) parameter increases. For OFDM, its minimum
and maximum values are 15 and 1023, respectively. CW
begins at its minumum value and, whenever a transmission
is unsuccessful, it increases in powers of two, minus one, i.e.,
15, 31, 63, 127, ... , 1023. When the maximum number of
retries is reached, the current frame is discarded, together with
all the frames that belong to the same packet [7]. In our case,
a packet of 1 kB fits in a single frame.
In order to calculate the mean packet transmission time,
we have to calculate the time spent to transmit the packet
in the occurence of each event mentioned and its occurence
probability. Thus, we have derived the following equations:
•
When the RTS frame is corrupted:
(3)
where T1 is the time spent to successfully transmit 1
frame — error in the second frame — and, TeCT S
is the time spent when the RTS frame is transmitted
successfully and an error occurs in the CTS frame. The
other variables were defined in Table I.
Optimal packet flow over the wireless link [7].
Considering a channel BER different from zero, errors
will corrupt one or more of the frames that are part of a
packet transmission. Every time a frame is corrupted, the
backoff procedure is invoked and the transmission starts again.
Moreover, counters are used to interrupt the retries when a
limit is reached.
When a frame is corrupted by errors, one of the following
may occur [7]:
•
(2)
P1
=
PeCT S = [(1 − ber)RT Ssize ] ·
·[1 − (1 − ber)CT Ssize ]
P1
•
=
(1 − ber)RT Ssize +
−(1 − ber)RT Ssize +CT Ssize
(4)
where P1 is the probability of successfully transmiting
1 frame — error in the second frame —, PeCT S is
the probability of no errors in the RTS frame and the
occurence of an error in the CTS frame, and CT Ssize is
the size, in bits, of a CTS frame — 112 bits.
When the data frame is corrupted:
T2 = TeDF
=
bx + r + SIF S + c + SIF S + f +
+ACKT O
(5)
where T2 is the time spent to successfully transmit 2
frames — error in the third frame — and, TeDF is the
time spent when the RTS and CTS frames are transmitted
successfully and an error occurs in the data frame. The
other variables were defined in Table I.
•
P2
=
PeDF = (1 − ber)RT Ssize +CT Ssize ·
·[1 − (1 − ber)DFsize ]
P2
=
(1 − ber)RT Ssize +CT Ssize +
−(1 − ber)RT Ssize +CT Ssize +DFsize
(6)
where P2 is the probability of successfully transmiting
2 frames — error in the third frame —, PeDF is the
probability of no errors in the RTS or CTS frames and
the occurence of an error in the data frame, and DFsize
is the size, in bits, of a data frame — 8608 bits in our
example with an 1 kB packet.
When the ACK is corrupted:
(1)
bx + r + SIF S + c + SIF S +
+f + SIF S + a
(7)
where T0 is the time spent to successfully transmit 0
frames — error in the first frame —, TeRT S is the time
spent when an error occurs in the RTS frame, and bx
where T3 is the time spent to successfully transmit 3
frames — error in the fourth frame — and, TeACK is
the time spent when the RTS, CTS and data frames are
T0 = TeRT S = bx + r + CT ST O
T3 = TeACK
495
=
transmitted successfully and an error occurs in the ACK
frame. The other variables were defined in Table I.
P3
P3
=
=
The probability of failing a packet transmission (more than
SRCLimit attempts) is given by
PeACK = (1 − ber)RT Ssize +CT Ssize +DFsize ·
·[1 − (1 − ber)ACKsize ]
P [N > 7]
(1 − ber)RT Ssize +CT Ssize +DFsize +
=
−(1 − ber)RT Ssize +CT Ssize +DFsize +ACKsize
(8)
•
where P3 is the probability of successfully transmiting
3 frames — error in the fourth frame —, PeACK is the
probability of no errors in the RTS, CTS or data frames
and the occurence of an error in the ACK frame, and
ACKsize is the size, in bits, of an ACK frame — 112
bits.
When no frames are corrupted:
T4 = Tc
=
=
where P4 is the probability of successfully transmiting
4 frames — no frame errors occur — and, Pc is the
probability of no errors in the RTS, CTS, data or ACK
frames.
As can be seen, the backoff random variable is part of all
the equations that compute delays. Since the backoff random
variable only depends on the number of retries, we redefine
the transmission delays as
T0b = T0 − bx
T1b = T1 − bx
E[TN =0 ]
=
(11)
and we include the random variable again later, when we
compute the average time to transmit packets.
The probability of a successfull packet transmission at the
N th retry is:
= P4
P [N = 1]
=
(P0 + P1 + P2 + P3 )i P4 (13)
E[TN =1 ]
=
+SlotT ime · E[b1 ] + T4b
E[TN =2 ]
=
DIF S + SlotT ime · {E[b0 ] + E[b1 ] +
..
.
E[TN =n ]
=
DIF S + SlotT ime ·
n
E[bi ] +
i=0
+n · Tatt + T4b
(14)
where Tatt is the average time spent on an unsuccessful
attempt, given by
T0b P0 + T1b P1 + T2b P2 + T3b P3
Tatt =
(15)
P0 + P1 + P2 + P3
Still, as we know the distribution of the backoff random
variable for each attempt, from the IEEE 802.11 Standard [7],
we can specify equation (14) for the PHY in use as
E[TN =n ]
=
DIF S + SlotT ime ·
n
(2i+3 − 1/2) +
i=0
+n · Tatt + T4b
(16)
Finally, we derive equation (17) to calculate the average
packet transmission delay as a function of the BER (shown
on the next page), and equation (18) to compute the average
throughput also as a function of the BER.
T CP Data
E[T ]
(18)
where T CP Data, in bits, was 8000 in our tests.
In equation (17), E[RT O] is the average retransmission
timer achieved by simulation, and the infinite sum has been
truncated at 1000 terms. The average values achieved for
10000 simulated transmission attempts are shown in Table II.
(P0 + P1 + P2 + P3 ) · P4
P [N = 2] = (P0 + P1 + P2 + P3 )2 · P4
..
.
P [N = n] = (P0 + P1 + P2 + P3 )n · P4
P [N = i] =
DIF S + SlotT ime · E[b0 ] + T4b
DIF S + SlotT ime · E[b0 ] + Tatt +
E[B] =
T2b = T2 − bx
T3b = T3 − bx
P [N = 0]
i=0
7
i=0
(9)
(1 − ber)RT Ssize · (1 − ber)CT Ssize ·
·(1 − ber)DFsize · (1 − ber)ACKsize
(10)
T4b = T4 − bx
1−
7
+E[b2 ]} + 2 · Tatt + T4b
where T4 is the time spent to successfully transmit 4
frames — no frame errors — and, Tc is the time spent
when the RTS, CTS, data and ACK frames are transmitted
successfully. We have the same time spent when an error
occurs in the ACK frame, however, when and ACK is
received correctly, the transmission is successful and the
next packet is transmitted.
P4 = Pc
1−
and in this case, a timeout occurs.
The average delay to transmit the packet at the N th retry
is:
bx + r + SIF S + c + SIF S +
+f + SIF S + a = T3
=
(12)
496
TABLE II
S IMULATED E[RT O].
BER
10−8
10−7
10−6
10−5
10−4
10−3
E[RT O]
462.066μsec
464.926μsec
482.150μsec
662.145μsec
4.439msec
64sec
E[T ] =
=
∞
i=0
7
E[TN =i ] · P [N = i] =
{E[TN =i ] · P [N = i]} +
i=0
∞
j
P [N > 7] ·
j=1
7
j−1
{E[TN =k ] · P [N = k]} + {(2
) · E[RT O]}
(17)
k=0
IV. S IMULATIONS AND R ESULTS
First, in Fig. 3, we show the average throughput of ten
simulation runs with 2500000 frame transmission attempts
each, using our Monte Carlo Simulator, with and without
the use of the Snoop Agent. Also, we depict the average
throughput with the use of the Snoop Agent calculated by
using equation (18).
Fig. 4.
TCP Timeout Probability.
BERs lower than 10−4 . Also, we have used our analysis to
propose a TCP throughput prediction equation, which has
showed to be accurate for BERs lower than 10−4 . Thus, we
have concluded that the Snoop Agent not only improves the
network throughput performance, but also reduces the TCP
timeout probability, which makes this proposal interesting to
be implemented and tested in real IEEE 802.11 networks.
Fig. 3.
TCP Throughput achieved by simulation and calculation.
From Fig. 3, we can see that the average throughput is
higher with the use of the Snoop Agent, which agrees with
Kliazovich’s conclusion in [5]. Also, it is possible to see that
our equation can precisely predict the TCP Throughput when
the Snoop Agent is used, from BERs of 10−8 to 10−5 .
Next, we present in Fig. 4, the average timeout probability
with and without the use of the Snoop Agent. We have
achieved these results using our Monte Carlo Simulator with
the same number of simulations and transmission attempts as
before.
As can be seen in Fig. 4, the use of the Snoop Agent can
reduce the timeout probability for the bers of 10−8 to 10−5 .
The results for the ber of 10−3 are not depicted to keep the
lower probabilities visible in Fig. 4. Their values are 0.9983
without the Snoop Agent and 0.9989 with it.
V. C ONCLUSION
R EFERENCES
[1] N. Choi, J. Ryu, Y. Seok, T. Kwon, and Y. Choi, “Optimizing aggregate
throughput of upstream TCP flows over IEEE 802.11 wireless LANs,”
in Proc. IEEE International Symposium on Personal, Indoor and Mobile
Radio Communications, no. 1, pp. 443–447, Sept. 2007.
[2] R.-S. Cheng and H.-T. Lin, “Improving TCP performance with bandwidth
estimation and selective negative acknowledgment in wireless networks,”
Journal of Communications and Networks, vol. 9, pp. 236–246, Sept.
2007.
[3] F. Foukalas, V. Gazis, and N. Alonistioti, “Cross-layer design proposals
for wireless mobile networks: A survey and taxonomy,” IEEE Communications Surveys and Tutorials, vol. 10, pp. 70–85, Jan. 2008.
[4] A. Ravichandran, M. Tacca, M. Welzl, and A. Fumagalli, “LN-MAC: A
cross-layer explicit loss notification solution for TCP over IEEE 802.11,”
in Proc. IEEE Global Telecommunications Conference, vol. 27, pp. 5313–
5317, Nov. 2008.
[5] D. Kliazovich and F. Granelli, “A cross-layer scheme for tcp performance
improvement in wireless LANs,” in Proc. IEEE Global Telecommunications Conference, no. 1, pp. 2074–2084, Dec. 2004.
[6] V. Paxon and M. Allman, “Computing TCP’s retransmission timer.” RFC
2988, Nov. 2000.
[7] “Part 11: Wireless LAN medium access control (MAC) and physical layer
(PHY) specifications.,” 2007.
Cross-Layer solutions must be thoroughly tested in order
to discover the effects of its use in networks. In Kliazovich’s
Snoop Agent proposal [5], TCP timeouts were not considered.
We have tested the effects of its use on TCP timeouts,
and we have found out that it reduces their occurence for
497