TCP and UDP Fairness in Vehicular Ad hoc Networks Forouzan Pirmohammadi 1, Mahmood Fathy 2, Hossein Ghaffarian 3 1 Islamic Azad University, Science and Research Branch, Tehran, Iran 2,3 School of Computer Engineering, Iran University of Science and Technology, Tehran, Iran Abstract In this paper, a new MAC based approach has been proposed to improve fairness in TCP and UDP flows in VANET. Since TCP has been developed for wired networks, in wireless networks, especially the ones based on IEEE 802.11 standard, it has fairness problems. The common proposed MAC based approaches, using a timer, have only worked on fairness improvement among TCP flows. UDP flows form major parts of network traffics. According to the lack of flow and congestion control mechanisms in UDP traffics, in our proposed approach, both types of traffic have been considered together. We add different amount of delay into packets, based on their types. The simulation results indicate fairness improvement in VANETs. Keywords VANET, TCP, UDP, MAC, Fairness. I. INTRODUCTION Transport control protocol (TCP) is one of the oldest as well as the most important protocols in computer networks. Together with UDP, they are the only protocols in layer 4 of TCP/IP network model. Having flow and congestion control mechanisms, reliable and in order segments delivery, in addition to satisfying different necessities of applications, TCP protocol has a major role in making efficient transportation in the networks. The shared transport media in wireless networks have made new problems in the world of networks. Old protocols, being developed and optimized for wired mediums, have faced efficiency decrease in the new media. TCP is one of the most obvious examples of these protocols. In different types of TCP, not receiving the acknowledge packet in specific time intervals is considered as segment loss due to the congestion. In response to the segment loss, the congestion control mechanism of TCP protocol gets activated and tries to reduce the amount of data sent by shrinking the sender window. By traffic reduction in the network, the congestion issue is rectified. The existence of the shared media in the wireless networks, contention based mechanism of IEEE802.11 MAC layer and the issues such as hidden nodes increase the collision possibility of the sent packets. Whereas network congestion is not necessarily indicated by packets collision, the TCP congestion control mechanism assumes the network is congested when the acknowledge message does not get delivered. 111 This matter leads to the decrease in the nodes send data rate, followed by fairness problems. To solve this issue, different approaches have been proposed trying to modify mechanisms in network layers 2 to 4 [1-10]. In this paper a MAC based approach is proposed to improve fairness in transport layer transmissions. While common MAC based approaches focus on adding timer in TCP data transport path, the proposed approach in this paper considers giving a timer to add delay before sending all TCP and UDP segments. The importance of this approach is that UDP forms a major part of the network traffics. UDP has not any control mechanisms. Not paying attention to it can impact the fairness improvement efforts. The comparison of the simulation results of the proposed approach with the standard and approaches controlling just TCP traffics verifies the proposed idea. The rest of this paper is organized as follow: section II discusses the related works. The proposed approach has been mentioned in section III and in section IV the simulation results have been given and analyzed. The paper conclusion is presented in section V. II. RELATED WORKS According to the importance of TCP traffic, so far different approaches have been proposed to improve fairness in IEEE 802.11 standard based wireless networks. From network layers point of view, these approaches can be divided into 4 different categories: physical layer based approaches, MAC based approaches, network layer based approaches and transport layer based approaches. In the physical layer, the proposed approach is changing the network transmission range. Such approach has been used in papers likes [1]. In the transport layer, the fairness problems are divided into two categories: lack of fairness issue in transport from a wireless node to another wireless node and in transport from a wireless node and the access point. In the first group which is more popular among researchers, lack of fairness issues in different TCP flows has been considered. The most popular approach in this group, proposed in papers like [1-4], is adding a timer to the MAC layer. The mentioned timer is responsible to add delay to the TCP packets before sending them; so that, the traffics of the other nodes get the chance to access the transport media.
Another approach of this group is to differentiate between TCP and UDP flows with the help of IEEE 802.11e standard which is used in [5]. For the first time, lack of fairness issue during communication between a wireless node and an access point has been investigated by [6]. Later, other researchers proposed some approaches for its resolution. This issue occurs when there is no enough bandwidth to send data in the network and at the same time lots of acknowledge messages are waiting in the access point buffer to be sent toward wireless nodes. Not receiving the acknowledge message in a specific time interval causes the TCP congestion control mechanism to be activated. In this case, since the acknowledgment is cumulative, deleting acknowledge packets with smaller acknowledge numbers [6-8] are proposed to improve the transport conditions. Using explicit congestion notification [9] is another used approach to solve this problem. Selecting parameters in the network layer can affect the fairness issue in the transport layer. It has been shown in researches likes [10] that choosing routing algorithms has direct impact on TCP behaviour in the networks with mobile nodes. In such networks due to the nodes mobility, the network topology changes continuously and re-routing to find new routes is required. While routing algorithms such as DSR and AODV react actively toward network topology changes and immediately look for alternative routes, algorithms such as DSDV are looking for new routes in periodic manner. In the transport layer, the main approach is changing the TCP congestion control mechanism. In [10] the impact of choosing Reno and Vegas TCPs on Fairness has been demonstrated. In [11] three general approaches to solve congestion issue have been proposed: modification of congestion control mechanism, utilizing information of intermediate nodes and implementing a new transport protocol which is not based on TCP. Algorithms like TCP DOOR [12] and ATP [13] are placed in the first group. In the second group, explicit congestion control mechanisms in RFC 3168 can be pointed. SCTP, introduced in RFC 2960, is belonging to the third group. Mobile Control Transport Protocol (MCTP), introduced in [10], is another member of the third group in which its congestion control mechanism is more complex and intelligent than TCP. III. THE PROPOSED APPROACH In [2] the authors have presented an approach based on adding a timer to MAC layer to improve fairness in sending packets containing TCP flows. Based on current packet transmission time, queue length and a random value to avoid making duplicate values, the value of their proposed timer is calculated. Their proposed method has only been considered regarding TCP flows. UDP flows, as inevitable part of network traffics, has been ignored in many researches. As there is no control on UDP flows, they can impact on the communication media of the network. To solve this issue, the proposed approach differentiates between the TCP and the UDP traffics. The value of the proposed timer in this paper is calculated as follows: T ( D D ) (1) TCP 1 2 T ( D D ) (2) UDP 1 2 where D 1 is the time needed to send current frame and D 2 is a random value. Coefficients α and β are weights of the delay values to distinguish the impact of each of the desired traffics. If α = β all traffics will face the similar delay. Although more delay provides more opportunities to access to the communication channel for other competitors, extra increasing delay will lead to losing channel access chances when there is no serious competitor in the network. Therefore, in this paper we try to reduce the proposed delay in [2] to overcome this problem. However, since the sent frames in the network have generally fixed length, adding delay D 2, as a random value, to D 1 can reduce simultaneous access and collision probability of the nodes to reach the channel. IV. SIMULATION RESULTS To investigate the performance of the proposed approach, we have used NS2 simulator. During the simulations, we have supposed that there are some vehicles standing in predefined positions. The vehicles communicate with Road side unite (RSU) directly or indirectly. We have supposed that two of these vehicles are sending information to an external server in the wired network. The wired links have 5Mbps bandwidth and 2ns propagation delay. Parameters of the simulations are presented in Table I. In addition, characteristics of the used traffics in the simulations are summarized in Table II. Unlike common strategy in the other works, in our scenarios, two connections are established with 2 seconds time difference after each other. It means that the second connection will try to access the channel while the first connection governs on that. In such situation, fairness is more critical than in the case with starting two connections simultaneously. 112
The first connection is TCP and the second one is TCP or UDP, based on the scenario. Frame length in both of traffics is 1000 bytes. Also, in default, IEEE 802.11a MAC layer is used in NS2. To make more differentiation between traffic types during the transportation, priority MAC policy is applied to the queues in the MAC layer. TABLE I PARAMETERS OF THE SIMULATIONS Parameters MAC type Queue type Queue length Routing algorithm Simulation area Communication range TCP traffic type UDP traffic type Packet size α β Value IEEE 802.11a Priority queue 50 packets DSDV 670 m *670 m 100 m FTP CBR 1000 Bytes 1 0/1/2/3 TABLE II CHARACTERISTICS OF THE USED TRAFFICS IN THE SIMULATIONS Parameters Start time End time Traffic type Connection 1 0.5 s 7.5 s TCP Connection 2 2.5 s 10.5 s TCP/UDP To investigate the proposed approach, we compare simulation results of 4 different modified approaches derived from our approach with the simulation results of the basic MAC of IEEE 802.11 standard. In the first modified approach, we only focus on adding delay to TCP traffics (α=1, β=0). In the other approaches, we add delay into UDP traffics too (α=1, β=1/2/3). There is no control mechanism in UDP, therefore we have used β values equal or larger than α in our simulations. A. First scenario In the first scenario, we have simulated an intersection with 4 vehicles. The vehicles are standing in the direct communication range of RSU. Figure 1 shows this scenario. Figure 2 shows the amount of received data, while using 2 TCP connections. Because of using α=1 in all of our approaches, transmission conditions is similar in all of them (see figure 2.b). a) Received data using 2 TCP connections and IEEE 802.11a b) Received data using 2 TCP connections and modified IEEE 802.11a Figure 1.simulated intersection in the first scenario 113 Figure 2: comparing results of two TCP connections in the first scenario In this scenario, all of the nodes are in the communication range of each other and RSU; therefore problems like hidden nodes do not exist in simulations. Comparing results of Figure 2.a and 2.b shows that by adding delay to the MAC, each node has more chance to send data before of losing its access to the channel. This is happened because of the effects of the added delay on the congestion control mechanism in TCP. Figure 3 shows the results of co-existence of TCP and UDP traffics. Data rate of UDP traffic is 2Mbps.
a) Received data using 2 TCP and UDP connections and IEEE 802.11a d) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=2) b) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=0) c) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=1) e) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=3) Figure 3: comparing results of two TCP and UDP connections in the first scenario Comparing results of Figure 3 shows that as we expect, adding delay to UDP traffics causes balancing and fairness in accessing to the channel for two traffics. Specially, by increasing the value of β, the TCP connection receives more chance to use the network (5 th second to 8 th second). In addition, the TCP connection has lost time for sending data in the first 3 seconds of simulations. This happens because of connection setup time in TCP and UDP starting time at 2.5 seconds after starting the simulations. B. Second scenario In this scenario, 6 vehicles are standing in a row with 100m inter distance between them. In addition, the RSU is placed in distance between the third and the forth vehicles. 114
In this scenario, the first and the last vehicles in the row try to send data to the external server over the wired network. The simulation parameters and traffic characteristics are remained as before. Figure 4 shows the placement of this scenario. b) Received data using 2 TCP connections and modified IEEE 802.11a Figure 4.simulated intersection in the second scenario Figure 5 shows the amount of received data in 2 TCP connections case. As shown in this figure, like Figure 2, adding delay in sending data causes sharper fluctuations during the time than the fluctuations of the standard. Figure 6 shows the received traffic of TCP and UDP connections. The data rate of UDP is 2Mbps. The results show that in this case, the added timer causes that the UDP traffic receives fair amount of bandwidth with respect to the TCP traffic. During the simulation, as results show, the UDP has lost its efficiency. This happens because of packet dropping in the intermediate nodes. The data rate of the UDP traffic is high; therefore, the buffers of the intermediate nodes have become full. In this case, adding delay to TCP traffic gives more chance to the UDP traffic for sending data. Figure 5: comparing results of two TCP connections in the second scenario a) Received data using 2 TCP and UDP connections and IEEE 802.11a a) Received data using 2 TCP connections and IEEE 802.11a b) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=0) 115
c) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=1) C. Third scenario Figure 6 shows the performance degradation in UDP traffic because of full queues and dropped packets. To proof our idea about this degradation, in the third scenario, we have decrease the rate of UDP traffic into 0.5Mbps. The results of the new simulations are prepared in Figure 7. As shown in this figure, because of low data rate of the UDP traffic, TCP receives more chance to access the network and sending data. During this time, the UDP traffic is stored in the buffers of the intermediate nodes without any packet loss. After finishing the TCP traffic, the stored UDP traffic captures the channel for a second (during 8 th and 9 th seconds) before the simulation end time. d) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=2) a) Received data using 2 TCP and UDP connections and IEEE 802.11a e) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=3) Figure 6: comparing results of two TCP and UDP connections in the second scenario b) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=0) 116
V. CONCLUSION In this paper, a new MAC based approach to improve fairness in transport layer data transmission is proposed. The proposed approach, against common approaches, focus on TCP and UDP simultaneously; because big portion of today s network traffic is UDP. In addition, UDP has no control mechanism. Therefore, UDP in shared transmission medium of wireless networks is a big challenge for TCP traffics. In the proposed approach, data traffics are disjoint into TCP and UDP. For each category, a separated timer is set. Simulation results show the efficiency of the proposed approach during co-existence of different traffic types simultaneously. c) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=1) d) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=2) e) Received data using 2 TCP and UDP connections and modified IEEE 802.11a (α=1, β=3) Figure 7: comparing results of two TCP and UDP connections in the third scenario REFERENCES [1] Rawat, D., Popescu, D., Yan, G., and Olariu, S. 2011. Enhancing VANET performance by joint adaptation of transmission power and contention window size, IEEE Transactions on Parallel and Distributed Systems, vol. 22, no. 9, pp. 1528 1535. [2] Yang, L., Seah, W. K., and Yin, Q. 2003. Improving fairness among TCP flows crossing wireless ad hoc and wired networks, The ACM International Symposium on Mobile Ad Hoc Networking and Computing, pp. 57 63. [3] Nandagopal, T., Kim, T. E., Gao, X., and Bharghavan, V. 2000. Achieving MAC Layer Fairness in Wireless Packet Networks, Annual ACM International Conference on Mobile Computing and Networking, pp. 87-98. [4] Dong, L., and Liu, Sh. 2010. Research on TCP Fairness Improvement over Wireless Ad Hoc Networks, Ninth International Symposium on Distributed Computing and applications to Business, Engineering and Science, pp. 293-296. [5] Rahim, A., Sher, M., Javed, A., Ahmad, I., and Hameed, R. 2008. Performance analysis of TCP in VANETs by using 802.11e, 16th IEEE International Conference on Networks (ICON), pp.1-3. [6] Pilosof, S., Ramjee, R., Raz, D., Shavitt, Y., and Sinha, P. 2003. Understanding TCP fairness over wireless LAN, IEEE INFOCOM, pp. 863-872. [7] Huang, J., Wang, J., and Ye, J. 2010. Buffer Allocation Management for Improving TCP Fairness in IEEE 802.11 WLANs, 6th International Conference on Wireless Communications Networking and Mobile Computing (WiCOM), pp. 1-4. [8] Yoo, J. Y., and Kim, J. W. 2009. Impact of TCP ACK Losses on TCP Fairness in Wireless Mesh Networks, IEEE Global Telecommunications Conference (GLOBECOM), pp. 1-6. [9] Huang, J., and Wang, J. 2009. An ECN-Based Congestion Control Algorithm for TCP Enhancement in WLAN, 11th IEEE International Conference on High Performance Computing and Communications, pp. 464-469. [10] Awdeh, R. 2007. Compatibility of TCP Reno and TCP Vegas in wireless ad hoc networks, IET Communications, vol. 1, issue 6, pp. 1187 1194. [11] Bechler, M., Jaap, S., and Wolf, L. 2005. An Optimized TCP for Internet Access of Vehicular Ad Hoc Networks, Lecture Notes in Computer Science, Volume 3462, pp. 869-880. 117
[12] Wang, F., and Zhang, Y. 2002. Improving TCP Performance over Mobile Ad-Hoc Networks with Out-of-Order Detection and Response, 3rd ACM International Symposium on Mobile Ad Hoc Networking & Computing, pp. 217 225. [13] Sundaresan, K., Anantharaman, V., Hsieh, H., and Sivakumar, R. 2005. ATP: A Reliable Transport Protocol for Ad-hoc Networks, IEEE Transactions on Mobile Computing, Vol. 4, No. 6, pp. 588 603. 118