Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Advanced Wireless Networks - 4G Technologies

.pdf
Скачиваний:
60
Добавлен:
17.08.2013
Размер:
21.94 Mб
Скачать

278 ADAPTIVE TCP LAYER

TCP1/14 hops

SH-TCP

TCP2/4 hops

M-TCP

M-TCP MH

Figure 9.6 Experimental M-TCP connection setup.

9.3.5 Performance examples

Experimental/simulation set up is shown in Figure 9.6. The system parameters are used as in [20]. The wireless link has capacity of 32 kbit. File transfer times for 500 K and 1 MB files (respectively) vs disconnection length is given in Figures 9.7 and 9.8. Latency and disconnection length were normally distributed random variables and the TCP sender was

Transfer time (s)

Transfer time (s)

1500

M-TCP TCP Optimal 500KFfile

NormalmeansMea

1000

500

0

 

 

 

 

 

 

 

1.5

2.0

2.5

3.0

3.5

4.0

4.5

 

 

 

Disconnection length (s)

 

 

2500

 

M-TCP

 

 

 

 

 

 

 

 

 

 

 

 

 

 

TCP

 

 

 

 

 

 

 

Optimalal

 

 

 

 

 

2000

1MBFilefile

 

 

 

 

 

 

NormalalmeansMea

 

 

 

 

 

1500

 

 

 

 

 

 

 

1000

 

 

 

 

 

 

 

500

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

1.5

2.0

2.5

3.0

3.5

4.0

4.5

Disconnection length (s)

Figure 9.7 M-TCP/TCP vs disconnection length performance – 5 hops TCP connection.

RANDOM EARLY DETECTION GATEWAYS FOR CONGESTION AVOIDANCE

279

 

800

 

 

 

 

 

 

 

700

 

 

 

 

 

 

 

600

 

 

 

 

 

 

(s)

500

 

 

 

 

 

 

time

 

 

 

 

 

 

400

 

 

 

 

 

 

Transfer

 

 

 

 

 

 

300

 

 

 

 

 

 

 

 

 

 

 

 

 

 

200

 

 

 

 

M-TCP

 

 

 

 

 

 

 

TCP

 

 

100

 

 

 

 

500 K file

 

 

 

 

 

 

 

Normal means

 

 

0

 

 

 

 

 

 

 

1.5

2.0

2.5

3.0

3.5

4.0

4.5

Disconnection length (s)

 

2000

 

 

 

 

 

 

 

 

1800

 

M-TCP

 

 

 

 

 

 

 

TCP

 

 

 

 

 

 

1600

1 MB file

 

 

 

 

 

 

Normal means

 

 

 

 

 

 

 

 

 

 

 

 

(s)

1400

 

 

 

 

 

 

 

1200

 

 

 

 

 

 

 

time

 

 

 

 

 

 

 

1000

 

 

 

 

 

 

 

Transfer

 

 

 

 

 

 

 

800

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

600

 

 

 

 

 

 

 

 

400

 

 

 

 

 

 

 

 

200

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

 

1.5

2.0

2.5

3.0

3.5

4.0

4.5

Disconnection length (s)

Figure 9.8 M-TCP/TCP vs disconnection length performance – 15 hops TCP connection.

five hops (Figure 9.7) and 15 hops (Figure 9.8) away. We can see that M-TCP offers better performance.

9.4 RANDOM EARLY DETECTION GATEWAYS FOR CONGESTION AVOIDANCE

In this section we discuss random early detection gateways for congestion avoidance in packet-switched networks [25]. RED gateways are designed to accompany a transport-layer congestion control protocol. The gateway detects incipient congestion by computing the average queue size. The gateway could notify connections of congestion either by dropping packets arriving at the gateway or by setting a bit in packet headers. When the average queue size exceeds a preset threshold, the gateway drops or marks each arriving packet with a certain probability, where the exact probability is a function of the average queue size.

280 ADAPTIVE TCP LAYER

Prior to RED, early random drop gateways have been studied as a method for providing congestion avoidance at the gateway. The initial works proposed gateways to monitor the average queue size to detect incipient congestion and to randomly drop packets when congestion is detected. RED gateways differ from the earlier early random drop gateways in several respects: (1) the literate queue size is measured; (2) the gateway is not limited to dropping packets; and (3) the packet-marking probability is a function of the average queue size.

With an even earlier version called random drop gateways, when a packet arrives at the gateway and the queue is full, the gateway randomly chooses a packet from the gateway queue to drop. In the implementation of early random drop gateways, if the queue length exceeds a certain drop level, then the gateway drops each packet arriving at the gateway with a fixed drop probability p. Even then, it was stressed that, in future implementations, the drop level and drop probability should be adjusted dynamically depending on network traffic. With drop tail gateways, each congestion period introduces global synchronization in the network. When the queue overflows, packets are often dropped from several connections, and these connections decrease their windows at the same time. This results in a loss of throughput at the gateway.

9.4.1 The RED algorithm

The RED gateway calculates the average queue sizeWq. The average queue size is compared with a minimum (Wq) and a maximum (Wq+) threshold. When the average queue size is less than the minimum threshold, no packets are marked. When the average queue size is greater than the maximum threshold, every arriving packet is marked. If marked packets are, in fact, dropped or if all source nodes are cooperative, this ensures that the average queue size does not significantly exceed the maximum threshold. When the average queue size is between the minimum and maximum thresholds, each arriving packet is marked with probability p0, where p0 is a function of the average queue size W q. Each time a packet is marked, the probability that a packet is marked from a particular connection is roughly proportional to that connection’s share of the bandwidth at the gateway.

Thus, the RED gateway has two separate algorithms. The algorithm for computing the average queue size determines the degree of burstiness that will be allowed in the gateway queue. The algorithm for calculating the packet-marking probability determines how frequently the gateway marks packets, given the current level of congestion. The goal is for the gateway to mark packets at fairly evenly spaced intervals, in order to avoid biases and avoid global synchronization, and to mark packets sufficiently frequently to control the average queue size.

The gateway’s calculations of the average queue size take into account the period when the queue is empty (the idle period) by estimating the number m of small packets that could have been transmitted by the gateway during the idle period. After the idle period, the gateway computes the average queue size as if m packets had arrived to an empty queue during that period. As Wq varies from Wqto Wq+, the packet-marking probability pb varies linearly from

0 to its maximum value P: pb P(Wq Wq)/(Wq+ Wq). The final packet-marking probability pa increases slowly as the count c increases since the last marked packet: pb

pb/ (1 cpb). This ensures that the gateway does not wait too long before marking a packet. The gateway marks each packet that arrives at the gateway when W q > Wq+.

RANDOM EARLY DETECTION GATEWAYS FOR CONGESTION AVOIDANCE

281

9.4.2 Performance example

In this section we pay attention on the impact of traffic bursteness on the system performance. Bursty traffic at the gateway can result from an FTP connection with a long delay–bandwidth product but a small window; a window of traffic will be sent, and then there will be a delay until the ACK packets return and another window of data can be sent. Variable-bit rate video traffic and some forms of interactive traffic are other examples of bursty traffic seen by the gateway. This section shows that, unlike drop tail or random drop gateways. RED gateways do not have a bias against bursty traffic. For simulation FTP connections with infinite data, small windows and small RTT are used to model the less bursty traffic and FTP connections with smaller windows and longer RTT to model the more bursty traffic, as shown in Figure 9.9. Connections 1–4 have a maximum window of 12 packets, while connection 5 has a maximum window of eight packets. Because node 5 has a large RTT and a small window, node 5 packets often arrive at the gateway in a loose cluster. By this, we mean that, considering only node 5 packets, there is one long inter-arrival time and many smaller inter-arrival times. The same simulation scenario is used for example in Floyd and Jacobson [25].

Figure 9.10 shows the simulation results of the network in Figure 9.7 with drop tail, random drop and RED gateways, respectively. The simulations in Figure 9.10 (a) and (b) were run with the buffer size ranging from eight to 22 packets. The simulations in Figure 9.10 (c) were run many times with a minimum threshold ranging from three to 14 packets and a buffer size ranging from 12 to 56 packets.

For Figure 9.10 (a) and (b), the x-axis shows the buffer size, and the y-axis shows node 5’s throughput as a percentage of the total throughput through the gateway. In these simulations, the concern is to examine the gateway’s bias against bursty traffic.

For the drop tail gateway, Figure 9.11(a) shows the average queue size (in packets) seen by arriving packets at the bottleneck gateway, and Figure 9.11(b) shows the average link utilization on the congested link. Because RED gateways are quite different from drop tail or random drop gateways, the gateways cannot be compared simply by comparing

FTP sources

5

45 Mbs

d5,6 = 16 ms

4

 

 

 

Gateway

 

3

6

7 Sink

 

45 Mbs

 

 

d6,7 = 2 ms

 

2

d(1,2,3,4),6 = 1 ms

100 Mbs

1

Figure 9.9 A simulation network with five FTP connections.

282 ADAPTIVE TCP LAYER

 

4

 

 

 

 

 

4

 

 

a - Drop tailTail

 

 

 

 

 

throughput (%)

3

 

 

 

 

throughput (%)

3

2

 

 

 

 

2

 

 

 

 

 

 

Node 5

 

 

 

 

 

Node 5

 

 

1

 

 

 

 

 

1

 

0

 

 

 

 

 

0

 

8

10

12

14

16

18

 

 

bb--RandomDdrop

 

 

 

 

8

10

12

14

16

18

Buffer size

Buffer size

 

4

 

 

 

 

 

c - RED

 

 

 

 

(%)

3

 

 

 

 

 

 

 

 

 

Node 5 throughput

2

 

 

 

 

 

 

 

 

 

 

1

 

 

 

 

 

0

 

 

 

 

 

4

6

8

10

12

Minimum threshold

Figure 9.10 Performance of drop tail, random drop and RED gateways.

the maximum queue size. A fair comparison is between a drop rail gateway and an RED gateway that maintains the same average queue size. With drop tail or random drop gateways, the queue is more likely to overflow when the queue contains some packets from node 5. In this case, with either random drop or drop tail gateways, node 5 packets have a disproportionate probability of being dropped; the queue contents when the queue overflows are not representative of the average queue contents. Figure 9.10 (c) shows the result of simulations with RED gateways. The x-axis shows Wq, and the y-axis shows node 5’s throughput. The throughput for node 5 is close to the maximum possible throughput given node 5’s round trip time and maximum window. The parameters for the RED gateway are as follows: Wq 1 ωq Wq + ωq W where ωq represents the time constant of the low pass averaging filter and W is the current value of the queue, ωq = 0.002 and P = 1/50 were

chosen. In addition Wq+ = 2Wq, and the buffer size (which ranges from 12 to 56 packets) is 4Wq.

9.5 TCP FOR MOBILE AD HOC NETWORKS

So far we have discussed in this chapter problems of TCP design when dealing with congestion, errors in the transmissions, and disconnections due to mobility and fading. Transport connections set up in wireless ad hoc networks are even further complicated by problems such as high bit error rates, frequent route changes, and partitions. If we run TCP over such

TCP FOR MOBILE AD HOC NETWORKS

283

 

15

 

 

 

 

 

 

 

queue (in packets)

10

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Average

5

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0

 

 

 

 

 

 

 

 

8

10

12

14

16

18

20

22

Buffer size

 

1.0

 

 

 

 

 

 

 

utilization

 

 

 

 

 

 

 

 

Average link

0.9

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

0.8

 

 

 

 

 

 

 

 

8

10

12

14

16

18

20

22

Buffer size

Figure 9.11 Drop tail gateway average queue length and link utilization.

connections, the throughput of the connection is observed to be extremely poor because TCP treats lost or delayed acknowledgments as congestion. In this section, we present an approach where a thin layer between Internet protocol and standard TCP is inserted that corrects these problems and maintains high end-to-end TCP throughput. This sublayer will be referred to as the ad-hoc TCP sublayer or A-TCP [26].

9.5.1 Effect of route recomputations

As we will see in Chapter 13, when an old route is no longer available, the network layer at the sender attempts to find a new route to the destination. In dynamic source routing (DSR) this is done via route discovery messages while in destination-sequenced distance-vectoring (DSDV) table exchanges are triggered that eventually result in a new route being found. It is possible that discovering a new route may take significantly longer than the RTO at the sender. As a result, the TCP sender times out, retransmits a packet, and invokes congestion control. Thus, when a new route is discovered, the throughput will continue to be small

284 ADAPTIVE TCP LAYER

for some time because TCP at the sender grows its congestion window using the slow start and congestion avoidance algorithm. This is again undesirable behavior because the TCP connection will be very inefficient. If we imagine a network in which route computations are done frequently (due to high node mobility), the TCP connection will never get an opportunity to transmit at the maximum negotiated rate (i.e. the congestion window will always be significantly smaller than the advertised window size from the receiver).

9.5.2 Effect of network partitions

It is likely that the ad hoc network may periodically get partitioned for several seconds at a time. If the sender and the receiver of a TCP connection lie in different partitions, all the sender’s packets get dropped by the network, resulting in the sender invoking congestion control. If the partition lasts for a significant amount of time (say, several times longer than the RTO), the situation gets even worse because of a phenomeon called serial timeouts. A serial timeout is a condition wherein multiple consecutive retransmissions of the same segment are transmitted to the receiver while it is disconnected from the sender. All these retransmissions are, thus, lost. Since the retransmission timer at the sender is doubled with each unsuccessful retransmission attempt (until it reaches 64 s), several consecutive failures can lead to inactivity lasting 1 or 2 minutes, even when the sender and receiver get reconnected.

9.5.3 Effect of multipath routing

As we will see in Chapter 13,some routing protocols, such as the temporally ordered routing algorithm (TORA) , maintain multiple routes between source destination pairs, the purpose of which is to minimize the frequency of route recomputation. Unfortunately, this sometimes results in a significant number of out-of-sequence packets arriving at the receiver. The effect of this is that the receiver generates duplicate ACKs which cause the sender (on receipt of three duplicate ACKs) to invoke congestion control.

The congestion window in TCP imposes an acceptable data rate for a particular connection based on congestion information that is derived from timeout events as well as from duplicate ACKs. In an ad hoc network, since routes change during the lifetime of a connection, we lose the relationship between the congestion window (CWND) size and the tolerable data rate for the route. In other words, the CWND as computed for one route may be too large for a newer route, resulting in network congestion when the sender transmits at the full rate allowed by the old CWND.

9.5.4 ATCP sublayer

The ATCP sublayer utilizes network layer feedback (from intermediate hops) to put the TCP sender into either a persist state, congestion control state or retransmit state. So, when the network is partitioned, the TCP sender is put into persist mode so that it does not needlessly transmit and retransmit packets. On the other hand, when packets are lost due to error (as opposed to congestion), the TCP sender retransmits packets without invoking congestion control. Finally, when the network is truly congested, the TCP sender invokes congestion control normally.

TCP FOR MOBILE AD HOC NETWORKS

285

We do not have to modify standard TCP itself when we want to maintain compatibility with the standard TCP/IP suite. Therefore, to implement this solution, we can insert a thin layer called ATCP (ad hoc TCP) between IP and TCP that listens to the network state information provided by ECN [27] messages and by ICMP ‘destination unreachable’ messages and then puts TCP at the sender into the appropriate state. Thus, on receipt of a ‘destination unreachable’ message, the TCP state at the sender is frozen (the sender enters the persist state) until a new route is found, ensuring that the sender does not invoke congestion control. Furthermore, the sender does not send packets into the network during the period when no route exists between the source and destination.

The ECN, which will be discussed later in more detail, is used as a mechanism by which the sender is notified of impending network congestion along the route followed by the TCP connection. On receipt of an ECN, the sender invokes congestion control without waiting for a timeout event (which may be caused, more often than not, due to lost packets). Thus, the benefits of A-TCP sublayer are:

Standard TCP/IP is unmodified.

ATCP is invisible to TCP and, therefore, nodes with and without ATCP can interoperate. The only drawback is that nodes without ATCP will see all the performance problems associated with running TCP over ad hoc networks.

ATCP does not interfere with TCPs functioning in cases where the TCP connection is between a node in the wireline network and another in the wireless ad hoc network.

There are in the literature papers dealing with different aspects of TCP problem in ad hoc networks. Holland and Vaidya [28], for example, investigate the impact of link breakage on TCP performance in such networks. They use dynamic source routing (DSR), discussed in Chapter 13 (see also Johnson and Maltz [29]), as the underlying routing protocol (simulated in NS2). DSR is an on-demand routing protocol where a sender finds a route to the destination by flooding route request packets. DSR’s performance is optimized by allowing intermediate nodes to respond to route request packets using cached routes. Unfortunately, if the cached information maintained at a intermediate node is stale, the time it takes to find a new route can be very long (several seconds). Thus, TCP running on top of DSR sees very poor throughput. The paper proposes the use of explicit link failure notification (ELFN) to improve TCP performance. Here, the TCP sender is notified that a link has failed, and it disables its retransmission timer and enters a stand-by mode. In stand-by mode, the TCP sender periodically sends a packet in its congestion window to the destination. When an ACK is received, TCP leaves the stand-by mode, restores its retransmission timers and resumes transmission as normal.

Chandran et al. [30] discusses a similar scheme for improving TCP performance in ad hoc networks in the presence of failures. Here, the router detecting a failed route generates a route failure notification (RFN) packet toward the source. The TCP source that receives this packet enters a snooze state which is very similar to TCP’s persist state. When the route is re-established, a route re-establishment notification (RRN) is sent to the source by any router on the previous route that detected the new route. This packet removes the source from the snooze state. In this method, the source continues using the old congestion window size for the new route. This is a problem because the congestion window size is route-specific (since it seeks to approximate the available bandwidth). Chandran et al. [30] also does not consider the effects of congestion, out-of-order packets and bit error.

286 ADAPTIVE TCP LAYER

9.5.5 ATCP protocol design

In this section we discuss the design of an ATCP that attempts to provide an integral solution to the problems of running TCP over multihop wireless networks. Such a protocol should have the following characteristics [26]:

(1)It should Improve TCP performance for connections set up in ad hoc wireless networks. As already discussed, TCP performance is affected by the problems of high BER and disconnections due to route recomputation or partition. In each of these cases, the TCP sender mistakenly invokes congestion control. A good protocol should provide only retransmissions for packets lost due to high BER, without shrinking the congestion window. Also, the sender should stop transmitting and resume when a new route has been found.the As above, in the case of transient partition, the sender should stop transmitting until it is reconnected to the receiver. In the case of multipath routing when TCP at the sender receives duplicate ACKs, it should not invoke congestion control because multipath routing shuffles the order in which packets are received.

(2)It should maintain TCP’s congestion control. If losses are caused due to network congestion, we want TCP to shrink its congestion window in response to losses and invoke slow start.

(3)It should have appropriate CWND. When there is a change in the route (e.g. a reconnection after a brief partition), the congestion window should be recomputed.

(4)It should maintain end-to-end TCP semantics in order to ensure that applications do not crash.

(5)It should be compatible with standard TCP because we cannot assume that all machines deployed in an ad hoc network will have ATCP installed.

The above functionalities are implemented within a separate sublayer, the ATCP, placed between the network and TCP layer in the protocol stack (TCP/ATCP/IP stack). This layer monitors the TCP state and the state of the network (based on ECN and ICMP messages) and takes appropriate action. Figure 9.12 illustrates ATCP’s four possible states: normal, congested, loss and disconnected. When the TCP connection is initially established, ATCP at the sender is in the normal state.

In this state, ATCP does nothing and is invisible. Let us now examine ATCP’s behavior under four circumstances.

9.5.5.1 Lossy channel

When the connection from the sender to the receiver is lossy, it is likely that some segments will not arrive at the receiver or may arrive out-of-order. Thus, the receiver may generate duplicate acknowledgment (ACKs) in response to out-of-sequence segments. When TCP receives three consecutive duplicate ACKs, it retransmits the appropriate segment and shrinks the congestion window. It is also possible that, due to lost ACKs, the TCP sender’s RTO may expire, causing it to retransmit one segment and invoke congestion control.

ATCP in its normal state counts the number of duplicate ACKs received for any segment. When it sees that three duplicate ACKs have been received, it does not forward the third

TCP FOR MOBILE AD HOC NETWORKS

287

 

 

 

 

 

 

 

 

 

 

 

TCP sender put

 

 

 

 

 

 

 

 

 

 

 

Receive dup ACK

 

 

 

 

 

 

 

in persist state

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

or packet from receiver

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Loss

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

New

 

 

 

 

 

 

 

 

 

 

 

ACK

 

 

 

 

 

 

 

 

 

 

 

 

RTO about

 

 

 

 

 

 

 

 

 

 

 

 

to expire OR

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3 dup ACKs

Disconnected

 

 

 

 

 

 

 

Normal

 

 

 

 

 

 

 

 

 

TCP transmits

 

 

 

 

 

 

 

 

 

 

 

a packet

Receive

 

 

 

 

 

 

 

 

Congested

‘destination

 

 

 

 

 

 

 

 

 

 

 

unreachable’

 

 

Receive

ICMP

 

 

 

 

 

ECN

CWND 1

 

 

 

 

 

 

 

 

 

 

 

Figure 9.12 State transition diagram for ATCP at the sender.

ATCP retransmits segments in TCP's buffer

duplicate ACK but puts TCP in persist mode. Similarly, when ATCP sees that TCP’s RTO is about to expire, it again puts TCP in persist mode. By doing this, we ensure that the TCP sender does not invoke congestion control because that is the wrong thing to do under these circumstances. After ATCP puts TCP in persist mode, ATCP enters the loss state. In the loss state, ATCP transmits the unacknowledged segments from TCP’s send buffer. It maintains its own separate timers to retransmit these segments in the event that ACKs are not forthcoming. Eventually, when a new ACK arrives (i.e. an ACK for a previously unacknowledged segment), ATCP forwards that ACK to TCP, which also removes TCP from persist mode. ATCP then returns to its normal state.

9.5.5.2 Congested

When the network detects congestion, the ECN flag is set in ACK and data packets. Let us assume that ATCP receives this message when in its normal state. ATCP moves into its congested state and does nothing. It ignores any duplicate ACKs that arrive and it also ignores imminent RTO expiration events. In other words, ATCP does not interfere with TCP’s normal congestion behavior. After TCP transmits a new segment, ATCP returns to its normal state.

9.5.5.3 Disconnected

Node mobility in ad hoc networks causes route recomputation or even temporary network partition. When this happens, we assume that the network generates an ICMP destination unreachable message in response to a packet transmission. When ATCP receives this