MEE 09: 17 MASTER THESIS REPORT MSc IN ELECTRICAL ENGINEERING WITH EMPHASIS ON TELECOMMUNICATION TRASMISSION CONTROL PROTOCOL (TCP) PERFORMANCE EVALUATION IN MANET BLEKINGE INSTITUTE OF TECHNOLOGY MARCH 2009 Author: Muhammad Ijaz m_ijazf@yahoo.com Supervisor & Examiner: Adrian Popescu adrian.popescu@bth.se 1 ACKNOWLEDGEMENT In the name of greatest All mighty ALLAH who has always bless me with potential knowledge and success. I am thankful to my supervisor Adrain Popescu, my friends who help me during my hard times when I need their assistance during simulation. I am especially thankful to my Parents, Uncles and Grandmother, who had always provided me the courage, strength, best wishes, moral and financial support during my whole career. I also have best regards for BTH faculty including Mikeal Åsman and Lena Magnusson who had been helpful throughout my maters degree. 2 Abstract Mobile Ad hoc network routing protocols have been divided in several different categories such as Reactive and Proactive Routing Protocol. The performances of these categories are evaluated in different scenario with TCP variants. We present a comprehensive TCP performance evaluation study to understand the nature of the TCP performance in different scenarios with variable amount of payload and number of nodes. The traffic consists of three different packet sizes i.e. 512, 1000, 1500 bytes each. Three different routing protocols (AODV, DSR and TORA) are to be evaluated with three different TCP variants (Tahoe, Reno and New Reno) in three different scenarios having 3, 5 and 8 nodes. The performances parameters on the basis of which routing protocols are to be graded are mainly throughput, congestion window and delay. Conclusions are drawn based on the simulation results and the comparisons between them have been elaborated. 3 LIST OF OBSERVATIONS ABR Associativity -Based Routing ACK Acknowledgement ALP Adaptive Link-State Protocol AODV Ad hoc On Demand Distance Vector BER Bit Error Rate CLR Clear CWND Congestion Window DAG Directed Acyclic Graph DREAM Distance Routing Effect Algorithm for Mobility DSDV Destination Sequence Distance Vector DSN Distance Sequence numbers DSR Dynamic Source Routing FORP Flow Oriented Routing Protocol FSR Fisheye State Routing GLS Grid Location Service GPS Global Positioning System GPSR Greedy Perimeter Stateless Routing GSR Global State Routing IEEE Institute of Electronics and Electrical Engineers IP Internet Protocol LAN Local Area Network LANMAR Landmark Ad Hoc Routing LAR Location-Aided Routing LMR Lightweight Mobile Routing LRR Least Resistance Routing MANET Mobile Ad hoc Network MAC Medium Access Control MDSR Multipath Dynamic Source Routing MSS Maximum Segment Size OLSR Optimized Link State Routing OPNET Optimized Network Evaluation Tool PHY Physical Layer RABR Route-Lifetime Assessment Based Routing 4 RERRs Route Errors RIP Routing Internet Protocol QRY Query RREQs Route Requests RREP Route Reply RTO Retransmission Time Out RDMAR Relative Distance Micro-discovery Ad Hoc Routing ROAM Routing On demand Acyclic Multipath RWND Advertize Window SSA Signal Stability-Based Adaptive STAR Source Tree Adaptive Routing SWND Send Window TCP Transmission Control Protocol TORA Temporally Ordered Routing Algorithm TTL Time-To-Live UDP User Datagram Protocol WRP Wireless Routing Protocol ZHLS Zone-Based Hierarchical Link State 5 LIST OF FIGURES FIGURE Figure 2.1 Figure 2.2 Figure 3.1 Figure 3.2 Figure 3.3 DESCRIPTION Slow Start and Congestion Avoidance Mechanism Hidden and Exposed Node Terminal Problem Route discovery for target node Maintenance for Error Route Route Discoveries in TORA – QRY Message Figure 3.4 Route Discoveries in TORA – Update Message 26 Figure 4.1 Figure 5.1 Figure 5.2 Figure 5.3 Figure 5.4 Figure 5.5 Figure 5.6 Figure 5.7 Figure 5.8 Research Methodology Simulation Model MANET eight node scenarios Simulation Flow 30 32 33 34 36 37 38 39 40 Throughput comparison in three nodes scenario Throughput comparison in five nodes scenario Throughput comparison in eight nodes scenario Delay Comparisons in Different Scenario Congestion Window dynamics PAGE 15 18 23 24 26 LIST OF TABLES TABLE Table 5.1 DESCRIPTION Detail of TCP Variants and Routing Protocol for Three Nodes PAGE 35 Table 5.2 Detail of TCP Variants and Routing Protocol for Five 36 Table 5.3 Detail of TCP Variants and Routing Protocol for Eight Nodes 37 6 LIST OF CONTENTS CHAPTER 1 1.1 1.2 1.3 1.4 1.5 Introduction Background Aims/ Objectives Research Questions Thesis Structure Expected Contribution 11 11 11 11 11 CHAPTER 2 2.1 2.1.1 2.1.2 2.2 2.2.1 2.2.2 2.2.2.1 2.2.2.2 2.2.2.3 2.3 2.3.1 2.3.2 2.3.3 2.3.4 2.3.5 2.3.6 2.3.7 TCP and Ad hoc Networks 12 Types of Wireless Networks Infrastructure Networks Ad hoc Networks TCP working mechanism and Variants of TCP Working Mechanism of TCP Various Flavor of TCP Tahoe Reno New Reno Challenges and Limitation of TCP in Wireless Network Dynamic Topology/Mobility Multi Hopping Differentiating Transmission and Congestion Losses High Bit Errors Channel Contention Hidden and exposed terminal problem Out of Order Packet 13 13 13 14 14 15 15 16 16 16 16 17 17 17 17 18 19 CHAPTER 3 3.1 3.2 3.2.1 3.2.2 3.2.3 Ad hoc Network Routing Protocols 20 Proactive routing protocols Reactive routing protocols Dynamic Source Routing (DSR) Ad hoc on Demand Distance Vector (AODV) Temporarily Order Routing Algorithm (TORA) 22 22 23 24 25 CHAPTER 4 4.1 4.2 4.3 4.3.1 4.3.2 4.3.3 4.3.4 4.4 Research Methodology 28 Research Methodology Author Approach Research Design Problem Selection / Identification Literature Review for TCP and MANET Building Simulation Environment Simulation Results Simulation Tools 29 29 29 29 29 30 30 30 9 7 CHAPTER 5 5.1 5.1.1 5.1.2 5.1.3 5.1.3.1 5.1.3.2 5.1.3.3 5.1.3.4 5.1.3.5 5.2 5.3 5.4 Simulation and Empirical Study 31 Simulation Environment Model OPNET Network Entities and Functions Application Definition Profile Configuration Mobility Configuration Server Mobile Nodes Simulation Configuration Simulation Flow Scenarios 32 32 32 32 33 33 33 33 33 33 33 34 CHAPTER 6 6.1 6.2 Discussion/ Results 42 Conclusions Future Work 43 43 Appendix 44 Reference 60 8 Chapter 1 INTRODUCTION 9 1.1 Background Internet evolution thrives with time and development in the diverse technology improvements. Communication devices and medium have significant impact on overall internet. Numerous networks mixtures are present at the internet and even within these networks different preposition and parametric approaches for implementations are deployed subject organization needs. Overall internet traffic is somehow dependent upon underlying networks and vice versa. To cope with multiple simultaneous data networks internet requires and efficient algorithmic techniques to support data transmission successfully. Transmission Control Protocol/Internet Protocol (TCP/IP) has been very effective in data transmission delivery and have also developed variants to possess the possibility to increase performance and multiple packet loss recovery. An important aspect form [1] defines the data flow method that applications are responsible for the selection of the protocols and IP plays a central role all TCP and user datagram protocol (UDP) for data transmission. TCP is reliable and connection oriented protocol developed in 1981. It’s based on simple sliding window flow control, during the early stages congestion collapses occurred because of lack of congestion control mechanism. With the advent of Jacobson congestion algorithms for TCP as a remedy, TCP is updated to its new version known as TCP Tahoe. Now currently TCP Reno is widely used in Internet. TCP Tahoe congestion Control includes slow start, congestion avoidance and fast retransmission. While in addition to these three algorithms, TCP Reno also adds the fast recovery algorithm. TCP is design for wired network, but with the technology emerging towards wireless medium, the need to implement TCP is of great important but it faces many problems especially in an ad hoc networks. Mobile ad hoc network (MANET) is a famous ad hoc network can be utilized well for emergency situation and military applications. TCP has poor performance in MANTE due to dynamic topology, shared medium, high error ratio; channel connotation and multi hop architecture. As an evident, ad hoc networks are growing dynamically and its true development fact lies in the problems associated with the seamless internet access and connectivity. With evolution in the hardware devices and software that offers wireless access to the internet by means of an intermediate connection through access point ad hoc tends to improve and increase gradually. Mobile ad hoc network is sub field with enormous commercial, industrial and military growth and realistic practical approach for internet access. Most important things to know about the technology is the ability of autonomously establishing and managing the network [2] while the an effective military consensus applications, data exchange based on mobility networks for commercial purpose i.e. business organization or it could be better utilized during emergency within and out of remote areas. This IP based dynamic wireless networks works effectively, reliable and robust data transmissions. Problems are associated with in the MANET performance, an evaluation and optimization techniques are necessary to opt and adhere for the better execution of the transmission medium. Pledged data delivery is TCP utmost drawback in wireless networks but possible solutions are available to recognize the data transmission effects. To measure the performance of different TCP variants, simulation study has been conducted in practice. MANET utilizes TCP and UDP for data transmission and our study focus on different variants of the TCP i.e. particularly Tahoe, Reno and New Reno explicitly using AODV, DSR and TORA protocols in focus. 10 1.2 Aims/ Objectives Thesis aims to understand the performance of the TCP variants in MANET and its behavior with respect to different protocols. It focuses following issues in the thesis: Detail literature study for “state of the art” technology in TCP and MANET. Performance comparison in delay and throughput by increasing number of nodes. Performance comparison between the different protocols used in MANET through congestion window, delay and throughput. Suggest better protocol and TCP variant for MANET. 1.3 Research Questions Q1: Q2: Q3: Q4: What are different TCP variants and its need? What are important routing protocols used in MANET? What is the impact on TCP performance during different protocol selection/ implementation in MANET? Which factors influence the TCP performance and why? 1.4 Thesis Structure Chapter 2 defines wireless networks and an extension to ad hoc networks and its working, it also include the detail study about the TCP flavors and its limitations. Chapter 3 is associated with the study of MANET routing protocols specific to ad hoc networks, their types, working and algorithms. Chapter 4 depicts the overall project flow explicitly starting form problem definition and following it towards solution, implementation, simulation and results hierarchy. Chapter 5 contains simulation environment description, list of figures and assumptions. Chapter 6 holds the brief discussion about the simulation results and future work. 1.5 Expected Contribution The thesis will address the scientific society about the TCP and MANET implementations in reality. It will contribute through using multiple different numbers of nodes to describe the behavior of the TCP performance over different variants; it should reveal the idea to developing commercial and non commercial business project for MANET deployments and the results in reality should have utmost significance. 11 Chapter 2 TCP AND AD HOC NETWORKS 12 In this chapter first to discuss the taxonomy of wireless networks such is infrastructure networks and ad hoc networks or infrastructure-less networks. Then before to discuss the different challenges transmission control protocol (TCP) is facing in wireless networks, it is better to give a look to the TCP working mechanism and its different variants. 2.1. Types of Wireless Networks One of the unique features of wireless networks is compare to wire network is that data is transmitted from one point to another through wireless links i.e. there is no need of wired link between the two nodes for transmission. They just need to be in the transmission range of each other. Wireless networks or divided into two categories. Infrastructure wireless network and infrastructure less or ad hoc wireless network. 2.1.1. Infrastructure Networks Infrastructure network have fixed network topology. Wireless nodes connect through the fixed point known as base station or access point. In most cases the access point or base station or connected to the main network through wired link. The base station, or access point, is one of the important elements in such types of networks. All of the wireless connections must pass from the base station. Whenever a node is in the range of several base stations then it connect to any one of them on the bases of some criteria [3]. 2.1.2. Ad hoc Networks Ad hoc networks also called infrastructure less networks are complex distributed systems consist of wireless links between the nodes and each node also works as a router to forwards the data on behalf of other nodes. The nodes are free to join or left the network without any restriction. Thus the networks have no permanent infrastructure. In ad hoc networks the nodes can be stationary or mobile. Therefore one can say that ad hoc networks basically have two forms, one is static ad hoc networks (SANET) and the other one is called mobile ad hoc networks (MANET). From the introduction of new technologies such as IEEE 802.11[4] the commercial implementation of ad hoc network becomes possible [5]. One of the good features of such networks is the flexibility and can be deployed very easily. Thus it is suitable for the emergency situation. But on the other side it is also very difficult to handle the operation of ad hoc networks. Each node is responsible to handle its operation 13 independently. Topology changes are very frequent and thus there will be need of an efficient routing protocol, whose construction is a complex task. TCP performances are also very poor in mobile ad hoc network. In coming sections we are discussing the TCP working mechanism and challenges for TCP in ad hoc networks in more detail. 2.2 TCP working mechanism and Variants of TCP Transmission Control Protocol (TCP) [6] is a Transport Layer Protocol and originally designed for wired network in 1981. The basic responsibility of TCP is to provide reliable transfer of data between the nodes i.e. to ensure that the data is reached the destination correctly without any loss or damage. The data is transmitted in the form of continuous stream of octets. The mechanism is adopted to assign a sequence number to each octet of data and receiver respond with positive acknowledgement to ensure that the data is received correctly. Another aspect of TCP is the tree way handshakes mechanism to establish a connection between the end points (nodes). In case if there are two or more TCP connection between the end points for this TCP uses the port assignment mechanism to differentiate each connection from others. 2.2.1 Working Mechanism of TCP The congestion control algorithm employed by TCP is window based. It uses three types of windows called congestion window (cwnd), advertize window (rwnd) and send window (swnd). Congestion windows shows the total amount of data the sender is allowed to output to the network without any Acknowledgement (ACK). While on the other hand the advertise window indicates the amount of data the receiver is ready to accept. It is equal to the available buffer size on the receiver. Now the size of the flight window or send window is set to the minimum of the congestion window and advertize window. Basically the congestion control mechanism has two phases the slow start and congestion avoidance phase. When a connection is established the initial size of congestion window is set to One MSS (Maximum Segment Size). Receiving data from the sender the receiver ACK the reception of data to the sender, the receiver is actually indicating the sequence number of next expected data segment in ACK, from this the sender conclude that all the data segments which have sequence number less than the indicated one are delivered correctly. While in case of packet loss, out-of-order packets arrive at the receiver. Then the receiver sends a duplicate 14 ACK to the sender in response of each out-of-order packet arrival. When sender receives three duplicates ACK, it is concluded that the packet is lost and retransmission of data packet take place. Slow Start threshold Slow Start threshold Time out Occured 24 22 20 Congestion Window 18 16 14 Congestion Avoidance Phase 12 Slow Start 10 8 6 4 2 0 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 Number of Acknowledgement Figure 2.1 Slow Start and Congestion Avoidance Mechanism [10] If sender receives non-duplicate ACK Then the congestion window is incremented. In slow start phase exponential incrimination occurs until it reaches to the slow start threshold. While in congestion avoidance phase the cwnd is incremented by one packet. This window growth is limited to a maximum window size. This whole process is depicted in Fig. 2.1. 2.2.2. Various Flavor of TCP After the introduction of first version of TCP several different flavors exist, here we are discussing the most famous implementation of TCP called Tahoe, Reno, New Reno and Vegas. 2.2.2.1. Tahoe In the first version of TCP there was no congestion control mechanism. So after observing the congestion collapses 1988 Jacobson introduced several Congestion Control algorithms [7] and this version is called TCP-Tahoe. The congestion control algorithms introduced in this version are: 15 a) Slow start b) Congestion Avoidance c) Fast Retransmit 2.2.2.2. Reno The fast retransmit phase was first introduced in TCP-Tahoe followed by Slow Start. But TCP-Reno [8] also added the algorithm of Fast Recovery, so that Fast Recovery dictates the sender to perform congestion avoidance directly after fast retransmission rather than immediately reducing the data flow using slow start mechanism. 2.2.2.3. New Reno TCP Reno recovers only one lost packet during the recovery process. So TCP-New Reno [9] is just adding the capability to TCP Reno to deals with multiple packets losses to recovery in a single transmission window. 2.3. Challenges and Limitation of TCP in Wireless Network As compare to wired network wireless network have some special characteristic such as Mobility, share medium and signal fading. All these factors are responsible to create different types of challenges that restrict the range, data rate and reliability of the wireless transmission. These challenges are as follow. 2.3.1. Dynamic Topology/Mobility In contrast to wired network, in wireless ad hoc networks the devices are free to move which leads to frequent topology changes. Then two types of problem occurrence are possible [11]. (a) Path loss (b) Network Partition Path loss leads to the path re-computation at sender side and during this phase there will be no transmission which ultimately causes throughput degradation. Another possibility during this phase is that if path re-computation take more time then may be retransmission time out (RTO) occurs. Thus there will be data retransmission, RTO is increased exponentially and TCP enter to slow start phase. This affect will be more serious in high 16 mobility environment. In case of network partition the sender and receiver remains at different network and all the packets will be dropped. In such situation multiple consecutive transmission of the same segment are possible, while the receiver will be disconnected and it is called serial time out. 2.3.2. Multi-hoping In Ad hoc Network Environment every node is also supporting the responsibility of router to forwards packets on behalf of other nodes. Thus longer flow, in since of hops, having longer round trip time and higher packet dropping probability and high fluctuating end-to-end throughput as compare to flow having small number of hops. 2.3.3.Differentiating Transmission and Congestion Losses Since wireless network have open medium, signal passing through the medium they have to face different blockage such as building, due to these blockages the transmission signals are reflected, diffracted and scattered and thus causes packets loss. TCP assume that this loss is occurred due to congestion and it activate its congestion control and result in congestion window reduction, which leads to low throughput and low utilization of available bandwidth. So TCP has no such mechanism to differentiate between congestion losses and transmission losses. 2.3.4 High Bit Errors In wired network the Bit Error Rate (BER) is ranging from 10-6 to 10-8, while in wireless network this range is from 10-3 to 10-1. Since due to high BER the packet losses are very frequent and TCP reaction to these losses reduces the congestion window. Thus leads to nonoptimal performance [10]. 2.3.5 Channel Contention Another reason of TCP performance degradation is the channel contention due to increasing number of nodes. It can occur between different flows passing through the same vicinity or between different packets in the same flow. In IEEE802.11, when the number of try for channel access exceeds the predefined limit, then cause to drop the packets and the Medium Access Control (MAC) Protocol notifies (wrongly) the upper layer that the path is 17 unavailable. In response the upper layer starts the route recovery procedure [12] and TCP stop its transmission and the throughput drop to zero during route recovery process. This channel contention also leads to unfairness problem. The unfairness also occurs between the nodes so that each node has or not the equal access to the medium as compare to other node. If there is no equal access to the medium for each node then the unfairness occurs between the flows passing from different nodes. This unfairness also happens among the flows passing from the same path. 2.3.6 Hidden and exposed terminal problem Due to the share medium and multi hoping capability the nodes facing the hidden and exposed node problem. Fig: 2.2 representing the hidden and exposed terminal problem of IEEE 802.11 standard. The circles show the transmission range of A and B, where C is in the transmission range of both A and B. Let A and B both want to transmit data to C, so there will be collision at C, because A and B do not know about the transmission of each other due to hidden node problem. Figure 2.2: Hidden and Exposed Node Terminal Problem Now let that there is a transmission between C and B, while at the same time A wants to transmit data to D, but when A senses the medium, it find that the medium is busy due to C transmission and thus A stops its transmission. Actually in this situation A transmission for D will not going to collide with C transmission, This problem exist in IEEE802.11 standard and known as exposed terminal problem. 18 2.3.7 Out of Order Packet When a receiver receives out of order packets, the receiver transmits duplicate acknowledgement, after receiving three duplicate ACK the sender retransmit the packets and congestion control is activated. But the problem is that congestion control is activated wrongly most of the time, because out-of-order packet occurrence take place due to different reasons such as multipath routing protocol and rout failure and not only due to congestion. 19 Chapter 3 Ad hoc Network Routing Protocols 20 In this chapter routing protocols are described. In general route means the way and protocol is the set of rules through which two or more devices (computers, mobile nodes) are communicating with each others. Routes are multi hop in ad hoc networks because the propagation range (250 meters in an open field) of wireless radio is limited. Nodes travel freely and randomly in the network and routes are often find connection or disconnection. Establishing strong routes, maintaining and reconstruction in time are the main task for routing protocols. All the above responsibilities are performed by the routing protocol, except generating excessive control message overhead. Data packets send efficiently must be utilized by control packets and be generated only when needed. Routing protocol efficiency in bandwidth and energy consumption could be made by reducing the control overhead. [13] In generally mobile ad hoc wireless networks routing protocols can be classified by their routing strategy. Pure distance vector algorithms (e.g., Distributed Bellman Ford, Routing Internet Protocol (RIP), etc.) do not give a good result in mobile networks because of some limitation. Then some new protocols were proposed to modify and enhance the distance vector algorithm. Protocols such as Wireless Routing Protocol (WRP), Least Resistance Routing (LRR), Destination Sequence Distance Vector (DSDV) routing protocol, and the protocol by Lin and Liu. The protocols which are based on link state algorithms. Theses protocols include Global State Routing (GSR), Landmark Ad Hoc Routing (LANMAR) protocol, Optimized Link State Routing (OLSR) protocol, Adaptive Link-State Protocol (ALP), Fisheye State Routing (FSR) protocol, and Source Tree Adaptive Routing (STAR) protocol. The third one is on-demand routing protocols which are planned only for ad hoc network. Route to every destination of the networks on a regular basis is not maintained by on-demand routing protocols. The source establishes routes on demand. The source floods a route request packet to construct a route when it needed. The destination use route selection algorithm and select the best route for which destination receives request. Then route reply packet is sent to the source through new best route. There is no requirements of periodic exchange of route tables and control traffic overhead is greatly reduce by on-demand routing protocols. Several protocols of this type have been propose d. Ad-Hoc On Demand Distance Vector (AODV) 21 routing, Dynamic Source Routing (DSR), Lightweight Mobile Routing (LMR), Temporarily Ordered Routing Algorithm (TORA), Route-Lifetime Assessment Based Routing (RABR), Associativity-Based Routing (ABR), Relative Distance Microdiscovery Ad Hoc Routing (RDMAR) protocol, Signal Stability-Based Adaptive (SSA) routing, Multipath Dynamic Source Routing (MDSR), and Routing On demand Acyclic Multipath (ROAM) algorithm are on demand routing protocol. The fourth category is GPS (Global Positioning System), in the early stages protocols was using node location information while building routes have been proposed recently. Through information node position, routing can require more cost to exchange location information. GPS routing protocols are Greedy Perimeter Stateless Routing (GPSR), Distance Routing Effect Algorithm for Mobility (DREAM), Grid Location Service (GLS), Location-Aided Routing (LAR), Flow Oriented Routing Protocol (FORP), and Zone-Based Hierarchical Link State (ZHLS). In addition we can say routing protocols are categorized as reactive, proactive and hybrid (combination of both is called hybrid). [13] 3.1 Proactive Routing Protocols This type of protocols has to construct and maintain fresh routing information to all the nodes. This is free of whether or not the route is needed. For this achievement control message are transmitted periodically. Proactive routing protocols are not bandwidth well-organize. Even if there is no data flow, the control message is broadcasted. This type of protocols has some advantages and disadvantages. One of the main advantages is that nodes can get easily routing information and easy to set up a session. The disadvantage is: There is too much data kept by the nodes for route protection and restructure is slow when there is a failure in exacting link. DSDV is an example of proactive routing protocol. 3.2 Reactive Routing Protocols Reactive routing protocols are specially planned for ad hoc networks. Permanent routing information is not kept by these protocols. Routes are built when the source needed. Route request is sending across the network to achieve this. In reactive routing protocols we describe in detail DSR (Dynamic Source Routing) protocol, AODV (Ad Hoc On-demand Distance Vector) protocol, and TORA (Temporally Ordered Routing Algorithm) protocol. [13] 22 3.2.1 Dynamic Source Routing (DSR) DSR was developed at Carnegie Mellon University. It is simple and efficient reactive routing protocol which is specially designed for multi-hop ad hoc network of mobile nodes. The nodes in the network easily join or leave the network without any information. The network using DSR is not requiring existing network infrastructure or administration. The node desiring to transmit a packet define route for the packet because it is based on source routing. DSR works for ad-hoc network of approximately 200 nodes. Each node participating in adhoc network should forward packets and discard the erroneous packets (corrupted). DSR has two mechanisms: route discovery and route maintenance. [13] Route discovery The source starts a route discovery when sending data packet to the destination but have no routing information. To set up a route, the source floods RREQs message with a distinctive request ID. When the destination receives this request message or a node which has destination route information then it transmits RREP message back to the source with route information. Figure 3.1 shows route discovery of DSR. Node 2 is the initiator and node 9 is the target. Figure 3.1: Route discovery for target node, [19] Route Maintenance In LAN routing the main improvement of DSR is in route maintenance and monitoring in the attendance of mobility. DSR based on the acknowledgments of data packets sent to adjacent nodes to monitors the validity of existing routes. This monitoring is achieved by inactively listening for communication of the adjacent to the next hop or sitting a bit in a packet to ask for open acknowledgment. The RERRs packet is sent to the creative sender to raise a new route discovery stage when a node fails to accept an acknowledgment. Nodes receive a REERs message remove any route entry (from their route cache) which uses the out of order link. 23 When a node has problem transferring packet during that link then REER message is propagated. So this selective transmission reduces control overhead (if no packets pass through a link), it yields a long delay when a packet wants to go through a new link. [13]. Node 9 cannot be reached by node 6 anymore and a REER is returned to node 2. Figure 3.2: Maintenance for Error Route, [19] DSR main advantages are that it reduce routing overhead and does not need to discover routes to all the nodes in the network. The disadvantage of DSR is low mobility and static networks. Its performance is reduced by high mobility. 3.2.2 Ad Hoc On-demand Distance Vector (AODV) The Ad hoc On-Demand Distance Vector (AODV) is a routing protocol. AODV is designed for ad hoc mobile networks and of both routing, that is unicast and multicast routing. AODV establish routes between different nodes as needed by source nodes. AODV maintain these routes as well as form trees which connect different multicast group members. The group members compose the trees and the members are connected by the nodes. In an ad hoc network when two nodes want to make a connection with each other, AODV enable multihop routes within the nodes. Ad hoc On-demand distance vector is free loop. DSN (Distance Sequence numbers) is used by the AODV to avoid counting to infinity, and this is one of the most important quality and feature of this algorithm. In a network the requested nodes send the DSN with other routing information from the source to the destination. It has also the feature to select optional route which is based on the sequence number. [14] There are three messages which are defined by AODV. These messages are Route Errors (RERRs), Route Request (RREQs) and Route Replies (RREPs). [15]. 24 For discovering and maintaining routes in the network these three messages are used, by using UDP packets from source to destination. A node uses its IP address as the source address in the IP header of a message when it request for a route, and for broadcast 255.255.255.255. In the ad hoc network the number of hops a particular routing message is determined by the TTL (Time-To-Live). The RREQ is broadcasted by the requested node when a route is needed to be created to the destination. When the next hop node received the message a new route is determined, or itself by the destination [16]. Routes of the PREQ from the originator to all the stations that receive message are cached in these stations. A RERR message is delivered or generated when there is a failure in the link. The message has all the important information about the node which is not reachable because of the failure. The IP address of the nodes is also mentioned in the message as the next hop for the destination. AODV is table based. All the information about the routes in the network is stored in this table. The routing table has the following entries i.e. DSN, flag, next hop, IP address, State, hop count, the list of precursors, Life time and network interface. 3.2.3 Temporally Ordered Routing Algorithm (TORA) TORA is a reactive routing algorithm based on the conception of link reversal and used in MANETs to improve the scalability. Highly dynamic mobile ad hoc networks can be used by TORA. It is an adaptive routing protocol and used in multi-hop networks. It makes scaled routes between source and destination and Directed Acyclic Graph (DAG) is used to build in the destination node. A DAG is accomplished for the network by handing over each node i with a height metric i.e. hi. Directional from the link i to j means hi > hi . The height of the node in TORA is defined as quintuple, which contains the unique ID of the node, a propagation ordering parameter, the logical time of a link failure, a reflection indicator bit and a unique ID of the node which defines the new reference level. The first two values identify an offset with respect to the reference level and the last three values jointly represent the reference level. A data packet goes from up flow to down flow according the height difference between nodes. TORA has the capacity that many nodes can send packets to a given destination is provided by DAG. It also guarantees that all routes are loop free. There are three basic functions in TORA, [17 and 20]. Route Creation Route maintenance 25 Route erasure A route creation operation start all the nodes height is set to NULL i.e. (-,-,-,-,i) and destination is set to ZERO i.e. (0,0,0,0,dest). The nodes height is flexible according to the topology. A QRY message containing the destination’s ID is broadcasted by the source. A non-NULL height node responds with UPD packet containing its own height. With the reception of UPD packet, a node increment its height with one than that of the UPD generator. The higher height of a node is measured as up flow and lower height of a node is measured as down flow. Then the DAG from source to destination is constructed. Route maintenance operation is a main part of TORA. It has an exclusive quality that control message are contained into a small set of nods near the happening of topology changes. A node generates a new reference level and broadcasts the reference to its neighbours when it loses its last down flow link. Then the links reproduce the topology change and adjust to the new reference level. The route erasure operation in TORA floods CLR packets through the network and remove unacceptable routes, [18]. Figure 3.3 Route Discoveries in TORA – QRY Message In this figure node A shows and node B shows destination. Node D and node G is one hop neighbours away from the destination. So they will propagate updates as shown in next figure. Figure 3.4 Route Discoveries in TORA – Update Message 26 The algorithm [21], contains many flows with most severe in which algorithm extremely depend upon the numbers of nodes during initial stage, which causes dependence on the traffic requirement. It is measured as change in rate with regard to total number of nodes participating in network traffic. In case of gradually positive increase in the network volume, TORA is not considered as better solution. 27 Chapter 4 Research Methodology 28 4.1 Research Methodology It illustrates the overall thesis work to be carried out in as in the form of research activity. It generalizes the understanding about author concept in developing multiple steps or stages for whole work. Creswell [22] enlighten two major form of research i.e. quantitative and qualitative. Quantitative research is carried out by means of inquiry strategies including certain experiments and simulations which produce some form of statistical data for analysis or decisions. Qualitative research is based on the researcher knowledge through participatory and /or constructive perspectives. 4.2 Author approach Thesis is carried out through multiple stages starting form literature review about the state of art technology specific to TCP and MANET and then performing the simulation in OPNET v14.5 tool. So both molds of approaches are necessary to complete the thesis work and have been administered. 4.3 Research Design Author believes that the most of the time is spent in identifying and selecting the problem and conduction literature review. It is also vital to determine that simulation tool also requires some time during configuration and simulation, as results are often indispensable. Author divided the overall research into four stages. 4.3.1 Problem Selection / Identification In problem selection stage author adhere to only MANET and TCP as focus area of research interest. Problem has been selected in consideration to data performance issues in MANET due to wireless nature of the network. 4.3.2 Literature Review for TCP and MANET It is necessary to conduct literature study for understand basic and expertise concept regarding TCP variants, Ad hoc networks, MANET protocols and related work. OPNET simulator study is also important to develop the scenario, run simulation and collect result. 29 Internet State of art Real Problem Technology Evolution State of art study Literature Review of TCP and MANET Problem Identification and Selection Author Interest Performance Analysis Graph Results Building Scenario Protocol Selection Problem Simulation Implementation Simulation Results Tool Selection Assumption and Conclusions Books TCP Variant Selection Figure 4.1 Tool Configuration Research Methodology 4.3.3 Building Simulation Environment This stage is critical to understand as it exhibit deep understanding of how and why these specific nodes and protocols are chosen. Also it conceptually accelerates the whole simulation work efficiently and smoothly. 4.3.4 Simulation Results The last stage is to grasp the relevant results of interest for research study. Simulation graph results consist of TCP performance for Tahoe, Reno and New Reno relative to each selectable MANET protocol i.e. AODV, DSR and TORA. 4.4 Simulation Tool OPNET is selected as it offer easy graphical interface, possibility to develop and run this simulation environment, validity of the simulation results and the tools is highly reliable, robust and efficient. Another factor of choosing OPNET is the author’s familiarity and trust over the tool. 30 Chapter 5 Simulation and Empirical Study 31 5.1 Simulation Environment This section is the major portion of the thesis, it is important to setup simulation environment to observer TCP behavior over MANET. Quantitative analysis is conducted to with the help of OPNET tool. 5.1.1 Model Actual problems are simulated through computers by modeling design for actual systems and theoretical described systems, simulations are executed through computers for the collection of relative informational results. Learning by doing [23], is a primary concept about systems in study which requires modeling and operating them. Model Design Execution Analysis Model Execution Figure 5.1: Simulation Model, [23] 5.1.2 OPNET Optimized Network Evaluation Tool (OPNET version 14.5) modeler is used in for simulation network design and execution. OPNET technologies Inc [24], offers drag and drop communication devices, maximum technologies, multiple protocols and virtual environment for simulation. 5.1.3 Network Entities and Functions Simulation network model contain important entities as depicted in the figure below: 32 Figure 5.2 5.1.3.1 MANET eight node scenarios Application Definition In our thesis, this module has been configured to achieve the desired results. Basically we administer application name as FTP_Application and made necessary configurations, [Appendix]. 5.1.3.2 Profile Configuration In this configuration I set the profile name with start time offset and starts time, [Appendix]. 5.1.3.3 Mobility Configuration This module is required to produce the mobility options for the mobile nodes; I have set default random waypoint and adjusted some parameters, [Appendix]. 5.1.3.4 Server This module controls the traffic for MANET, protocol selection and TCP flavor has been selected through this module, [Appendix]. 5.1.3.5 Mobile Nodes I have set the mobility options; dynamically allocate the IP addresses to all mobile nodes including server as well as different routing protocols, [Appendix]. 5.2 Simulation Configuration A detail configure is described in [Appendix]. 5.3 Simulation Flow Step by step approach is used to keep the simulation flow clear and easy. Following model for simulation flow is drawn. 33 Apply Configuration and Statistics MANET Network design Running/ Executing Simulation Collecting Results Figure 5.3: Simulation Flow MANET network is designed for the simulating the model and configuration statistics are applied on the whole model separately and the with regard to each individual scenario. Simulation is executed multiple times to obtain accurate results describe in each scenario. Results from each scenario are gathered as graphs and stored in .jpg files to further use in the thesis report. Some graphs were plotted one over another and with different protocol selections and TCP flavors to observe the require statistics. 5.4 Scenarios The results obtained during the simulation are depicted in this area. In simulation there are three type of different scenarios based on the number of nodes. Mainly we are concern with throughput of each variant of TCP and to find out which variants out perform with what type of routing protocol. To keep clear analysis let us consider each scenario separately, starting from the three node scenario. Three nodes Scenario The table 5.1 shows the detail of routing protocol and TCP variants in three nodes scenario. Without these three nodes there is a fixed node which working as source. A connection has been established from each node to transfer a file of the same size over each connection. Then to find out that which variants of TCP perform well and what was the underlying protocol. 34 Table5.1 Detail of TCP Variants and Routing Protocol for Three Nodes THROUGHPUT/ DELAY/ CONGESTION WINDOW MEASUREMENT Stages A A A B B B C C C TCP Variants New Reno New Reno New Reno Reno Reno Reno Tahoe Tahoe Tahoe Protocol AODV DSR TORA AODV DSR TORA AODV DSR TORA Number of nodes 3 3 3 3 3 3 3 3 3 Speed of Nodes m/s 10 10 10 10 10 10 10 10 10 Throughput From figure 5.4, by looking at the throughput performance between AODV and DSR at approximately 25 seconds, AODV has better throughput performance over DSR. Comparing AODV with TORA at the approximation of 95 sec, AODV provides better throughput performance, in all the three graphs. Total time consumed by each protocol for send the data through New Reno, Reno and Tahoe is relatively smaller for AODV followed by DSR and than TORA. It means that TORA has worst throughput performance in each of the three cases for MANET 3 nodes.The cause behind the TORA less performance is considered as the reality of TORA working for route recreation, maintenance and erasure, if dropping of the route occurs, which requires more time and have bad impact in the data performance. 35 A B C Figure 5.4: Throughput comparison in three nodes scenario Five Nodes Scenario. For five nodes scenario the detail of different protocols as shown in Table 5.2. There are five nodes working as clients to establish connection with a fixed node working as source, and to transfer a file of the same size over each connection. Table5.2 Detail of TCP Variants and Routing Protocol for Five Nodes THROUGHPUT/ DELAY/ CONGESTION WINDOW MEASUREMENT Stages A A A B B B C C C TCP Variants New Reno New Reno New Reno Reno Reno Reno Tahoe Tahoe Tahoe Protocol AODV DSR TORA AODV DSR TORA AODV DSR TORA Number of nodes 5 5 5 5 5 5 5 5 5 Speed of Nodes m/s 10 10 10 10 10 10 10 10 10 Throughput Form figure 5.5, comparing all the three graphs with each other I have more or less same assumption as for node three scenario, but when comparing figure 5.5 with figure 5.4, we observe that as the number of the nodes are increased approximately 75% (3 to 5), throughput has been decreased for every TCP variant and each desired protocols. 36 A B C Figure 5.5: Throughput comparison in five nodes scenario Eight Nodes Scenario Different protocols evaluated in this scenario are listed in Table 5.3. Like other scenario depending on the number of clients eight simultaneous connections has been established with a fixed source to download a file of the same size over each connection. Table5.3 Detail of TCP Variants and Routing Protocol for Eight Nodes THROUGHPUT/ DELAY/ CONGESTION WINDOW MEASUREMENT Stages A A A B B B C C C TCP Variants New Reno New Reno New Reno Reno Reno Reno Tahoe Tahoe Tahoe Protocol AODV DSR TORA AODV DSR TORA AODV DSR TORA Number of nodes 8 8 8 8 8 8 8 8 8 Speed of Nodes m/s 10 10 10 10 10 10 10 10 10 Throughput From figure 5.6, we conclude that the graph behavior remains same and the assumption made for figure 5.4 are also acknowledgeable. Further we observe that the AODV have the higher throughput in the start in all the three figures (5.4, 5.5, and 5.6) as compared to the DSR and TORA. A small change has been observed in the number of data packets when nodes are increased to 8 in figure 5.6. The highest number of data packets are reduces from approximately 750 to 575, which means that if more and more nodes are added in MANET, 37 throughput will reduce. Similarly TORA takes more time when the numbers of nodes are increased to 8, as compared to 3 nodes and 5 nodes. A B C Table 5.6 Throughput comparison in eight nodes scenario Assumptions It has been concluded that throughput performance of DSR and TORA are minutely affected with increase in the number of nodes and due to mobility. In general, MANET could have dynamic number of nodes connectivity in mobility, so it’s important to realize that when the number of nodes is higher, DSR and TORA would be avoided. AODV has better throughput performance shown in all three figures as compared to DSR and TORA and is the best solution for MANET. However simulation results for AODV with respect to New Reno, Reno and Tahoe depict that throughput is the same in all the cases, so our proposed solution in this case will be New Reno as it offers multiple packet loss recovery. Delay Figure 5.7 hold the simulation results of each and every TCP variant with respect different routing protocols all together. With three node scenario, TORA has the highest delay as compared to DSR and AODV which validate our simulation results. With 5 node and 8 node scenario, TORA and DSR have approximately same delay, which is not considered as a good perception in wireless networks, as we encounter numerous losses and delays due to SNR, reflection, diffraction and inter symbol interference, so the delay measure is considered highly sensitive. AODV on the other hand have similar delay for 9 results, it maybe because the high resolution graph will show us small difference in each graph subject to 3, 5 and 8 nodes respectively. 38 1 2 3 4 5 6 7 8 9 Figure 5.7 Delay Comparisons in Different Scenario 39 Congestion Window Figure 5.8 hold 6 graphs define earlier for all the simulated scenarios; there are much dissimilarity within each set of variants and routing protocols. Considering 3 node scenario, congestion window of TORA reaches to the maximum of 160,000 bytes and will remain there which depicts that the exponential increase in the congestion window leads to the delay and lower performance, as there are not enough space in the buffer to manage incoming data and the window remains constant. 1 2 3 4 5 6 Figure 2.8 Congestion Window dynamics Secondly, DSR have different results in all the six cases, variations for congestion window are found approximately between 65,000 bytes to 80,000 except for case 3, where it had reached around 11,000 bytes. So it’s likely to know that DSR congestion window is quite uncertain 40 and its use in the MANET network will have severe results. Congestion window will ultimately influence throughput and delay parameters important for the performance evaluation. Third protocol, AODV have similar results during individual 3 nodes and 5 nodes (New Reno, Reno and Tahoe). It explicitly defines that AODV has the formal behavior of TCP as within the normal networks. The congestion window is dynamically increasing and decreasing after receiving reply for the receiver. It is however not much clear whether it doubles the size of the congestion window after each successful data packet transmission or not, but the behavior of the graph exactly resembles with the actual TCP congestion window graph with increase and decrease. We suggest AODV as the best possible solution and recommendation for MANET. 41 Chapter 6 Discussions/ Results 42 6.1 Conclusion The overall research has been conducted in the well organized way as defined in chapter 4. Research questions 1 and 2 defined in chapter 1 are answered through state of art study and literature review. Research question 3 and four are based on the simulation results and explanations. We adhere to the simulation results as an evident that TCP variants have minor affect on the overall results except in few cases defined earlier, but the major dependence lies on MANET routing protocols. Simulation observation based on AODV, DSR and TORA clearly describe us about the performance evaluation through measuring throughput, delay and congestion window that the best routing protocol for MANET is AODV. 6.2 Future Work As I have selected these numerous MANET routing protocols of interest by simulation in an OPNET tool, another possibility of doing the same work can be done through another tool like NS-2. Also, selection of other routing protocols can be use for the performance evaluation or other parameters of performance could be considered for simulation. 43 Appendix: Simulation Steps Open the OPNET simulator. Click on File and select New then click ok Enter name to project and scenario then click ok. Select Create empty scenario and click Next 44 Select Campus Network then Click Next X span: 1000 Y span: 1000 Units : Meters then Click Next Select the Technology (MANET) then Click Next 45 Now Click Finish From object Palette Tree select one by one Application Config, Profile Config, Mobility Config, Wlan_Server (Fixd Node) and Wlan_wkstn (Mobile node) with the requirements of the user. 46 Drag all these object one by one in the working area. Right Click on Application Config, profile Config, mobility Config and Server to set their name. 47 Click Ok 1 Application Configuration Right Click on Application Config then Edit Attributes and configure the Application. 48 49 At last Click Ok 2 Profile Configurations Right Click on Profile Config then Edit Attributes and configure the Profile. 50 Select all Nodes and Server Click on Protocol menu IP Addressing AutoAssign IPv4 Address. Select all Nodes and Server Right Click on Server Edit Attributes Select ADHOC Routing Protocol .e.g. AODV. In TCP Select the Parameters e.g. Tahoe. Tick Apply to Selected Objects Ok 51 3 Server Configurations Right Click on Server Edit Attributes Application set Application Supported Services and Click Ok. 52 4 Mobile Node Configurations Select all Nodes Right Click on one Edit Attributes. Click on Applications Application: Destination Preferences and set some parameters. Click on Application: Supported Profiles and set some values Tick Apply to Selected Objects. Click Ok. 53 54 5 Click Topology menu Select Random Mobility set Mobility Profile Click Continue Click Ok. 6 Mobility Configurations Right Click on Mobility Config Edit Attributes Click Default Random Waypoint Click Random Waypoint Parameters. Click OK. 55 7 Save the Project. 8 Click DES Menus Click DES or Right Click on work area and select Individual Statistics. 56 Expand Node Statistics a) Expand TCP Connection and Tick the Congestion Window Size (byte). Right Click on it then choose Change Collection Mode then Tick Advance and Select All Values then Click Ok. b) Expand Wireless Lan Tick Delay (sec) and Throughput (bit/sec) then Right Click on both one by one and select Change Collection Mode then Tick Advance and Select All Values then Click Ok. 9 Run the Project Click on DES menu Select Configure/Run Discrete Event Simulation ….ctrl+R. Here you can set Time in Weeks, Days, Hours, Minuets, and Seconds. Then Click Run. 57 When Simulation is Completed then Click Close. 58 10 Show the Result Click on DES menu or Right Click on Work area then Select Results then View result 59 References: [1] http://www.ietf.org/rfc/rfc1180.txt [2] http://www.ietf.org/rfc/rfc2501.txt [3] K. Leung and Vivtor O.K. Li, “Transmission Control Protocol (TCP) in wireless Networks: issues, approaches and challenges,” IEEE Communications Survey, Vol. 8 No. 4, pp. 64-79, 4th October 2006 [4] IEEE Standard 802.11, Wireless LAN Medium Access Control (MAC) and Physical Layer (PHY) Specifications, June 2007 [5] A. A. Hanbali, E. Altman, and P. Nain, “A Survey of TCP over Ad Hoc Networks,” IEEE Communication. Surveys and Tutorials, Vol. 7, No. 3, 3rd Quarter 2005, [6] J. Postal,”Transmission Control Protocol”, Request for comments, RFC 793, September 1981. [7] V. Jacobson, “Congestion avoidance and control,” in: Proceedings of ACM SIGCOMM, pp. 314-29, 1988. [8] Allman, V. Paxson, and W. Stevens, “TCP Congestion Control,” Request for Comments, RFC 2581, Network Working Group, Internet Engineering Task Force, April. 1999. [9] Jany Hoe: S. Floyd and T. Henderson, “The NewReno Modification to TCP's Fast Recovery Algorithm,” RFC 2582, Network Working Group, Internet Engineering Task Force, April. 1999. [10] D. Kliazovich, F. Granelli, “C3TCP: Cross-layer congestion control in ad hoc wireless networks”, ELSEVIER Ad HocNetworks 4, pp. 687-708, 2006. [11] J. Liu and S. Singh, “ATCP: TCP for Mobile ad hoc Networks”, IEEE Journal in Selected Areas in Communication (JSAC), Vol 19, No.7, pp. 1300-15, July 2001,. [12] R. Cheng, H. Lin, “A Cross-layer Design for TCP End-to-End Performance Improvement in multi-hop wireless networks”, ELSEVIER, Computer communication Vol. 31, issue 14, pp. 3145-3152, Sep. 2008 [13] Routing and Multicasting Strategies in Wireless Mobile Ad hoc Networks by Sung –Ju Lee University of California, Los Angeles 2000. [14] A. Zahary, A. Ayesh, “Analytical study to detect threshold number of efficient routes in multipath AODV extensions”, proceedings of International Conference of Computer Engineering & Systems, ICCES, 2007, pp. 95 – 100 [15] R. Misra and C.R. Mandal, “Performance comparison of AODV/DSR on-demand routing protocols for ad hoc networks in constrained situation” ICPWC International Conference, IEEE, 2005, pp. 86 – 89 [16] Lijuan Cao, K. Sharif, Yu Wang, T. Dahlberg, “Adaptive Multiple Metrics Routing Protocols for Heterogeneous Multi-Hop Wireless Networks”, [17] Changling Liu, Jörg Kaiser, A Survey of Mobile Ad Hoc network Routing Protocols* kaiser@ivs.cs.uni-magdeburg.de [18] Jin Mook Kim, In Sung Han, Jin Baek Kwon, Hwang Bin Ryou, “A Novel Approach to Search a Node in MANET”, Information Science and Security, ICISS, 2008, pp. 44 – 48 60 [19] R. Thorulp, “Mobile Ad Hoc Networks and Routing Protocols”, Implementing and Evaluating the DYMO Routing Protocol, Master’s Thesis at the University of AARHUS, pp. 7- 20, 2007 [20] Jin Mook Kim, In Sung Han, Jin Baek Kwon, Hwang Bin Ryou, “A Novel Approach to Search a Node in MANET”, Information Science and Security, ICISS, 2008, pp. 44 – 48 [21] S. R. Chaudhry, A. Al-Khwildi, Y. Casey, H. Aldelou, “A Performance Comparison of Multi On- Demand Routing in Wireless Ad Hoc Networks”, Wireless Network and Communications Group (WNCG), School of Engineering & Design, Brunel University, West London [22] J. W. Creswell, Research Design: Qualitative, Quantitative and Mixed Methods Approach, 2nd Ed, Sage Publications Inc, California, July 2002. [23] http://www.cis.ufl.edu/~fishwick/introsim/node1.html [24] http://www.opnet.com/ 61