GATE CSE TCP previous year Questions

#### Show Answer With Best Explanation

Explanation:
Given,
Random Sequence number chosen by P is X.
Random Sequence number chosen by Q is Y.

P sends a TCP connection request to Q with TCP Segment having,
SYN bit = 1, SEQ (Sequence) number = X, ACK bit = 0

Let’s briefly understand some terms,
Sequence Number: The Sequence Number for each segment is the number of the 1st Byte carried in that segment. Host can choose any Random Sequence Number.

SYN bit: It is used during connection to synchronize the connection. First TCP segment send by any Host have SYN bit =1.
TCP is full Duplex protocol. So, 1st Segment sent by Host P to Host Q and 1st Segment sent by Host Q to Host P contain SYN bit = 1.

ACK bit:
The ACK bit =1, indicate the segment contains Acknowledge.
The ACK bit =0, indicate the segment does not contain Acknowledge.

ACK(Acknowledge) number: ACK number is the Byte Number expected next.
If the receiver of the segment has successfully received Byte Number x from other party, if defines X+1 as the Acknowledge Number.

TCP Segment Header that is sent by Q to P have :

SYN = 1 , Because it is 1st Segment sent from Q to P, it is used to Synchronize the connection.

Seq number = y , It is given that y be Sequence number chosen by Q.

Ack number = X+1 , SYN flag consume one Sequence number. Byte number X is consume by Q. So, Q expect X+1 next Byte number.

FIN bit = 0 , when FIN bit = 1, Host want to terminate connection. when FIN bit = 0, Host does not want to terminate connection.

So, Option(III) is correct.

#### Show Answer With Best Explanation

Explanation:
Given Specification,
RTT(Round Trip Time)= 6ms
Thresold = 32KB
MSS(Maximum Segment Size) = 2KB

Congestion window size at time t+60 ms after all acknowledgements are processed= ?
Here, t+60 ms is nothing but t +(60/6) = t+10th RTT {After 10thRTT or at 11th RTT}

Logic to solve,
2) Increase the sender window size in multiple of MSS(2KB) and stops when thresold(32KB) reached.
3) Once Thresold reached, increased sender window size by 1MSS(2KB) till timeout occurs.

Let’s Solve,
1st Transmission = 2KB
2nd Transmission = 4KB
3rd Transmission = 8KB
4th Transmission = 16KB
5th Transmission = 32KB {Thresold reached}
Now increase sender window size by 1MSS(2KB)

6th Transmission = 34KB
7th Transmission = 36KB
8th Transmission = 38KB
9th Transmission = 40KB
10th Transmission = 42KB
11th Transmission = 44KB

So, Then the size of the congestion window (in KB) at time t+60 ms after all acknowledgements are processed is 44KB.

#### Show Answer With Best Explanation

Explanation:
Statement(I): The cwnd increase by 2 MSS on every successful acknowledgement. (False)
It is False because cwnd increase by 1 MSS on every successful acknowledgement.

Statement(II): The cwnd approximately doubles on every successful acknowledgement. (False)
It is False as the same reason for above.

Statement(III): The cwnd increase by 1 MSS every round trip time. (False)

Statement(IV): The cwnd approximately doubles every round trip time. (True)

There is a confusion between statement(II) and statement(IV).
Let’s understand it example

It is cleared with the diagram that:
The congestion window is increase by 1MSS on every successful acknowledge and
The congestion window approximately doubles every round trip time.

So, Option(III) is correct.

#### Show Answer With Best Explanation

Explanation:
Given,
Bandwidth = 1 Gbps (109 bits/second)

Calculation,
=> 1Gb = 1 sec
=> 109 bits = 1 sec
=> (109 / 8) Byte = 1 sec
=> (109 / 8) Sequence number = 1 sec {*TCP count each Byte*}
=> 1 Sequence number = (8 / 109 ) sec
=> 232 Sequence number = ( 232 * 8)/ 109 sec {*Total 232 sequence number possible* }
=> wrap arround time = 34.55 = 34(aproximate)

GATE CSE TCP previous year Questions

#### Show Answer With Best Explanation

Explanation:
TCP connection state diagram (RFC 793)
* FIN-WAIT-1
Client-side TCP is waiting for an acknowledgment of the connection termination request or for a simultaneous connection termination request from Server-side TCP. This state is normally of short duration.

* FIN-WAIT-2
TCP client is sent FIN segment to the TCP server. Server-side TCP responds by sending an ACK, which is received by the client-side TCP.Client-side TCP connection wait for the FIN from the server-side TCP.

* TIME-WAIT
Server side TCP is waiting for enough time to pass to be sure the server side TCP received the acknowledgment of its connection termination request.

* LAST-ACK
Client-side TCP is waiting for an acknowledgment of the connection termination request previously sent to Server. This state is entered when client-side TCP received a termination request before it sent its termination request.

#### Show Answer With Best Explanation

Explanation:
Statement(I): If the sequence number of a segment is m, then the sequence number of the subsequent segment is always m+1.(False)
1 Byte of Data consumes 1 Sequence number.If Sequence number of segment is m, then the Sequence number of subsequent segment is m+1,only if 1 Byte of Data is transferred. But it is already given that Host transfer large file. So, the statement is False.

Statement(II): If the estimated round trip time at any given point of time is t sec, the value of the retransmission timeout is always set to greater than or equal to t sec.(True)
TCP sets a timeout when it sends Data and if Data is not acknowledged before timeout expires it retransmit data. Timeout is based on RTT. Timeout is always set to greater than or equal to RTT.

Statement(III): The size of the advertised window never changes during the course of the TCP connection.(False)
Receiver’s window buffer is never changed.But depending upon the available window size, Advertised window is keep changing.
Let’s undestand it with example,
Suppose receiver window size is 1000B, so the size of advertised window is 1000B. Again suppose sender have 400B of data to sent, it sends to receiver. Now receiver window have (1000-400) 600B of available space. Now receiver will sent acknowlege to sender with advertised window of 600B. So, The size of the advertised window keep change during the course of the TCP connection.

Statement(IV): The number of unacknowledged bytes at the sender is always less than or equal to the advertised window.(True)
Because sender will never sends number of Byte greater than the advertised window.

So, Option(II) is correct.

#### Show Answer With Best Explanation

Explanation:
RTT: Round-trip delay (RTD) or round-trip time (RTT) is the amount of time it takes for a signal to be sent plus the amount of time it takes for acknowledgement of that signal having been received.

Bandwidth-Delay Product(BDP): The bandwidth-delay product is the product of a data link’s capacity (in bits per second) and its round-trip time (in seconds). BDP = RTT * bandwidth

Given,
Bandwidth(or data link capacity) = 1048560 bits/sec
TCP window scale option is needed. It is needed for efficient transfer of data when the Bandwidth-Delay Product (BDP) is greater than 64 KB
{* BDP = 64KB (BDP is maximum 216-1 =65535 B )*}

Calculation,
BDP = RTT * bandwidth
=> 65,535 B = Î± * 1048560 bits/sec
=>
=> Î± = 0.5 sec = 500 milliseconds

By using the window scale option, the receiver window size increased up to a maximum of 1GB.
Receiver window size from 64KB to 1GB i.e. 216B to 230B.
a 14bits shift count is used in TCP Header. So, the maximum possible window size gets increased from 216-1 to (216-1 * 214) or 65,535 to 65,535 * 214.

So, Option(III) is correct.

GATE CSE TCP previous year Questions

#### Show Answer With Best Explanation

Explanation:
Statement(I): TCP connections are full duplex.(True)
TCP offers full-duplex service, in which data can flow in both directions at the same time. Each TCP then has a sending and receiving buffer, and segments move in both directions.

Statement(II): TCP has no option for selective acknowledgment.(False)
TCP has option for selective acknowledgment. With selective acknowledgments, the data receiver can inform the sender about all segments that have arrived successfully, so the sender need retransmit only the segments that have actually been lost.

Statement(III): TCP connections are message streams.(False)
TCP connections are Byte stream protocol. While sending data, each Byte of segment is counted and First Byte number of segment is called Sequence number.Sequence number of TCP segment is stored in TCP Header.

So, Option(I) is correct.

#### Show Answer With Best Explanation

Explanation:
Given,
size of congestion window = 32KB
Round Trip Time = 100ms
Maximum segment size = 2KB

Logic to solve,
When Time-out occurs in TCP slow start phase, Thresold value is calculated by
Thresold = (Congestion window size)/2

So, start with 1MSS (or 2KB) as sender window size. Slow start phase will begin and window size will grow exponentially till Thresod reached. After that congestion avaidance phase will begin. Now window size will grow linearly till 16MSS (or 32KB).

Calculation,
Thresold = (Congestion window size)/2 = 32KB / 2 = 16KB

Slow start phase:
window size is 1 MSS (or 2KB)
After 1st Round Trip, window size is 2 MSS (or 4KB)
After 2nd Round Trip, window size is 4 MSS (or 8KB)
After 3rd Round Trip, window size is 8 MSS (or 16KB)
(Thresold reached)
Congestion avaodance phase:
After 4th Round Trip, window size is 9 MSS (or 18KB)
After 5th Round Trip, window size is 10 MSS (or 20KB)
After 6th Round Trip, window size is 11 MSS (or 22KB)
After 7th Round Trip, window size is 12 MSS (or 24KB)
After 8th Round Trip, window size is 13 MSS (or 26KB)
After 9th Round Trip, window size is 14 MSS (or 28KB)
After 10th Round Trip, window size is 15 MSS (or 30KB)
After 11th Round Trip, window size is 16 MSS (or 32KB)

Total Round Trip = 11
Total Round Trip Time = 11* 100 ms = 1100ms
The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is 1100.

GATE TCP previous year Questions

error: Content is protected !!