Part 1


1. Read your own response to Homework (x – 1), Part 2; then treat that as the body of this question. In other words, do the “to-do” items on your list. Report briefly and informally on the results of doing those items.


1.           List out various TCP mechanism.

1.     TCP Connection Establishment

2.     Sequence number

3.     Acknowledgment number

4.     Selective acknowledgement

5.     Slow Start.

6.     Fast retransmit and fast recovery

7.     TIME STAMP and RTTM, Round-Trip Time Measurement

8.     cwnd, Congestion window

9.     Checksum



2.           Explain why any mechanism will be applicable or not to TCP friendly protocol‘P’.

1.      TCP Connection Establishment

To use reliable transport services, TCP hosts must establish a connection-oriented session with one another. Connection establishment is performed by using a "three-way handshake" mechanism. Three-way handshake synchronizes both ends of a connection by allowing both sides to agree upon initial sequence numbers. This mechanism also guarantees that both sides are ready to transmit data and know that the other side is ready to transmit as well. This is necessary so that packets are not transmitted or retransmitted during session establishment or after session termination.

Each host randomly chooses a sequence number used to track bytes within the stream it is sending and receiving. Then, the three-way handshake proceeds in the following manner:

The first host (Host A) initiates a connection by sending a packet with the initial sequence number (X) and SYN bit set to indicate a connection request. The second host (Host B) receives the SYN, records the sequence number X, and replies by acknowledging the SYN (with an ACK = X + 1). Host B includes its own initial sequence number (SEQ = Y). An ACK = 20 means the host has received bytes 0 through 19 and expects byte 20 next. This technique is called forward acknowledgment. Host A then acknowledges all bytes Host B sent with a forward acknowledgment indicating the next byte Host A expects to receive (ACK = Y + 1). Data transfer then can begin.

Below is a an example of connection establishment, data transfer, and connection termination shows that both the SYN and FIN flags must have a sequence number although the segments do not contain data. An ACK flag is sent with he SYN and FIN flags except in the very first SYN segment since there is no overhead involved in adding it.  


Three way handshakes are not entirely important for tour new TCP Friendly protocol. However a two way handshake could be considered sufficient while setting up communications with another computer, the source sends out a TCP SYN packet. This packet's purpose is to synchronize sequence numbers. The destination computer then responds with a SYN/ACK packet to acknowledge receipt of the SYN packet. At this point both computers are ready for the exchange of data.

2.            Sequence number
The sequence number of the first data octet in this segment (except when SYN is present). If SYN is present, the sequence number is the initial sequence number (ISN) and the first data octet is ISN+1.

Though the Sequence number is not a congestion control mechanism it is considered to be required for the new TCP friendly protocol to identify each packet. This number is incremented by one for each data packet transmitted.  Determining that an acknowledgment refers to some sequence number sent but not yet acknowledged

3.            Acknowledgment number
If the ACK control bit is set, this field contains the value of the next sequence number which the sender of the segment is expecting to receive. Once a connection is established, this value is always sent.

NO. Though the Acknowledgment number is not a congestion control mechanism it is not considered to be required for the new TCP friendly protocol. We don’t require an acknowledgement for every packet sent to.

4.            SACK, Selective Acknowledgement. Algorithm.
This technique allows the data receiver to inform the sender about all segments that have arrived successfully, so the sender need retransmit only the segments that have actually been lost. This extension uses two TCP options. The first is an enabling option, SACK permitted, which may be sent in a SYN segment to indicate that the SACK option can be used once the connection is established. The other is the SACK option itself, which may be sent over an established connection once permission has been given.

YES. We would like to have the sack mechanism in the new protocol instead of acknowledging  every packet, sequential acknowledgement with some further specification is considered.

5.            TIME STAMP and RTTM, Round-Trip Time Measurement.
A technique for measuring the RTT by use of timestamps. The data segments are timestamped. The resulting ACK packets contain timestamps from the receiver. The resulting RTT can then be determined by the difference in the timestamps.

YES. A timestamp indicating when the packet is sent. A packet with sequence number j is timestamped. This timestamp should be used by the receiver to determine which losses belong to the same loss event. Sufficient for determining when losses belong to the same loss event, in the context of a protocol where this is understood by both sender and receiver, and where the sender saves the timestamps of transmitted
            data packets.

AIMD, Additive Increase, Multiplicative Decrease.  This is a Congestion control algorithm.
(In the absence of congestion, the TCP sender increases its congestion window by at most one packet per roundtrip time. In response to a congestion indication, the TCP sender decreases its congestion window by half. More precisely, the new congestion window is half of the minimum of the congestion window and the receiver's advertised window

6.            Slow Start. Congestion control algorithm.
This algorithm is used to gradually increase the size of the TCP congestion window. It operates by observing that the rate at which new packets should be injected into the network is the rate at which the acknowledgments are returned by the other end. Slow start reduces the burst affect when a host first transmits. It requires a host to start its transmissions slowly and then build up to the point where congestion starts to occur. The host does not initially know how many packets it can send, so it uses slow start as a way to gauge the network's capacity. A host starts a transmission by sending two packets to the receiver. When the receiver receives the segments, it returns ACKs (acknowledgements) as confirmation. The sender increments its window by two and sends four packets. This buildup continues with the sender doubling the number of packets it sends until an ACK is not received, indicating that the flow has reached the network's ability to handle traffic or the receivers ability to handle incoming traffic

YES. Slow-start performance is particularly important for the many flows   that are short-lived, and only have a small amount of data to transfer besides responsiveness to a new TCP connection: An active TCP friendly flow should ideally not affect the startup behavior of a new TCP flow. Specifically, a TCP-friendly flow should reduce its sending rate reasonably fast to ensure that the new TCP connection starting up will not suffer many losses. This is required to ensure that the TCP connection that is starting up does not prematurely end its slow start phase, or suffer a timeout, thereby requiring a long interval of time before increasing its sending rate to its fair share. Thus, any form of congestion    control that successfully avoids a high sending rate in the presence of a high packet drop rate should be sufficient to avoid congestion collapse from undelivered packets.

7.            Fast retransmit and fast recovery are algorithms that are designed to minimize the effect that dropping packets has on network throughput. The fast retransmit mechanism infers information from another TCP mechanism that a receiver uses to signal to the sender that it has received packets out of sequence. The technique is to send several duplicate ACKs to the sender.Fast retransmit takes advantage of this feature by assuming that duplicate ACKs indicates dropped packets. Instead of waiting for an ACK until the timer expires, the source resends packets if three such duplicate ACKs are received. This occurs before the timeout period and thus improves network throughput. For example, if a host receives packet 5 and 7, but not 6, it will send a duplicate ACK for packet 5 when it receives packet 7 (but not packet 6).

Fast recovery is a mechanism that replaces slow start when fast retransmit is used. Note that while duplicate ACKs indicate that a segment has been lost, it also indicates that packets are still flowing since the source received a packet with a sequence number higher than the missing packet. In this case, the assumption is that a single packet has been dropped and that the network is not fully congested. Therefore, the sender does not need to drop fully back to slow start mode but to half the previous rate.

Note that the preceding mechanisms are called Reno. RFC 2582 (The NewReno Modification to TCP's Fast Recovery Algorithm, April 1999) describes a modification to Reno to cover situations in which ACKs do not cover all of the outstanding data when loss was detected.

In simple words Fast Retransmit is When a TCP sender receives several duplicate ACKs, fast retransmit allows it to infer that a segment was lost. The sender retransmits what it considers to be this lost segment without waiting for the full timeout, thus saving time. And a sender invokes the Fast Recovery after Fast Retransmit. This algorithm allows the sender to transmit at half its previous rate (regulating the growth of its window based on congestion avoidance), rather than having to begin a Slow Start.


YES. Fast Retransmit and Fast Recovery is considered for the TCP friendly protocol as for, a newly starting TCP friendly flow has to be reasonably aggressive to obtain a fair share of bandwidth, when competing with existing TCP flows. If the TCP-friendly flow is not sufficiently aggressive, it may result in starvation of the TCP-friendly flow. On the other hand, excessive aggressiveness may result in unfairness to


8.            cwnd, Congestion window. TCP state variable.
This variable limits the amount of data a TCP can send. At any given time, a TCP MUST NOT send data with a sequence number higher than the sum of the highest acknowledged sequence number and the minimum of cwnd and rwnd.(receivder window)

YES, We would like to include this Mechanism in order to received feedback of the network. But Receiver window is not considered as required, but further thought needs to be given to this attribute.

9.      Checksum
The TCP must recover from data that is damaged, lost, duplicated, or delivered out of order by the internet communication system.  This is achieved by assigning a sequence number to each octet transmitted, and requiring a positive acknowledgment (ACK) from the receiving TCP.  If the ACK is not received within a timeout interval, the data is retransmitted.  At the receiver, the sequence numbers are used to correctly order segments that may be received out of order and to eliminate duplicates.  Damage is handled by adding a checksum to each segment transmitted, checking it at the checking it at the receiver, and discarding damaged segments.

YES. Checksum provides stronger verification that a message passes end-to-end without bit errors going undetected. We would be including this mechanism as it could provide end-to-end reliability via end-to-end checksum by protecting against data corruption errors between source and destination (links, switches/routers, memory bus) receiver, and discarding damaged segments. Should an individual datagram be tampered with (due to a hacker) or get corrupted during transmission (due to line noise, for example), the calculations of the sender and receiver will not match, and the protocol will detect this error or pass the damaged segment to the application with a warning.





Part 2


2. Identical to Homework (x – 1), Part 2. In other words, make a new “to-do” list,

with current items that are the next things to be done.


1.    Find out the importance of Maximum Segment Size (MSS) in implementing the new protocol. And also look for any other TCP congestion mechanisms.

2.    Discuss the work done so far with you advisor.

3.    Study various new implementations of TCP and study their differences.