330 likes | 552 Views
TCPIP window and Slow-Start study over wireless channels. TERM PROJECT PRESENTATION Presented By Kaleemullah Khan Electrical Engineering ID # 220564. Problem definition. TCP earlier designed for wired networks Problems faced when TCP is used for wireless networks
E N D
TCP\IP window and Slow-Start study over wireless channels TERM PROJECTPRESENTATION Presented By Kaleemullah Khan Electrical Engineering ID # 220564
Problem definition • TCP earlier designed for wired networks • Problems faced when TCP is used for wireless networks • Losses in wireless networks is not only due Congestion • What are the causes of high error rates in wireless networks
Introduction to TCP • TCP stands for Transmission Control Protocol • specified in RFC 793 • it is THE standard for reliable, best effort data transmission in today’s Internet • any internet compatible device supports the TCP/IP suite • 70% - 80% of the internet traffic today is based on TCP • applications using TCP: http (Web browsing), smtp (mail transfer), ftp (file transfer)
Introduction to TCP • TCP is a Sliding Window Protocol • Send Window is determined as the Minimum of: – the Receiver’s Advertised Window (Flow Control), and – the Sender’s Congestion Window (Congestion Control)
Introduction to TCP • reliable end-to-end transport - based on a mix of "go back n" and "selective repeat" retransmission strategy - only dealing with positive acknowledgments - timer based packet loss detection (Retransmission Timeout) - and acknowledgment indicated loss detection (Fast Retransmit)
Introduction to TCP • end system based traffic control functions - to avoid network congestion and end system overload - sending an adaptive data rate using a window mechanism - based on the returning acknowledgments - assumes network congestion to be the primary cause for packet losses ! - reacts on packet loss with rapid slow down of the sending data rate
TCP Congestion Control Scheme • First, set cwnd (congestion window) to one segment and ssthresh (slow start threshold) to 65535. • Sender sends at most the minimum of cwnd and the receiver’s advertised window. • When congestion occurs, retransmit the loss packet and set ssthresh to one half of the current window size. And if congestion is indicated by a timeout, cwnd is set to one segment. • When new data is acknowledged, increase cwnd.
TCP Congestion Control Scheme • In slow start phase cwnd<=ssthresh), increase cwnd by one segment for each ACK. • In congestion avoidance phase (cwnd> ssthresh), increase cwnd by segsize*segsize/cwnd for each ACK, at most one segment each RTT.
Fast Retransmit • TCP generates a duplicate ACK when an out-of-order segment is received • TCP doesn’t know the duplicate ACK is due to the above problem • If two or more duplicate ACK are received then the reordered segment is processed • If three or more duplicate ACK are received then this implies that a segment is lost
Fast Recovery • After fast retransmit sends what appears to be the missing segment, congestion avoidance, but not slow start is performed • This is the fast recovery algorithm • This allows high throughput under moderate congestion, especially for large windows
TCP RENO and TCP TAHOE • Tahoe and Reno TCP, the two most common reference implementations for TCP • Tahoe TCP implementation added new algorithms like Slow-Start, Congestion Avoidance, and Fast Retransmit • Reno TCP implementation added Fast Recovery to the existing Fast Retransmit
Introduction to NS • Network Simulator (NS) is a package for building network topology • NS provides substantial support for simulation of TCP, routing, and multi-cast protocols over wired and wireless (local and satellite) networks • NS can generate trace files. This trace file can be used in calculating the performance of the generated network • NS also generates animation file. The network animation can be viewed using Network Animator (Nam)
Drop Tail and RED queues • The drop-tail queue maintains exactly one FIFO queue • Packet is being stored in the queue and then compared to the threshold in the enque function • If it exceeds the threshold the most recent packet added is being dropped • Simple FIFO scheduling is implemented in the deque function
Drop Tail and RED queues • RED stands for Random Early detection • The Red queues are mainly designed for the gateways to avoid congestion • In this queuing type the gateways detects the incipient congestion by computing average queue size • congestion in the network is notified by either dropping the packets arriving at the gateway node or it sets the bit in the packet header
TCP Over Wireless Network • Effect of High BER: Bit errors cause TCP data segments or ACKs lost. When ACKs do not return within RTO, the sender retransmits the segment, exponentially backs off its RTO (up to 64 seconds), and slow start again. Repeated errors result in low throughput.
TCP Over Wireless Network • Effect of Disconnections Disconnections can be caused by a handoff, physical obstacles, or call blocking. These disconnections result in lost data segments and lost ACKs, and greatly reduce the efficiency of the connections.
TCP Over Wireless Network • Effect of Frequent Disconnections Small cell sizes result in small cell latencies and cause frequent disconnections as a user roams. It may result in a serial timeouts. When the mobile is reconnected, no data is successfully transmitted for minutes!
TCP Over Wireless Network • Effect of Route Recomputations When an old route is no longer available, the network layer at the sender attempts to find a new route to destination. It is possible that discover a new route is longer than RTO and invokes congestion control.
TCP Over Wireless Network • Effect of Network Partitions The ad hoc network may periodically get partitioned for several seconds at a time. If the sender and the receiver lie in different partitions, the data packages and ACKs will get dropped and result in congestion control
Simulation details • Link parameters: Uplink – Bandwidth 1Mb with a delay in the link as 0.001ms Downlink – Bandwidth 0.5Mb with a delay in the link as 0.001ms • Queue type: RED queue – for both nodes • TCP flavor: Source – TCP Reno Sink – TCPSink
Simulation details • Traffic Model: Exponential ON\OFF model ON time as 400ms OFF time as 500ms Rate – 10kb • The simulation is carried out for FTP application also • Error Model: For different error percentages, throughput is calculated