0% found this document useful (0 votes)
85 views6 pages

TCP Data Transmission Overview

The document contains an assignment for a Computer Networks and Internet Protocol course, featuring 10 multiple-choice questions (MCQs) related to TCP, transport layer functionalities, and sliding window protocols. Each question includes the correct answer and a detailed explanation of the concepts involved. The assignment aims to assess students' understanding of key networking principles and protocols.

Uploaded by

dharmaduraik04
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
85 views6 pages

TCP Data Transmission Overview

The document contains an assignment for a Computer Networks and Internet Protocol course, featuring 10 multiple-choice questions (MCQs) related to TCP, transport layer functionalities, and sliding window protocols. Each question includes the correct answer and a detailed explanation of the concepts involved. The assignment aims to assess students' understanding of key networking principles and protocols.

Uploaded by

dharmaduraik04
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

NPTEL Online Certification Courses

Indian Institute of Technology Kharagpur


Jan 2025
Course Name: Computer Networks and Internet Protocol
Assignment 3 - Week 3 (Jan 2025)
TYPE OF QUESTION: MCQ/MSQ
Number of questions: 10 Total mark: 10 X 1 = 10

QUESTION 1

What kind of sequence number does TCP use?

a) byte-oriented sequence number


b) packet-oriented sequence number
c) Randomly generated fixed sequence numbers
d) none of them

Answer: (a)

Detailed solution:
TCP uses byte-oriented sequence numbering to ensure reliable, ordered, and efficient data
transmission over a network.

QUESTION 2

Identify the FALSE statement(s) in the following-


I. The transport layer functionalities (e.g., connection establishment, flow control, error
detection) operate at an abstract level using data structures, algorithms, and system calls
implemented in the OS kernel.
II. The operating system (OS) kernel does not play any role in supporting the transport layer
functionalities of the TCP/IP protocol stack.

a) Only (I)
b) Only (II)
c) Both (I) and (II)
d) Neither (I) nor (II)

Answer: (b)

Detailed solution:
The transport layer relies on data structures (e.g., buffers, sequence number tables) to manage
connections, algorithms (e.g., sliding window for flow control, checksum for error detection) to
ensure reliable communication, and system calls (e.g., socket(), send(), recv()) to interact with the OS
kernel, which implements these functionalities abstractly for application-level use.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Jan 2025

QUESTION 3

Which of the following services is NOT supported by the transport layer?

a) End-to-end packet delivery


b) Ordered packet delivery
c) Reliable data delivery
d) Forwarding the datagram from one hop to another hop in the network

Answer: (d)
Detailed solution:
The transport layer provides services like End-to-end packet delivery, Ordered packet delivery,
Reliable data delivery, Connection establishment, and Flow & Congestion control etc. The hop-to-
hop network packet forwarding is supported by data link layer and network layer.

QUESTION 4

What can be a primary mechanism used to ensure the reliable data transfer in a stop-and-wait
algorithm (Noisy Channel)?

a) Employing only error detection and correction codes without requiring acknowledgements.
b) Increasing the timeout interval.
c) Using a sequence number to identify each packet uniquely and waiting for an
acknowledgement for each packet before sending the next packet.
d) Using a sliding window to send multiple packets without waiting for their acknowledgements.

Answer: (c)

Detailed solution:
Stop-and-Wait (Noisy Channel) flow control algorithm uses a sequence number to individually
identify each frame and corresponding acknowledgement. It ensures reliability by attaching a
sequence number to each packet and transmits a packet & waits for an acknowledgment (ACK)
from the receiver before sending the next packet. If the ACK is not received within a timeout period,
the sender retransmits the packet.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Jan 2025

QUESTION 5

A data of 40 bytes need to be delivered using TCP protocol but a sender can send a segment of
maximum size 12 bytes only. Identify the sequence number of the last segment formed if the sequence
number field uses 5 bits only? [Assume sequence number starts from 0]

a) 1
b) 4
c) 12
d) 31

Answer: (b)

Detailed solution:
TCP uses byte sequencing. It treats data as a continuous stream of bytes rather than discrete packets.
Since the sequence number field uses 5 bits only, it produces sequence numbers ranging from 0 to
31.
The first segment of 12 bytes will use the sequence number range (0-11),
Next segment of 12 bytes will use the sequence number range (12-23),
Next segment of 12 bytes will use the sequence number range (24-31) & (0-3), and
The last segment of 4 bytes will use the sequence number range (4-7).
The sequence number in a TCP segment header refers to the first byte of data in that segment
relative to the start of the stream.

QUESTION 6

A sender uses a sliding window protocol with a window size of 5. The range of sequence numbers
follows modulo 8 ( the sequence number starts from 0 to 7). If the receiver acknowledges packet 1,
what will be the sender’s new window range?

a) 1-5
b) 2-6
c) 3-7
d) 0-4

Answer: (b)

Detailed solution:
When the receiver acknowledges the packet, resulting in a forward slide of the sender’s window. The
sliding window now starts at 2 (the next unacknowledged sequence number) till the allowed window
size.
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Jan 2025

QUESTION 7

Determine whether the following information is True or False?

“During the three-way handshaking of connection establishment procedure (from Host 1 to Host 2),
Delayed duplicate SYN can be handled by TCP at Host 2 simply by ignoring it, as the sequence
number is invalid”

a) True
b) False

Answer: (a)
Detailed solution:
The TCP 3-Way Handshake is a fundamental process that establishes a reliable connection between
two devices over a TCP/IP network. During the handshake, the client and server exchange initial
sequence numbers. It uses sequence numbers to identify and validate the legitimacy of connection
requests. A delayed duplicate SYN will have an outdated sequence number that doesn't match the
current connection state at Host 2 and can be ignored as invalid sequence number.

QUESTION 8

TCP instance uses a sliding window protocol in the noisy channel. A timeout occurs due to the loss
of a segment (or the acknowledgement). Mark the RIGHT statement among the following-

a) In the case of Go-Back-N ARQ, if any segment of the sliding window is lost, all the segments
of the sliding window are retransmitted while in Selective Repeat ARQ, only the lost packets
are selectively transmitted.
b) In the case of Go-Back-N ARQ, if any segment of the sliding window is lost, only the lost
packets of the sliding window are selectively retransmitted while in Selective Repeat ARQ,
all packets of the sliding window are retransmitted.
c) In both cases, Go-Back-N ARQ and Selective Repeat ARQ, all packets of the sliding window
are retransmitted.
d) In the both cases, Go-Back-N ARQ and Selective Repeat ARQ, only lost packets of the
sliding window are selectively retransmitted.

Answer: (a)
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Jan 2025

Detailed solution:
In the case of Go-Back-N ARQ, if any segment of the sliding window is lost, all the segments of the
corresponding sliding window are retransmitted while in Selective Repeat ARQ, only the lost packets
are selectively transmitted.

QUESTION 9

Consider a sender using the Go-Back-N ARQ protocol with a window size 5. The sequence number
ranges from 0 to 7 (modulo 8). The sender initially transmits packets with the sequence numbers- 0,
1, 2, 3, and 4. During the transmission, packet 3 is lost in the network. The sender receives a
cumulative ACK for the packet 2. The sender continues sending packet 5, 6, and 7 but the receiver
denies accepting them due to the loss of packet 3.
Identify the range of packets that will be retransmitted by the sender after the timeout of packet 3?

a) 0, 1, 2, 3, and 4.
b) 2, 3, 4, 5, and 6.
c) 3, 4, 5, 6, and 7.
d) 1, 2, 3, 4, and 5.

Answer: (c)
Detailed solution:

In Go-Back-N ARQ, when a timeout occurs, the sender retransmits all packets starting from the lost
packet to all permissible packets in accordance with the window size.

QUESTION 10

A client and a server establish a connection using TCP's three-way handshake. The following details
are given:
● Initial sequence number of the client: 100 and initial sequence number of the server: 300.
● RTT (Round Trip Time): 80ms.
● Each TCP segment carries 40 bytes of header information.
● The server sends a SYN-ACK segment, and the acknowledgement (ACK) segment from the client is
delayed due to congestion, taking 100ms to reach the server.
How much time does it take to establish the connection under such a scenario?

a) 100ms
b) 280ms
c) 180ms
d) 260ms
NPTEL Online Certification Courses
Indian Institute of Technology Kharagpur
Jan 2025

Answer: (c)

Detailed solution:
In three way handshaking, the connection is established after three steps. In first step, sender sends a
connection request SYN packet to the server. Server responds to client with SYN+ACK packet.
Finally, sender sends a ACK packet to the server. Since RTT = 80ms so for one way packet
transmission will take 40ms. Since, there is a delay during transmission of ACK packet from sender
to server due to congestion and it takes greater time i.e. 100ms. So, the total time needed to complete
this connection procedure will be (time taken for SYN packet + time taken for SYN+ACK packet +
time taken for ACK packet) i.e. (80/2ms+80/2ms+100ms=180ms).

Common questions

Powered by AI

Congestion affects the TCP three-way handshake by introducing delays in acknowledgment transmissions, such as the ACK segment in the final step taking longer due to network congestion. Under such conditions, the connection establishment takes longer to complete, as witnessed in scenarios with a delayed ACK taking 100ms to reach the server, which leads to longer RTTs and reduced speed in establishing a connection .

The operating system kernel is crucial for transport layer functionalities as it implements the underlying data structures, algorithms, and system calls that the transport layer uses. These include managing connections with buffers, sequence number tables, ensuring reliable communication with sliding windows, checksums, and interacting with application-level operations through system calls like socket creation .

A small TCP window size limits the number of packets that can be sent without waiting for an ACK, thus reducing data throughput and efficiency, especially in high-latency or high-bandwidth networks. This limitation increases protocol overhead due to more frequent acknowledgments and lesser utilization of the available bandwidth, which can bottleneck the data transmission process .

TCP ensures reliable delivery by using sequence numbers, acknowledgments, and various error-detection and correction algorithms like checksums. The sequence numbers guarantee in-order packet delivery, while ACKs confirm successful reception of packets. If a packet or ACK is lost, TCP relies on timeouts and retransmissions to maintain reliability .

The transport layer provides end-to-end communication services, such as ordered packet delivery, reliable data transfer, and flow control, ensuring data is appropriately sequenced and error-free from sender to receiver. In contrast, the network layer handles the routing of packets from source to destination across the network, involving tasks such as forwarding and addressing, typically at a hop-by-hop basis .

TCP mitigates issues with duplicate SYN packets by using sequence numbers to validate connection requests. During the three-way handshake, a delayed duplicate SYN would be identified by its outdated sequence number, which wouldn't match the current connection state, allowing the host to ignore it, thus preventing the establishment of a false or redundant connection .

The sliding window protocol is more efficient than the stop-and-wait protocol as it allows multiple packets to be in transit before requiring an acknowledgment. In noisy channels, this reduces idle time for the sender compared to stop-and-wait, which only allows one packet to be sent at a time and waits for its ACK before sending the next. This increased throughput significantly improves efficiency, especially in high-latency networks .

With a 5-bit sequence number field, TCP sequence numbers can range from 0 to 31. This limited range necessitates careful handling of sequence number wrapping, especially in high-frequency transmissions. As numbers wrap around quickly, care must be taken to properly track the sequence continuity to maintain data integrity and avoid confusion about packet ordering as the sequence numbers cycle through multiple times during communication .

TCP employs a byte-oriented sequence numbering method to ensure reliable, ordered, and efficient data transmission. This method is preferred because it allows for accurate tracking of byte sequences rather than managing discrete packets, which helps in managing flow control, segment loss, and ensuring the correct order of bytes in the stream .

In Go-Back-N ARQ, if any segment of the sliding window is lost, the sender retransmits all packets starting from the lost packet through all permissible packets within the window size. This can lead to inefficiencies because all subsequent packets are retransmitted, even if they were received correctly, resulting in increased redundancy and network traffic .

You might also like