140 likes | 149 Views
This article explores the main functions of TCP and how they are influenced by the characteristics of wired and wireless environments. It discusses TCP's role in establishing and maintaining connections, reliable packet delivery, flow control, and congestion control. It also examines strategies for improving TCP performance in wireless networks.
E N D
TCP Functions • TCP is a connection oriented protocol • Primary functions • TCP sets up and maintains end-to-end connection between two hosts • Setup and teardown of connection are distinct phases • A connection is defined by the quadruplet of IP addresses and port numbers of both hosts • Ensures reliabledelivery of packets • Selective Repeat ARQ protocol • Positive ACK of packets • Sequence numbers • Error detection • Enforces flow control • Sliding window flow control • Receiver advertises size of window (max number of packets that can be sent by sender without ACK) • Prevents buffer overflow at receiver • AppliesCongestioncontrol • Traditional TCP assumes losses are due to congestion, not errors • 3-phase process • Slow start (exponential increase in number of packets sent) • Congestion avoidance (linear increase in number of packets sent) • Time out (adjust threMGold, return to slow start) ECE 695 Sp 2006 Jim Catt
Factors that influence TCP performance • Wired environment • Sender and receiver have static IP addresses (at least for the duration of the session) • No handoffs • While packet routes may vary, routing nodes form a fixed network, i.e., they do not drop into and out of the network and they maintain a fixed topology relative to one another • facilitates the use of routing tables • the number of potential routes, though possibly large, forms a fixed set • RTT variance is lower. • Channel conditions tend to be relatively stable (no fading, Doppler, multi-path) • Packet loss is primarily due to congestion, not channel conditions ECE 695 Sp 2006 Jim Catt
Factors that influence TCP performance • Wireless environment • Sender and receiver may both be mobile during the session, and traverse “domain” boundaries several times, requiring handoffs. • Traditional static IP addresses don’t work very well – connections could be lost and re-establiMGed many times • IP addressing is handled in mobile IP and can be transparent to TCP layer • Since mobile nodes (MNs) may associate with different APs during a session, routing becomes more challenging • core network topology may be relatively static as in wired case, but MN’s attachment to the core network is dynamic • routing tables relative to the MNs involved in the session grow stale more quickly • RTT variance is higher, packet latency is higher • Channel conditions tend to be relatively less stable -- fading, Doppler, multi-path and handoffs frequently cause packet loss • PHY and link layers in wireless have been adapted to mitigate these factors, but, cannot completely overcome them • Due to latency and packet loss, congestion control mechanisms may be triggered which cause needless reduction in throughput if traditional TCP is utilized in wireless. ECE 695 Sp 2006 Jim Catt
Mobile TCP Strategies • Utilize the link layer to detect and correct errors • Hides errors from TCP, avoids triggering inappropriate responses • Snoop TCP, TCP-Unaware Link Layer • Split TCP connections into distinct connections • Treats wired and wireless connections differently to accommodate different characteristics • Indirect TCP, Mobile TCP • Re-engineer TCP to accommodate wireless • Add features or explicitly modify behavior of protocol in response to certain events. • Handle loss events that are not due to congestion differently • Anticipate loss event due to handoffs, proactively manage these • Modify protocol to improve efficiency • Improves bandwidth utilization and lowers probability of packet loss • Explicit Loss Notice, WTCP, TCP SACK, T/TCP ECE 695 Sp 2006 Jim Catt
Link Layer Strategies • Snoop TCP • Buffer data as close as possible to MN to minimize re-transmit • Requires BS link layer to “snoop” (look into) TCP packets • BS (AP) buffers packets • Packets are removed from buffer on ACK • Missing ACK or DUPACK causes retransmit of packet(s) from BS buffer • BS does not initiate ACKs, but may initiate NACKs if gap in sequence number is detected ECE 695 Sp 2006 Jim Catt
Link Layer Strategies • TCP-Unaware Link Layer • Similar to Snoop TCP, but BS link layer is unaffected • Link level ACKs are used to trigger re-transmission of packets • MN uses delayed DUPACKs • Performance is sensitive to delay value ECE 695 Sp 2006 Jim Catt
Split Connection Strategies • Indirect TCP (ITCP) • Splits single TCP connection into two connections • MS-to-BS (AP) (wireless) • BS-to–CN (wired) • BS-to-CN connection can used conventional wired TCP • MS-to-BS connection uses customized TCP for wireless • BS (AP) acts as proxy for MN • Buffers packets destined for MN and sends ACKs to CN. • Handoffs may require buffered packets to be forwarded to new AP • Buffer at BS (AP) may overflow in cases of extended loss of connection between it and the MN ECE 695 Sp 2006 Jim Catt
Split Connection Strategies • Mobile TCP (M-TCP) • TCP connection is split at a mobile-gateway (MG) • Part of the fixed network. May be an AP or controller for multiple APs • TCP for the wireless segment is modified • Uses an asymmetric protocol that reduces the overhead at the MN • The MN to MG segment is basically a single hop – efficiencies can be obtained from this context • Addressing can be simplified (use CID instead of full TCP addr block) • Sequence numbers based on packets, not bytes • No need for sliding window (no place for packets to circulate) • No timers on MN side • Congestion control is eliminated – Only Flow control is used, based mainly on bit flags • Because a single MG may be managing multiple APs (and hence, even more MNs), buffer requirements and complexity are increased. • e.g., MG must maintain a state machine for each MN ECE 695 Sp 2006 Jim Catt
Mobile-TCP Protocol Stack Source: Z. Haas., P. Agrawal, “ Mobile-TCP: An Asymmetric Transport Protocol Design for Mobile Systems”, IEEE, 2000. ECE 695 Sp 2006 Jim Catt
Re-engineered TCP Strategies • Explicit Loss Notification (ELN) • The main idea is to distinguish between types of packet losses, i.e., congestion losses vs other types, and treat them differently • Losses due to issues such as handoffs shouldn’t require the same correction mechanisms as losses due to congestion • Approach: use MAC layer to distinguish between types of losses • If MAC detects that loss isn’t due to congestion, then the TCP layer in the MN sends an ELN • This tells the sender that only retransmission of lost packets is required, NOT a reduction in the congestion window. ECE 695 Sp 2006 Jim Catt
Re-engineered TCP Strategies • WTCP • Major re-engineering of TCP • Idea: add adaptive management functions that acknowledge the inherent differences between wired and wireless channels, then monitor channel conditions (use metrics) and adapt operations to current conditions • rate-based transmission • inter-packet separation metric • packet loss detection mechanisms • bandwidth estimation • separate congestion control and reliability mechanisms (e.g. different sequence numbers) ECE 695 Sp 2006 Jim Catt
Re-engineered TCP Strategies • TCP SACK (Selective ACK)(1996) • An adaptive scheme that employs the idea that selective retransmission is more efficient than non-adaptive schemes such as Go-back-N. • Normally, receiver only ACKs latest packet received in order. • This forces the sender to “go-back-N” packets and re-transmit the entire block after a timeout expires on the remainder of the packets. • This is wasteful if only some of the packets in the block (window) were lost. • When an out-of-order segment arrives at the receiver, a selective ACK is sent • The sender only re-transmits the non-ACKed packets • Transmitter maintains a metric related to number of packets “in flight”. As long as this metric is less than the congestion window size, the (NACK) segments can be re-transmitted • Requires both sender and receiver to maintain additional information about packets sent and received. ECE 695 Sp 2006 Jim Catt
Re-engineered TCP Strategies • Transaction-Oriented TCP (1994) • Introduced as an experimental extension to TCP • Goal is to avoid overhead associated with setup and tear-down transactions • Combine reliability of TCP with the simplicity and speed of UDP • Combine setup, tear-down and data transfer into a single transaction • More efficient – fewer packets and less time required for the connection • Originally, not envisioned as a wireless solution – targeted to improve speed of existing wired network transactions • Doesn’t solve the problem of maintaining continuity between handoffs in the mobile case, i.e., doesn’t address packet loss in such cases. ECE 695 Sp 2006 Jim Catt
Transaction Diagrams Traditional TCP 3-way handshake to establish a connection. No data has transferred at this point. T-TCP transaction that combines connection setup with data transfer Source: http://www.linuxgazette.com/issue47/stacey.html ECE 695 Sp 2006 Jim Catt