Practice tests · GATE

GATE computer networks: 5 practice questions with answers

By the PrepMatic team · Updated · 4 min read

On this page
  1. What GATE tests in computer networks
  2. Practice questions
  3. Answers and explanations
  4. How to prepare computer networks
  5. Take the full topic test on PrepMatic

Computer Networks is a section of the GATE CS paper where most questions are calculations on a fixed set of formulas: subnet masks, throughput and utilisation, window sizes, fragmentation and congestion windows. Once you know the formulas and the usual conventions, the section is among the more mechanical ones. The five original questions below use the patterns that come up most.

What GATE tests in computer networks

The GATE 2027 CS wording for this section covers layering, switching, the data link layer with MAC and Ethernet, distance-vector and link-state routing, IPv4 fragmentation, CIDR and NAT, TCP flow and congestion control, the socket API, DNS and HTTP. Confirm the current list on the official syllabus page. The real paper also has MSQ and NAT questions; all five below are MCQ.

Practice questions

Question 1

A host has the IP address 172.16.37.100 with the prefix length /20. The broadcast address of its subnet is:

  • A. 172.16.37.255
  • B. 172.16.63.255
  • C. 172.16.39.255
  • D. 172.16.47.255

Question 2

A CSMA/CD network runs at 100 Mbps over a 2 km cable. The signal propagation speed is 2 × 10⁸ m/s, and other delays can be ignored. For a sender to detect every collision, the minimum frame size is:

  • A. 250 bytes
  • B. 500 bytes
  • C. 1000 bytes
  • D. 2000 bytes

Question 3

A sender uses Go-Back-N over a 4 Mbps link with a one-way propagation delay of 20 ms. Frames are 1000 bytes long. Ignore header size and acknowledgement transmission time. The minimum number of bits in the sequence number field that allows the sender to keep the link fully utilised is:

  • A. 3
  • B. 4
  • C. 5
  • D. 6

Question 4

A TCP sender starts with cwnd = 1 MSS and ssthresh = 16 MSS. It doubles cwnd every RTT in slow start until cwnd reaches ssthresh, then adds 1 MSS per RTT. A timeout occurs when cwnd is 18 MSS. Using the rule ssthresh = cwnd / 2, the new value of ssthresh is:

  • A. 8 MSS
  • B. 9 MSS
  • C. 16 MSS
  • D. 18 MSS

Question 5

An IPv4 datagram of total length 4000 bytes, with a 20-byte header and no options, is sent over a link with an MTU of 1500 bytes. The value in the fragment offset field of the last fragment is:

  • A. 370
  • B. 740
  • C. 1480
  • D. 2960

Answers and explanations

  1. D. A /20 mask is 255.255.240.0. The third octet is 37 = 00100101 and the mask byte is 11110000, so the network address has third octet 00100000 = 32, giving network 172.16.32.0. The host bits in the third octet are 1111 = 15, so the broadcast address is 172.16.47.255. Option B, 172.16.63.255, would be the broadcast address for a /19 prefix.
  2. A. Detection requires the transmission time of the frame to be at least the round-trip propagation time. One-way delay = 2000 m / (2 × 10⁸ m/s) = 10 µs, so the round trip is 20 µs. Minimum frame size = 100 × 10⁶ bit/s × 20 × 10⁻⁶ s = 2000 bits = 250 bytes. Option D forgets to convert bits to bytes.
  3. C. Transmission time = 8000 bits ÷ (4 × 10⁶ bit/s) = 2 ms. The round-trip delay is 40 ms. Frames the sender can send before the first acknowledgement returns = 1 + 40 / 2 = 21. Go-Back-N needs a sequence space at least one larger than the window, so 22 numbers. Since 2⁴ = 16 is too small and 2⁵ = 32 is enough, 5 bits are needed.
  4. B. The cwnd values at the start of each RTT are 1, 2, 4, 8 and 16, then 17 and 18. With cwnd at 18 MSS when the timeout hits, the textbook rule gives ssthresh = 18 / 2 = 9 MSS, and cwnd restarts at 1 MSS. Option C is the old ssthresh, which the timeout replaces.
  5. A. The data is 4000 − 20 = 3980 bytes. Each fragment can carry at most 1500 − 20 = 1480 bytes of data, and 1480 is a multiple of 8. The fragments carry 1480, 1480 and 1020 bytes. The last fragment starts after 2960 bytes, and the offset field counts in units of 8 bytes: 2960 / 8 = 370.

How to prepare computer networks

  • Keep a one-page formula sheet and use it daily. Stop-and-wait efficiency = Tt / (Tt + 2Tp); window for full use = 1 + 2Tp/Tt; Go-Back-N needs sequence numbers ≥ window + 1, Selective Repeat ≥ 2 × window; minimum CSMA/CD frame = 2Tp × bandwidth.
  • Treat subnetting as a binary skill. Write the interesting octet in binary, apply the mask, and read off network, broadcast, first and last host. Practise until it takes 30 seconds.
  • Draw the congestion window against time for slow start, congestion avoidance, fast retransmit and fast recovery, and note what each loss event does to cwnd and ssthresh.
  • Memorise IPv4 fragmentation rules: data per fragment is a multiple of 8 (except the last), offsets count in 8-byte units, and the more-fragments flag is 0 only on the last fragment.
  • Read units carefully: Mbps versus MBps, bits versus bytes, ms versus µs. Most wrong NAT answers here are unit slips. For routing, simulate distance-vector updates by hand, including count-to-infinity.

See the GATE CSE preparation guide for the plan around this subject, and compare problem styles with operating systems and computer organisation.

Take the full topic test on PrepMatic

PrepMatic's topic tests run about 15 questions in 30 minutes, enough to test your formula recall against the clock. The free assessment shows your weakest subjects first.

Turn the GATE syllabus into a plan you can finish

Take a free GATE assessment on PrepMatic. It shows where you stand in your branch, turns the syllabus into a plan around the hours you actually have, and builds mock tests focused on your weak subjects.

Start free assessment →Free forever plan · No credit card · 2-minute setup

Related

More in GATE

← All practice tests