ECE 741 Wireless Networks Term Paper Spring 2009 M-TCP over wireless networks Nikhil Bonthapally G00398744 George Mason University Fairfax, VA M-TCP over Wireless Networks Nikhil Bonthapally Abstract Transmission Control Protocol (TCP) is the de facto network transport protocol, predecessor of Network Control Protocol (NCP) gives us a fair advantage of reliable data delivery, flow-control associated with both the transmitter and receiver. TCP’s performance has been improved over the years on wireline networks. General cause of congestion and packet losses are due to network congestion in wireline networks. The primary reason for packet losses in wireless networks being high bit error rate (BER) and hand-offs. Traditional TCP does not account to these and thus the performance is degraded. I propose a solution to the above problem by introducing M-TCP [1](Kevin Brown and Suresh Singh). Introduction Transmission Control Protocol/ Internet Protocol originated out of the investigative research into networking protocols that the Networks Department of Defense (DoD) initiated in 1969. TCP is a flow controlled, connection-oriented, end-to-end reliable protocol designed to fit into a layered hierarchy of protocols supporting multi-network applications. TCP provides for reliable inter-process communications between pairs of processes in host computers attached to distinct but interconnected computer communication [5]. The current cellular network infrastructure uses the concept of dividing the geographical area into regions called cells. Each cell has its own base station that provides an end-toend connection between the users. Channel reuse, frequency reuse, signal to interference ratio (SIR) and many such performance factors would require to have a small cell size. Small cell latencies, frequent disconnections during handoff are the results of such small cell size. And worst of all, the serial time outs at TCP sender is more because of these reasons. TCP, already said provides a reliable data transfer by the process of acknowledging the packets received back by the sender. TCP sender keeps a track of the packets and acknowledgement and when the acknowledgement is not received before the Timeout expires, it retransmits the packets. This multiple serial timeout increases exponentially after each failure [4]. In a wireless environment, this serial timeout feature proves to be more fatal to the performance of TCP than losses due to bit errors or small congestion windows. Continuous timeouts could leave a mobile user disconnected for as long as one minute. The modified TCP implementation proposes an end-to-end retransmission scheme that can reduce the pauses to a low level and make it more suitable for human interaction. Transmission Control Protocol (TCP) Transmission Control Protocol relies on the implicit information it receives from the network and remote host. It makes a well-informed guess about the state of the network and trusts the information it receives from the remote host. TCP being a reliable protocol has the method of assigning timers to each packet it sends out, for an acknowledgement to be returned. This way, TCP keeps track of packets successfully transmitted. This timer is called Retransmission Timer. 2 M-TCP over Wireless Networks Nikhil Bonthapally When an acknowledgement is received before the timer expires, the timer is reset without any consequence but if no acknowledgement is received, sender would retransmit the segment and double the retransmission timer value for each consecutive timeout up to a maximum of about 64 seconds [4]. Retransmission time and timeout basically depend on the Round Trip Time of the packet in a network. The total time taken by the packet to reach the receiver and the acknowledgement packet to arrive at the sender is defined as the round trip time. In order to control the timeout, sliding window protocol is used to acknowledge a window of packets instead of acknowledging each packet. As data is sent by the sender and then acknowledged by the receiver, the window slides forward to cover more data in the byte stream. The sender congestion window should be made equal to the corresponding receiver window. Another timer called the persistence timer is used when the receiver sends an acknowledgement with a window size of 0. It means, the receiver telling the sender to wait, and then sender goes into persistence mode and sets its persistence timer. After the expiration of the timer, the sender will send a one-byte segment as a probe to the receiver. The response from the receiver to the probe gives the window size. If it is still zero, the persistence timer is set again and the cycle repeats. If a non-zero number is received, sender will go out of persistence mode and new data can be sent. In a general scenario, a sender runs exponential back off algorithm if it does not receive any acknowledgements for round trip time. This way, the sender increases the back off time, thereby delaying the next transmission. The persistence timer disables the above algorithm to be run on the sender. In wireless networks, this acts as an advantage and we use it to increase the efficiency of data traffic on wireless networks. M-TCP M-TCP, modified TCP is designed to suit wireless connections. Cellular communications field is more suitable for M-TCP deployment. Mobile users connect to the Internet via cellular network. A geographic unit called cell has base stations to provide connection end-points for mobile hosts. In order to provide high-bandwidth wireless connections, cell sizes will have to be kept small which in turn causes cell latency. Cell latency is the cause of frequent disconnections as a user roams among cells. This causes serial timeouts at the TCP sender. And because the sender doubles the retransmission timer with each unsuccessful retransmission, even after the mobile is reconnected it is feasible that in the protocol implementation, no data could be transmitted for as long as up to one minute. M-TCP Working Network architecture for M-TCP is shown in Figure-1. As it shows, it has a three level hierarchy. Mobile hosts (MH) are at the lowest level. They communicate with other mobiles within the cell with the help of Mobile Support Stations (MSS). A Supervisor Host (SH) is assigned to a group of MSSs [1]. Supervisor Hosts are connected to the wireline network. SHs are responsible for handling most routing and other protocol details for the mobile users. 3 M-TCP over Wireless Networks Nikhil Bonthapally Figure-1 M-TCP forces the sender to be in persist state in the case of any disconnection. While in this state, the sender will not suffer any retransmission timeout i.e., it will not run the exponential back off algorithm and this would preserve the current size of the congestion window. And when the connection recovers upon the receiving a notification from MTCP, the sender will be able to transmit at full speed. A simplified model of the network is shown below in Figure 2. The TCP implementation is split into two at the Super Host (SH). SH-TCP receives the data packets transmitted by the sender (FH) in the wireline network and passes these packets to the M-TCP client for delivery to MH. Acknowledgement packets received by the M-TCP at the SH are forwarded to SH-TCP for delivery to the TCP sender. When SH-TCP receives a packet from a TCP sender, it passes the packet to the M-TCP client, and acknowledges packet when its ACK is received from the MH. However, the protocol should make sure that the sender does not trigger congestion control when the MH is temporarily disconnected (unavailable) or a packet is lost between SH & MH. Figure-2 As we know, only an ACK packet with cwnd equals to zero can force the sender into persist state, the last ACK number has to be kept in memory in order to be able to create such a new ACK packet. When such situation arises (retransmission time out occurs), SH-TCP creates and sends this new ACK packet to FH. With this, the FH is forced into persist state. In this state, the FH will not run the back-off algorithm and hence will not suffer retransmission timeout. It will not close its congestion window and remain in its state until it hears back from the MH. 4 M-TCP over Wireless Networks Nikhil Bonthapally SH keeps on checking for the ACK packets to determine if MH is reconnected. A reconnection ACK is sent to SH, after MH reconnects. Upon receiving this, the SH will retransmit all the packets that have not been acknowledged by MH. The newly received ACK packets will be forwarded to FH via SH-TCP. FH exits the persist state and now resumes its transmission. Since the sender never times out, it never performs congestion control. And thus, the sender can resume transmission at the rate before the packet loss occurred. High BER is not taken into consideration by M-TCP protocol because it assumes, mobile environments with good wireless link layer protocol will ensure small BER at the TCP layer. However, with M-TCP, even in mobile environment with high BER, the sender can still leave persist state quickly and resume regular data transmissions. OPNET Implementation OPNET solutions model communications devices, protocols, technologies, and architectures, and simulate their performance in a dynamic virtual network environment. Integrated code debugging and data analysis features facilitate the design process. I used standard WLAN Ethernet Router model (wlan_ethernet_router) to model the SH, WLAN Workstation (wlan_wkstn_adv) for MH, and Ethernet Server (Ethernet_server_adv) for FH. These nodes are chosen from two standard lists of OPNET models: Wireless LAN (WLAN) and Ethernet. Ethernet Server is a model with server applications running over TCP/IP and UDP/IP. It has an interface to one Ethernet connection at 10 Mbps, 100 Mbps, or 1,000 Mbps. These meet our requirements to have a TCP connection to SH via Ethernet. WLAN Workstation is chosen for the mobile host for similar reasons. It represents a workstation with applications running over TCP/IP and UDP/IP. It supports one underlying WLAN connection at 1 Mbps, 5.5 Mbps, or 11 Mbps. Lastly, WLAN Ethernet Router was used to establish connection between FH and MH because it has the capability of connecting to both Ethernet (one Ethernet port available) and wireless LAN (one wireless LAN port available). M-TCP Scenario 5 M-TCP over Wireless Networks Nikhil Bonthapally One of the major advantages of using M-TCP is that we do not have to modify the existing internet components i.e., the wired LAN domain including the fixed host does not need any modifications. TCP on the mobile host is modified into M-TCP client. Supervisor Host needs most of the changes as the original TCP is modified to two layers, SH-TCP and M-TCP. The SH-TCP on supervisor host is used to make the communication between the supervisor host and the wired lab, the fixed host in the Ethernet. The M-TCP on supervisor host is used to make communication between the supervisor host and the wireless LAN, the mobile host in the wireless LAN. M-TCP Node Models: Mobile Host Shown below in Figure-3 is the MH node model for M-TCP. Process ip_encap is modified to simulate MH’s temporary disconnection behavior. Packets handled by this process are dropped periodically. This process is responsible for de-capsulation of IP packets sent to higher layer and en-capsulation of packets into IP packets sent to the lower layer. Figure-3: Process Model of MH Four configurable attributes are implemented to configure the m_ip_encap process module: BrokenEnable: If set to 1, periodical disconnection is enabled. CycleTime: Indicates period (in seconds) between two disconnections. BrokenStartTime: The start time of disconnection in each disconnection cycle. BrokenEndTime: The end time of disconnection in each disconnection cycle. Supervisor Host Shown below in Figure-4 is the SH node model for M-TCP. Modifications are made in processes ip and ip_encap. A new process model m_tcp is created to account for the communication between SH and MH. 6 M-TCP over Wireless Networks Nikhil Bonthapally Figure-4: Process model of SH Simulation Three scenarios are used and simulated to understand and compare the congestion window size and goodput. FTP application is deployed. Scenario 1. Regular TCP without disconnections: Ideal TCP conditions. Serves as base for comparison. Scenario 2. Regular TCP with disconnections: Disconnections are scheduled every 5 min. Each disconnection time is 30 sec at the end of each 5-min disconnection period. Scenario 3. M-TCP with disconnections: M-TCP deployed in SH and MH. Disconnections occur for 30 sec for every 5 minutes. Simulation Results Congestion Window Size The figure below shows the similarity between regular TCP and M-TCP in their congestion window size. In TCP with disconnections, the congestion window drastically decreases with packet drops. M-TCP helps prevent congestion window from decreasing during disconnections by forcing the sender into persist state. Congestion Window Size Comparison 7 M-TCP over Wireless Networks Nikhil Bonthapally Goodput In a network with disconnections, M-TCP has a higher goodput than regular TCP. The below graph is for a disconnection period of 30 seconds and yet the difference is visible. In mobile network environment, the handoff time may vary from 10 seconds to a few minutes. Disconnections are caused not only by handoffs but also because of the retransmission timeout. The longer the disconnection is, the larger number of packets will be lost and the longer the retransmission timeout will last. Goodput Graph Comparison Conclusion In the present wireless network environment frequent disconnections, caused by signal fading, hand-offs and BER are responsible for packet drops and the execution of exponential back-off algorithm at the sender. This algorithm affects the throughput of the system. M-TCP handles the frequent disconnections problem in wireless networks by forcing the sender into persist state, which preserves the congestion window size. This way, the algorithm is never executed and the congestion window, never reduced. M-TCP is a solution to the above problems faced using regular TCP. M-TCP performance is equivalent to that of regular TCP in wireline network and it actually outperforms the regular TCP with disconnections in wireless networks. 8 M-TCP over Wireless Networks Nikhil Bonthapally References [1] W. G. Zeng, M. Zhan, Z. Li, and Lj. Trajkovic, ``Performance evaluation of M-TCP over wireless links with periodic disconnections,'' OPNETWORK 2003, Washington, DC, Aug. 2003 [2] K. Brown and S. Singh, “M-TCP: TCP for mobile cellular networks,” ACM SIGCOMM Computer Communication Review, vol. 27, no. 5, pp. 19-42, October 1997. [3] Improving the Performance of Reliable Transport Protocols in Mobile Computing Environments Raman Caceres, Member, IEEE, and Liviu Iftode, IEEE JOURNAL ON SELECTED AREAS IN COMMUNICATIONS. VOL. 13. NO. 5. JUNE 1995 [4] W. Richard Stevens. TCP/IP Illustrated, Volume 1: The Protocols. Addison Wesley, ISBN: 0-201-63346-9. January 1994. [5] Study of Time Based TCP in Synchronous Loss Environment Nikhil Bonthapally, Shriraj Iyer, Students, MS EE, George Mason University, VA [6] OPNET documentation V.8.0.B, OPNET Technologies Inc Washington DC. 9