TCP
Question 1 |
Consider a long-lived TCP session with an end-to-end bandwidth of 1 Gbps (= 109 bits/second). The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closest integer) before this sequence number can be used again is _________.
33 | |
34 | |
35 | |
36 |
Question 1 Explanation:
In TCP, Sequence number field is 32 bit, which means 232 sequence number per byte are possible. Whatever be the starting sequence number the possible number will be 232bytes
The process of using all the sequence number and repeating a previously used sequence number.
The time taken to wrap around is called wrap around time:
Minimum Time = Wrap around time = Total number of bits in sequence number / Bandwidth = 232 * 8 / 109 = 34.35 == 34 (closest integer)
The process of using all the sequence number and repeating a previously used sequence number.
The time taken to wrap around is called wrap around time:
Minimum Time = Wrap around time = Total number of bits in sequence number / Bandwidth = 232 * 8 / 109 = 34.35 == 34 (closest integer)
Question 2 |
Identify the correct sequence in which the following packets are transmitted on the network by a host when a browser requests a webpage from a remote server, assuming that the host has just been restarted.
HTTP GET request, DNS query, TCP SYN | |
DNS query, HTTP GET request, TCP SYN | |
DNS query, TCP SYN, HTTP GET request | |
TCP SYN, DNS query, HTTP GET request |
Question 2 Explanation:
When a browser requests a web page from a remote server then that requests (URL address) will be mapped to IP address using DNS query, then TCP synchronization takes place after that HTTP verify whether it is existed in the web server or not.
Question 3 |
Suppose two hosts use a TCP connection to transfer a large file. Which of the following statements is/are False with respect to the TCP connection?
1. If the sequence number of a segment is m, then the sequence number of the subsequent segment is always m+1. 2. 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. 3. The size of the advertised window never changes during the course of the TCP connection. 4. The number of unacknowledged bytes at the sender is always less than or equal to the advertised window
III only | |
I and III only | |
I and IV only | |
II and IV only |
Question 3 Explanation:
I. False.
If the sequence no. of the segment is m, then the sequence number of the subsequent segment depends on the current segment size.
II. True.
If the estimated RTT at any given point of time is t second, then the value of the retransmission timeout is always set to greater than or equal to t sec.
III. False.
The size of the advertized window may change during the course of the TCP connection depending on the processing capability at the receiver's side and the network traffic.
IV. True.
The number of unacknowledged bytes at the sender is always less than or equal to the advertised window, because the sender never sends no. of bytes greater than advertised window.
If the sequence no. of the segment is m, then the sequence number of the subsequent segment depends on the current segment size.
II. True.
If the estimated RTT at any given point of time is t second, then the value of the retransmission timeout is always set to greater than or equal to t sec.
III. False.
The size of the advertized window may change during the course of the TCP connection depending on the processing capability at the receiver's side and the network traffic.
IV. True.
The number of unacknowledged bytes at the sender is always less than or equal to the advertised window, because the sender never sends no. of bytes greater than advertised window.
Question 4 |
Assume that the bandwidth for a TCP connection is 1048560 bits/sec. Let α be the value of RTT in milliseconds. (rounded off to the nearest integer) after which the TCP window scale option is needed. Let β be the maximum possible window size the window scale option. Then the values of α and β are
63 milliseconds, 65535×214 | |
63 milliseconds, 65535×216
| |
500 milliseconds, 65535×214
| |
500 milliseconds, 65535×216
|
Question 4 Explanation:
TCP header sequence number field consist 16 bits. The maximum number of sequence numbers possible = 2^16 = 65,535.
The wrap around time for given link = 1048560 * α. The TCP window scale option is an option to increase the receive window size. TCP allows scaling of windows when wrap around time > 65,535.
==> 1048560 * α. > 65,535*8 bits
==> α = 0.5 sec = 500 mss
Scaling is done by specifying a one byte shift count in the header options field. The true receiver window size is left shifted by the value in shift count. A maximum value of 14 may be used for the shift count value. Therefore maximum window size with scaling option is 65535 × 2^14
.
The wrap around time for given link = 1048560 * α. The TCP window scale option is an option to increase the receive window size. TCP allows scaling of windows when wrap around time > 65,535.
==> 1048560 * α. > 65,535*8 bits
==> α = 0.5 sec = 500 mss
Scaling is done by specifying a one byte shift count in the header options field. The true receiver window size is left shifted by the value in shift count. A maximum value of 14 may be used for the shift count value. Therefore maximum window size with scaling option is 65535 × 2^14
.
Question 5 |
Consider the following statements.
I. TCP connections are full duplex. II. TCP has no option for selective acknowledgment III. TCP connections are message streams.
Only I is correct | |
Only I and III are correct | |
Only II and III are correct | |
All of I, II and III are correct
|
Question 5 Explanation:
In TCP, as sender and receiver can send segments at the same time, It is FULL-DUPLEX.
TCP can use selective ACK and
TCP uses byte streams that is every byte is send using TCP is numbered.
Question 6 |
Identify the correct order in which the following actions take place in an interaction between a web browser and a web server.
- The web browser requests a webpage using HTTP.
- The web browser establishes a TCP connection with the web server.
- The web server sends the requested webpage using HTTP.
- The web browser resolves the domain name using DNS.
4,2,1,3 | |
1,2,3,4 | |
4,1,2,3 | |
2,4,1,3 |
Question 6 Explanation:
First of all the browser must now know what IP to connect to. For this purpose browser takes help of Domain name system (DNS) servers which are used for resolving hostnames to IP addresses. As browser is an HTTP client and as HTTP is based on the TCP/IP protocols, first it establishes a TCP connection with the web server and requests a web page using HTTP, and then the web server sends the requested web page using HTTP. Hence the order is 4,2,1,3.
Question 7 |
Let the size of congestion window of a TCP connection be 32 KB when a timeout occurs. The round trip time of the connection is 100 msec and the maximum segment size used is 2 KB. The time taken (in msec) by the TCP connection to get back to 32 KB congestion window is _________.
1100 to 1300 | |
1101 to 1301 | |
1102 to 1302 | |
1103 to 1303 |
Question 7 Explanation:
Given that at the time of Time Out, Congestion Window Size is 32KB and RTT = 100ms
When Time Out occurs, for the next round of Slow Start, Threshold = (size of Cwnd) / 2
It means Threshold = 16KB
Slow Start
2KB
1RTT
4KB
2RTT
8KB
3RTT
16KB ----------- Threshold reaches. So Additive Increase Starts
4RTT
18KB
5RTT
20KB
6RTT
22KB
7RTT
24KB
8RTT
26KB
9RTT
28KB
10RTT
30KB
11RTT
32KB
So, Total no. of RTTs = 11 → 11 * 100 = 1100
When Time Out occurs, for the next round of Slow Start, Threshold = (size of Cwnd) / 2
It means Threshold = 16KB
Slow Start
2KB
1RTT
4KB
2RTT
8KB
3RTT
16KB ----------- Threshold reaches. So Additive Increase Starts
4RTT
18KB
5RTT
20KB
6RTT
22KB
7RTT
24KB
8RTT
26KB
9RTT
28KB
10RTT
30KB
11RTT
32KB
So, Total no. of RTTs = 11 → 11 * 100 = 1100
Question 8 |
Host A (on TCP/IP v4 network A) sends an IP datagram D to host B (also on TCP/IP v4 network B). Assume that no error occurred during the transmission of D. When D reaches B, which of the following IP header field(s) may be different from that of the original datagram D?
(i) TTL (ii) Checksum (iii) Fragment Offset
(i) only | |
(i) and (ii) only | |
(i) and (ii) only | |
(i), (ii) and (iii) |
Question 8 Explanation:
While an IP Datagram is transferring from one host to another host, TTL, Checksum and Fragmentation Offset will be changed.
Question 9 |
While opening a TCP connection, the initial sequence number is to be derived using a time-of-day (ToD) clock that keeps running even when the host is down. The low order 32 bits of the counter of the ToD clock is to be used for the initial sequence numbers. The clock counter increments once per millisecond. The maximum packet lifetime is given to be
Which one of the choices given below is closest to the minimum permissible rate at which sequence numbers used for packets of a connection can increase?
0.015/s
| |
0.064/s
| |
0.135/s | |
0.327/s
|
Question 9 Explanation:
32 bits are used to represent a sequence number. So we have 232 different sequence number.
The maximum packet lifetime is given is given 64s.
Maximum data rate possible(bandwidth) to avoid the wraparound = 232/64 = 226 Byte/sec.
The clock counter increments once per milliseconds = That means when then counter increments next possible sequence number is generated. The packet lifetime is 64 seconds and after this 64 seconds next sequence number is come. So that means in this 64 seconds only 1 sequence number is generated.
Hence the minimum rate is = 1/64 = 0.015/sec.
The maximum packet lifetime is given is given 64s.
Maximum data rate possible(bandwidth) to avoid the wraparound = 232/64 = 226 Byte/sec.
The clock counter increments once per milliseconds = That means when then counter increments next possible sequence number is generated. The packet lifetime is 64 seconds and after this 64 seconds next sequence number is come. So that means in this 64 seconds only 1 sequence number is generated.
Hence the minimum rate is = 1/64 = 0.015/sec.
Question 10 |
In the slow start phase of the TCP congestion control algorithm, the size of the congestion window
does not increase
| |
increases linearly | |
increases quadratically
| |
increases exponentially
|
Question 10 Explanation:
In slow start phase, window size will grow exponentially. when the threshold is reached and congestion avoidance phase begins. In congestion avoidance phase, the window is increased linearly.
Question 11 |
The three way handshake for TCP connection establishment is shown below.
Which of the following statements are TRUE?
(S1) Loss of SYN + ACK from the server will not establish a connection
(S2) Loss of ACK from the client cannot establish the connection
(S3) The server moves LISTEN → SYN_RCVD → SYN_SENT → ESTABLISHED in the state machine on no packet loss
(S4) The server moves LISTEN → SYN_RCVD → ESTABLISHED in the state machine on no packet loss.

S2 and S3 only | |
S1 and S4 | |
S1 and S3 | |
S2 and S4 |
Question 11 Explanation:
S1 → True.
S2 → False, because if after ACK client immediately sends data then everything goes on without worry.
S3 → False.
S4 → True.
S2 → False, because if after ACK client immediately sends data then everything goes on without worry.
S3 → False.
S4 → True.
There are 11 questions to complete.