TCS-604: Common Exam Questions

Here are the questions and topics that were repeated across the 2023, 2024, and 2025 exam papers.

Topic: Delay Calculation ($d_{prop}$ vs $d_{trans}$)
2023 - Q1.c 2024 - Q1.c

Question:

Consider two hosts A and B, connected by a single link of rate R bps. Suppose that the two hosts are separated by m meters, and suppose the propagation speed along the link is s meters/sec. Host A is to send a packet of size L bits to Host B.

  1. Express the propagation delay, $d_{prop}$, in terms of m and s.
  2. Determine the transmission time of the packet, $d_{trans}$, in terms of L and R.
  3. Suppose $s=2.5 \times 10^8$ m/s, $L=100$ bits, and $R=28$ Kbps. Find the distance m so that $d_{prop}$ equals $d_{trans}$.

Consolidated Answer:

1. Propagation Delay ($d_{prop}$):

This is the time it takes for the first bit to travel from the sender to the receiver. It's a function of distance and speed.

$d_{prop}$ = distance / propagation speed = m / s

2. Transmission Time ($d_{trans}$):

This is the time it takes for the sender to push all the packet's bits onto the link. It's a function of packet size and bandwidth.

$d_{trans}$ = packet size / bandwidth = L / R

3. Calculation:

We are given:

  • Propagation speed (s) = $2.5 \times 10^8$ m/s
  • Packet size (L) = 100 bits
  • Bandwidth (R) = 28 Kbps = 28,000 bits/sec

We need to find distance `m` where $d_{prop} = d_{trans}$.

  1. Set the formulas equal:

    m / s = L / R

  2. Solve for m:

    m = (L * s) / R

  3. Substitute the values:

    m = (100 bits * 2.5 \times 10^8 m/s) / 28,000 bits/s

    m = (2.5 \times 10^{10}) / (2.8 \times 10^4)

    m = (2.5 / 2.8) \times 10^6

    m \approx 0.892857 \times 10^6 \text{ meters}

    m \approx 892,857 \text{ meters} (or 892.86 km)

Topic: Subnetting (192.168.10.0/28)
2023 - Q3.c 2024 - Q3.c

Question:

Using the illustration, what would be the IP address of E0 if you were using the eighth subnet? The network ID is 192.168.10.0/28 and you need to use the last available IP address in the range. The zero subnet should not be considered valid for this question.

Using the illustration from the previous question, what would be the IP address of S0 if you were using the first subnet? The network ID is 192.168.10.0/28 and you need to use the last available IP address in the range. Again, the zero subnet should not be considered valid for this question.

Consolidated Answer:

Network Analysis:

  • Network ID: 192.168.10.0/28
  • Subnet Mask: /28 is 255.255.255.240.
  • Host bits: $32 - 28 = 4$ host bits.
  • Block Size: $2^4 = 16$. The subnets increment by 16 in the last octet (.0, .16, .32, .48, etc.).
  • Hosts per subnet: $2^4 - 2 = 14$ usable hosts.
  • "Zero subnet" (192.168.10.0) is invalid, so our first valid subnet is 192.168.10.16.

A: IP of E0 (Eighth subnet, last available IP):

We list the *valid* subnets starting from .16:

  1. Subnet 1: .16
  2. Subnet 2: .32
  3. Subnet 3: .48
  4. Subnet 4: .64
  5. Subnet 5: .80
  6. Subnet 6: .96
  7. Subnet 7: .112
  8. Subnet 8: .128
  • Network ID: 192.168.10.128
  • Next Network ID: .144
  • Broadcast ID: 192.168.10.143 (one less than next network)
  • Host Range: .129 to .142
  • Last available IP: 192.168.10.142

B: IP of S0 (First subnet, last available IP):

  • First valid subnet (skipping .0) is .16
  • Network ID: 192.168.10.16
  • Next Network ID: .32
  • Broadcast ID: 192.168.10.31
  • Host Range: .17 to .30
  • Last available IP: 192.168.10.30
Topic: Checksum Calculation
2023 - Q4.a 2024 - Q4.a

Question:

A sender wants to send 4 frames each of 8 bits to a receiver, where the frames are 11001100, 10101010, 11110000 and 11000011. Compute the checksum at sender's side.

The receiver receives the data 11001100, 10101011, 11110000 and 11000011. Now compute the checksum at receiver's side. And check whether the data received is error free or not.

Consolidated Answer:

We use 8-bit 1's complement arithmetic (add, and wrap any carry-out bit).

Sender Side Calculation:

  11001100
+ 10101010
----------
1 01110110  -> Wrap carry: 01110110 + 1 = 01110111

  01110111
+ 11110000
----------
1 01100111  -> Wrap carry: 01100111 + 1 = 01101000

  01101000
+ 11000011
----------
1 00101011  -> Wrap carry: 00101011 + 1 = 00101100

Final Sum = 00101100.

Checksum (1's complement of sum) = 11010011. This is what the sender transmits.

Receiver Side Calculation:

The receiver adds all received data blocks *and* the received checksum.

  11001100  (Data 1)
+ 10101011  (Data 2 - Note the error)
----------
1 01110111  -> Wrap carry: 01110111 + 1 = 01111000

  01111000
+ 11110000  (Data 3)
----------
1 01101000  -> Wrap carry: 01101000 + 1 = 01101001

  01101001
+ 11000011  (Data 4)
----------
1 00101100  -> Wrap carry: 00101100 + 1 = 00101101

  00101101  (Sum of received data)
+ 11010011  (Received checksum)
----------
1 00000000  -> Wrap carry: 00000000 + 1 = 00000001

Final Receiver Sum = 00000001.

Conclusion:

For the data to be error-free, the 1's complement sum at the receiver must be all ones (11111111) or, if summing the checksum too, all zeros (00000000). Since the result is 00000001, an error has been detected.

Topic: Reliable Data Transfer (Stop-and-Wait, GBN, SR)
2023 - Q4.c 2024 - Q4.c 2025 - Q4.b

Question:

Explain the working functionality of Stop-and-wait, Go Back N, and Selective Repeat. What is the drawback of stop-and-wait protocol? How it can be solved?

Consolidated Answer:

Drawback of Stop-and-Wait:

The primary drawback of Stop-and-Wait is its extreme inefficiency. The sender sends one packet and then *stops* and *waits* for an ACK. The entire link is idle for the full Round Trip Time (RTT). This results in very low link utilization, especially on high-bandwidth or high-delay (long) links.

How it is Solved:

The problem is solved using pipelining. Pipelining allows the sender to send *multiple* packets (a "window" of N packets) before it needs to receive the ACK for the first packet. This keeps the "pipe" full of data and dramatically increases efficiency. Go-Back-N and Selective Repeat are the two main pipelined protocols.

Comparison of Pipelined Protocols:

  • Go-Back-N (GBN):
    • Working: Allows a sender window of size N. It uses *cumulative ACKs* (ACK `n` means `n` and all before it are received).
    • Error Handling: If packet `n` is lost, the receiver discards all subsequent packets (`n+1`, `n+2`...) even if they arrive correctly. When the sender's timer for packet `n` expires, it "goes back" and retransmits packet `n` *and all subsequent packets* in the window.
    • Complexity: Simple receiver (no buffering), complex sender.
  • Selective Repeat (SR):
    • Working: Allows a sender window of size N. It uses *individual ACKs* for each packet.
    • Error Handling: If packet `n` is lost, the receiver ACKs subsequent packets (`n+1`, `n+2`...) and *buffers* them. The sender's timer for *only packet `n`* expires, and it retransmits *only packet `n`*. The receiver then delivers the buffered packets in order.
    • Complexity: Complex sender and complex receiver (must buffer, reorder).
    • Performance: The most efficient RDT protocol, as it minimizes retransmissions.
Topic: Subnetting (General Class C)
2023 - Q5.b 2024 - Q5.b

Question:

A: Suppose, we have a big single network having IP Address 200.1.2.0. Divide this network into 4 subnets.

B: What is the subnetwork address for a host with the IP address 200.10.5.68/28?

Consolidated Answer:

A: Divide 200.1.2.0 (Class C, /24) into 4 subnets.

  • The default mask for 200.1.2.0 is /24.
  • To get 4 subnets, we need to borrow subnet bits ($s$).
  • Formula: $2^s \ge 4$. This means $s = 2$ bits.
  • New subnet mask = Default mask + borrowed bits = $24 + 2 = 26$.
  • The new mask is /26, or 255.255.255.192.
  • The block size for /26 is $256 - 192 = 64$.
  • The 4 subnets are:
    1. 200.1.2.0/26
    2. 200.1.2.64/26
    3. 200.1.2.128/26
    4. 200.1.2.192/26

B: Subnetwork address for 200.10.5.68/28.

  • Host IP: 200.10.5.68
  • Mask: /28, which is 255.255.255.240.
  • The block size for /28 is $256 - 240 = 16$.
  • We need to find the multiple of 16 that is less than or equal to the host's octet (68).
  • Multiples of 16: 0, 16, 32, 48, 64, 80...
  • The highest multiple less than or equal to 68 is 64.
  • The subnetwork address is 200.10.5.64.
Topic: Common Protocols (DHCP, NAT, ICMP)
2023 - Q5.c 2024 - Q5.c 2025 - Q5.b (NAT)

Question:

Explain the working functionality of DHCP, Network Address Translation (NAT), and Internet Control Message Protocol (ICMP).

Consolidated Answer:

DHCP (Dynamic Host Configuration Protocol):

  • Function: Automatically assigns IP addresses and other network configuration (like subnet mask, default gateway, and DNS server) to devices when they join a network.
  • Process (DORA):
    1. Discover: The client broadcasts a message ("Is there a DHCP server out there?").
    2. Offer: A DHCP server replies with an "offer" of a specific IP address.
    3. Request: The client broadcasts that it accepts the offered IP.
    4. Acknowledge: The server confirms the lease and updates its records.

NAT (Network Address Translation):

  • Function: Allows multiple devices on a private network (e.g., 192.168.1.x) to share a single, globally unique public IP address. This is essential for solving the IPv4 address shortage.
  • Process: The NAT router maintains a "translation table".
    • Outbound: It rewrites the *source* private IP and port to its *own public* IP and a new port.
    • Inbound: When a reply comes back, it looks up the port in its table and rewrites the *destination* public IP and port back to the original *private* IP and port.

ICMP (Internet Control Message Protocol):

  • Function: A network-layer protocol used by hosts and routers to send error messages and operational information. It is a "control" protocol, not a "data" protocol.
  • Examples:
    • ping uses ICMP Echo Request and Echo Reply messages to test connectivity.
    • traceroute uses ICMP Time Exceeded messages to map the route to a destination.
    • A router sends an ICMP Destination Unreachable message if it can't find a route for a packet.
Topic: TCP Congestion & Flow Control
2024 - Q4.b 2025 - Q5.a

Question:

Discuss how TCP implements flow control and congestion control mechanisms. How many phases are there in TCP congestion control algorithm?

Consolidated Answer:

These are two different mechanisms to "throttle" the sender, but for different reasons.

Flow Control (Protects the Receiver):

  • Purpose: To prevent the sender from sending data faster than the *receiver's application* can read it (i.e., overflowing the *receiver's buffer*).
  • Mechanism: The receiver advertises its available buffer space in every ACK it sends. This is the Receive Window (rwnd) field in the TCP header. The sender ensures its amount of un-ACKed data is always less than or equal to rwnd.

Congestion Control (Protects the Network):

  • Purpose: To prevent the sender from sending data faster than the *network* (i.e., routers) can handle, which causes packet loss.
  • Mechanism: The sender maintains a *second* window, the Congestion Window (cwnd). The sender's rate is limited by min(rwnd, cwnd).

Phases of Congestion Control:

  1. Slow Start: At the beginning, cwnd = 1 MSS. It grows *exponentially* (doubles every RTT). This happens until cwnd reaches the threshold (ssthresh).
  2. Congestion Avoidance: Once cwnd > ssthresh, growth slows to be *linear* (it adds 1 MSS per RTT). This probes for more bandwidth more gently.
  3. Congestion Detection / Recovery: This is the reaction to packet loss.
    • On Timeout (severe loss): ssthresh is set to cwnd / 2. cwnd is reset to 1, and it re-enters Slow Start.
    • On 3 Duplicate ACKs (mild loss): ssthresh is set to cwnd / 2. cwnd is also set to ssthresh. It skips Slow Start and enters Congestion Avoidance/Fast Recovery.