Tcp Ip Protocol – TCP IP Protocol Over Wireless

Tcp Ip Protocol – TCP IP Protocol Over Wireless

TCP IP Protocol – The Transmission Control Protocol (TCP) is one of the most important and core protocols of the Internet protocol suite.

It is referred to as TCP/IP.

Main features of TCP IP Protocol

  • TCP IP Protocol is a reliable protocol
  • TCP IP protocol guarantees in-order delivery of data.
  • The TCP IP Protocol covers congestion control and flows control mechanisms also.
  • TCP IP Protocol supports a variety of important internet application protocols and corresponding applications such as –
  1. the World Wide Web,
  2. e-mail,
  3. File Transfer Protocol, and
  4. Secure Shell.

In the Internet protocol suite, TCP is the intermediate layer. It is between the Internet layer and the application layer.

Responsibilities of TCP IP Protocol

The major responsibilities of TCP IP Protocol in an active session are as follows-

  • TCP IP Protocol allows reliable in-order transport of data without the loss of any data.
  • TCP IP Protocol manages congestions in the networks system without any kind of degradation of the network performance
  • TCP IP Protocol controls a packet flow between the source who transmit data and the receiver.
  • TCP IP Protocol also keeps track that the data should not exceed the receiver’s capacity.
  • TCP IP Protocol applies a number of mechanisms to attain high performance and avoid congestion problems.
  • TCP IP controls the rate of data entering into the network and keeping the data flow below the prescribed rate to avoid congestion collapse.
  • There are a number of components in TCP that control the competence of TCP in a mobile environment.
  • Acknowledgments for information sent, or lack of acknowledgments, are used by the source or the senders to perfectly interpret network conditions between the TCP sender and TCP receiver.

 

Congestion Control in TCP IP Protocol over Wireless

The Internet protocol suite is the conceptual model and a set of communications protocols used in the Internet and similar networks.

It is known as TCP/IP because the foundational protocols in the suite are:

  • The Transmission Control Protocol (TCP) and
  • The Internet Protocol (IP)

 

What is TCP IP protocol and how does it work?

The complete working of TCP IP protocol is as below-

  • A transport layer protocol like TCP has been designed for fixed wired networks with fixed end system nodes.
  • Congestion may appear in any kind of network system and even in a carefully designed network also.
  • The packet-buffers of a router are jam-packed and the router cannot forward the packets fast enough because the sum of the incoming rates of the packets destined for one output link is higher than the power of the output link.
  • In this condition, the router can drop the packets. The dropped packet is lost for the communication, and the receiver notices a break in the packet stream.
  • Now the receiver node does not directly inform the sender node about which packet is missing but continues to acknowledge all in sequence packets including the missing packet.
  • The sender node checks the missing acknowledgment for the missed packet and thinks a packet loss due to a congestion problem.
  • Now, retransmitting the lost packet and continuing at the previous sending rate would now be risky, because it might increase the congestion problem severe.
  • To reduce congestion, TCP slows down the transmission rate considerably.
  • All other TCP connections considering the same congestion and do exactly the same and hence, the congestion is resolved speedily.

 

A slow start in TCP IP Protocol

The behavior TCP shows after the detection of the congestion condition is called a slow start.

  • In this protocol, the sender always calculates a congestion window for a receiver.
  • The start size of the congestion window is one segment (TCP packet).
  • The sender sends one packet and waits for an acknowledgment.
  • If this acknowledgment arrives, the sender increases the congestion window by one, now sending two packets (congestion window = 2).
  • This scheme doubles the congestion window every time the acknowledgments come back, which takes one round trip time (RTT).
  • This is called the exponential growth of the congestion window in the slow start mechanism.
  • But doubling the congestion window is too dangerous. The exponential growth stops at the congestion threshold.
  • As soon as the congestion window reaches the congestion threshold, further increase of the transmission rate is only linear by adding 1 to the congestion window each time the acknowledgments come back.
  • The linear increase continues until a time-out at the sender occurs due to a missing acknowledgment, or until the sender detects a gap in transmitted data because of continuous acknowledgments for the same packet.
  • In either case, the sender sets the congestion threshold to half of the current congestion window.
  • The congestion window itself is set to one segment and the sender starts sending a single segment.
  • The exponential growth starts once more up to the new congestion threshold, then the window grows in a linear fashion.

 

Fast retransmit/fast recovery in TCP IP Protocol

The congestion threshold can be decreased due to the following reasons-

The first reason

The first one is if the sender receives continuous acknowledgments for the same packet.

It informs the sender that the receiver has got all the packets up to the acknowledged packet in the sequence and also the receiver is receiving something continuously from the sender.

The gap in the packet stream is not due to congestion, but a simple packet loss due to a transmission error.

The sender can now retransmit the missing packet(s) before the timer expires.

This behavior is called a fast retransmit.

It is an early enhancement for preventing slow-start to trigger losses not caused by congestion.

The receipt of acknowledgments shows that there is no congestion to justify a slow start.

The sender can continue with the current congestion window.

The sender performs a fast recovery from packet loss. This mechanism can improve the efficiency of TCP dramatically.

The second reason

The other reason for activating a slow start is a time-out due to a missing acknowledgment.

TCP using fast retransmit/fast recovery interprets this congestion in the network and activates the slow start mechanism.

 

Problems with Traditional TCP in wireless environments

Slow Start mechanism in fixed networks decreases the efficiency of TCP if used with mobile receivers or senders.

Error rates on wireless links are orders of magnitude higher compared to fixed fiber or copper links.

This makes compensation for packet loss by TCP quite difficult. Mobility itself can cause packet loss.

There are many situations where a soft handover from one access point to another is not possible for a mobile end-system.

Standard TCP reacts with a slow start if acknowledgments are missing, which does not help in the case of transmission errors over wireless links and which does not really help during handover.

This behavior results in severe performance degradation of an unchanged TCP if used together with wireless links or mobile nodes

 

 Classical TCP Improvements

Indirect TCP (I-TCP)

The detailed description of Indirect TCP is as below-

  • Indirect TCP segments a TCP connection into a fixed part and a wireless part.
  • The following figure shows an example with a mobile host connected via a wireless link and an access point to the ‘wired’ internet where the correspondent host resides.

 

TCP IP

 

  • Standard TCP is used between the fixed computer and the access point. No computer on the internet recognizes any changes to TCP.
  • Instead of the mobile host, the access point now terminates the standard TCP connection, acting as a proxy.
  • This means that the access point is now seen as the mobile host for the fixed host and as the fixed host for the mobile host.
  • Between the access point and the mobile host, a special TCP, adapted to wireless links, is used.
  • The foreign agent acts as a proxy and relays all data in both directions. If CH (correspondent host) sends a packet to the MH, the FA acknowledges it and forwards it to the MH.
  • MH acknowledges successful reception, but this is only used by the FA.
  • If a packet is lost on the wireless link, CH doesn’t observe it and FA tries to retransmit it locally to maintain reliable data transport.
  • If the MH sends a packet, the FA acknowledges it and forwards it to CH.
  • If the packet is lost on the wireless link, the mobile hosts notice this much faster due to the lower round trip time and can directly retransmit the packet.
  • Packet loss in the wired network is now handled by the foreign agent.

 

 

  • Socket and state migration after the handover of a mobile host During handover, the buffered packets, as well as the system state (packet sequence number, acknowledgments, ports, etc), must migrate to the new agent.
  • No new connection may be established for the mobile host, and the correspondent host must not see any changes in connection state.

Packet delivery in I-TCP is shown below:

 

 

Advantages of I-TCP

No changes in the fixed network necessary, no changes for the hosts (TCP protocol) necessary, all current optimizations to TCP still work

Simple to control; mobile TCP is used only for one hop between, e.g., a foreign agent and mobile host.

  1. transmission errors on the wireless link do not propagate into the fixed network
  2. therefore, very fast retransmission of packets is possible, the short delay on the mobile hop s known

Disadvantages of I-TCP

  1. Loss of end-to-end semantics:- an acknowledgment to a sender no longer means that a receiver really has received a packet, foreign agents might crash.
  2. Higher latency possible:- due to buffering of data within the foreign agent and forwarding to a new foreign agent
  3. Security issue:- The foreign agent must be a trusted entity

 

Snooping TCP

The main drawback of I-TCP is the segmentation of the single TCP connection into two TCP connections, which loses the original end-to-end TCP semantic.

A new enhancement, which leaves the TCP connection intact and is completely transparent, is Snooping TCP.

  • The main function is to buffer data close to the mobile host to perform fast local retransmission in case of packet loss.

 

  • Here, the foreign agent buffers all packets with the destination mobile host and additionally ‘snoops’ the packet flow in both directions to recognize acknowledgments.
  • The foreign agent buffers every packet until it receives an acknowledgment from the mobile host.
  • If the FA does not receive an acknowledgment from the mobile host within a certain amount of time, either the packet or the acknowledgment has been lost. Alternatively, the foreign agent could receive a duplicate ACK which also shows the loss of a packet.
  • Now, the FA retransmits the packet directly from the buffer thus performing faster retransmission compared to the CH. For transparency, the FA does not acknowledge data to the CH, which would violate end-to-end semantic in case of a FA failure.
  • The foreign agent can filter the duplicate acknowledgments to avoid unnecessary retransmissions of data from the correspondent host.
  • If the foreign agent now crashes, the time-out of the correspondent host still works and triggers retransmission.
  • The foreign agent may discard duplicates of packets already retransmitted locally and acknowledged by the mobile host. This avoids unnecessary traffic on the wireless link.
  • For data transfer from the mobile host with destination correspondent host, the FA snoops into the packet stream to detect gaps in the sequence numbers of TCP.
  • As soon as the foreign agent detects a missing packet, it returns a negative acknowledgment (NACK) to the mobile host.
  • The mobile host can now retransmit the missing packet immediately.
  • The reordering of packets is done automatically at the correspondent host by TCP.

Advantages of snooping TCP

  1. The end-to-end TCP semantic is preserved.
  2. Most of the enhancements are done in the foreign agent itself which keeps the correspondent host unchanged.
  3. The handover of the state is not required as soon as the mobile host moves to another foreign agent. Even though packets are present in the buffer, time out at the CH occurs and the packets are transmitted to the new COA.
  4. No problem arises if the new foreign agent uses the enhancement or not. If not, the approach automatically falls back to the standard solution.

 

Disadvantages of snooping TCP

  1. Snooping TCP does not isolate the behavior of the wireless link as well as I -TCP. Transmission errors may propagate till CH.
  2. Using negative acknowledgments between the foreign agent and the mobile host assumes additional mechanisms on the mobile host.

 

Mobile TCP

Both I-TCP and Snooping TCP does not help much if a mobile host gets disconnected.

  • The M-TCP (mobile TCP) approach has the same goals as I-TCP and snooping TCP: to prevent the sender window from shrinking if bit errors or disconnection but not congestion cause current problems.
  • M-TCP wants to improve overall throughput, to lower the delay, to maintain end-to-end semantics of TCP, and to provide a more efficient handover.
  • Additionally, M-TCP is specially adapted to the problems arising from lengthy or frequent disconnections.
  • M-TCP splits the TCP connection into two parts as I-TCP does. An unmodified TCP is used on the standard host-supervisory host (SH) connection, while an optimized TCP is used on the SH-MH connection.
  • The SH monitors all packets sent to the MH and ACKs returned from the MH.
  • If the SH does not receive an ACK for some time, it assumes that the MH is disconnected.
  • It then chokes the sender by setting the sender’s window size to 0. Setting the window size to 0 forces the sender to go into a persistent mode, i.e., the state of the sender will not change no matter how long the receiver is disconnected.
  • This means that the sender will not try to retransmit data.
  • As soon as the SH (either the old SH or a new SH) detects connectivity again, it reopens the window of the sender to the old value.
  • The sender can continue sending at full speed. This mechanism does not require changes to the sender’s TCP.

Advantages of M-TCP

  1. It maintains the TCP end-to-end semantics. The SH does not send any ACK itself but forwards the ACKs from the MH.
  2. If the MH is disconnected, it avoids useless retransmissions, slow starts or breaking connections by simply shrinking the sender’s window to 0.
  3. As no buffering is done as in I-TCP, there is no need to forward buffers to a new SH. Lost packets will be automatically retransmitted to the SH.

 

Disadvantages of M-TCP

  1. As the SH does not act as a proxy as in I-TCP, packet loss on the wireless link due to bit errors is propagated to the sender. M-TCP assumes low bit error rates, which is not always a valid assumption.

 

Transmission/time-out freezing

  • Often, the MAC layer notices connection problems even before the connection is actually interrupted from a TCP point of view and also knows the real reason for the interruption.
  • The MAC layer can inform the TCP layer of an upcoming loss of connection or that the current interruption is not caused by congestion.
  • TCP can now stop sending and ‘freezes’ the current state of its congestion window and further timers.
  • If the MAC layer notices the upcoming interruption early enough, both the mobile and correspondent host can be informed.
  • With a fast interruption of the wireless link, additional mechanisms in the access point are needed to inform the correspondent host of the reason for interruption.
  • Otherwise, the correspondent host goes into slow start assuming congestion and finally breaks the connection.
  • As soon as the MAC layer detects connectivity again, it signals TCP that it can resume operation at exactly the same point where it had been forced to stop.
  • For TCP time simply does not advance, so no timers expire.

 

Advantages

  1. It offers a way to resume TCP connections even after long interruptions of the connection.
  2. It can be used together with encrypted data as it is independent of other TCP mechanisms such as sequence no or acknowledgments

Disadvantages

Lots of changes have to be made in the software of MH, CH, and FA.

 

Selective retransmission

A very important and very useful extension of TCP is the use of selective retransmission.

  • TCP acknowledgments are cumulative, i.e., they acknowledge in-order receipt of packets up to a certain packet.
  • A single acknowledgment confirms the reception of all packets up to a certain packet. If a single packet is lost, the sender has to retransmit everything starting from the lost packet (go-back-n retransmission). This obviously wastes bandwidth, not just in the case of a mobile network, but for any network.
  • Using selective retransmission, TCP can indirectly request selective retransmission of packets.
  • The receiver can acknowledge single packets, not only trains of in-sequence packets.
  • The sender can now determine precisely which packet is needed and can retransmit it.
  • The advantage of this approach is obvious: a sender retransmits only the lost packets. This lowers bandwidth requirements and is extremely helpful in slow wireless links.
  • The disadvantage is that more complex software on the receiver side is needed. Also, more buffer space is needed to re-sequence data and to wait for gaps to be filled.

 Transaction-oriented TCP

Assume an application running on the mobile host that sends a short request to a server from time to time, which responds with a short message and it requires reliable TCP transport of the packets.

For it to use normal TCP, it is inefficient because of the overhead involved.

Standard TCP is made up of three phases:

setup, data transfer, and release. First, TCP uses a three-way handshake to establish the connection. At least one additional packet is usually needed for transmission of the request and requires three more packets to close the connection via a three-way handshake.

So, for sending one data packet, TCP may need seven packets altogether.

This kind of overhead is acceptable for long sessions in fixed networks but is quite inefficient for short messages or sessions in wireless networks.

This led to the development of transaction-oriented TCP (T/TCP).

Working of Transaction-oriented TCP (T/TCP)

  • T/TCP can combine packets for connection establishment and connection release with user data packets. This can reduce the number of packets down to two instead of seven.
  • The obvious advantage for certain applications is the reduction in the overhead which standard TCP has for connection setup and connection release.
  • The disadvantage is that it requires changes in the software in the mobile host and all correspondent hosts.
  • This solution does not hide mobility anymore. Also, T/TCP exhibits several security problems.

 

Thanks for reading, Welcome to your comments on this Post

This site uses Akismet to reduce spam. Learn how your comment data is processed.