Practice tests · GATE
GATE computer networks: 5 practice questions with answers
On this page
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
- 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.
- 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.
- 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.
- 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.
- 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 setupRelated
- GATE operating systems practiceFive GATE-style operating system MCQs on SRTF scheduling, deadlock, LRU page replacement, effective access time and SCAN disk scheduling, with traced solutions.
- GATE computer organization practiceFive GATE-style computer organization MCQs on cache tag bits, pipeline CPI, expanding opcodes, DMA cycle stealing and memory access time, with worked answers.
- GATE digital logic practiceFive GATE-style digital logic MCQs on K-map minimisation, two's complement overflow, counter modulus, multiplexer design and clock frequency, with answers.
- GATE CSE preparationPlan GATE CS 2027: the revised syllabus section by section, the order to study the nine core subjects, standard books and a 26-week plan from first pass to mocks.
More in GATE
- GATE compiler design practiceFive GATE-style compiler design MCQs on FOLLOW sets, LR(0) states, expression DAGs, basic blocks and lexical tokens, each with a full step-by-step explanation.
- GATE communications practiceFive GATE EC communications MCQs on AM power, Shannon capacity, PCM bit rate, QAM bandwidth and Hamming code error correction, with complete worked solutions.
- GATE control systems practiceFive GATE-style control systems MCQs on damping ratio, Routh stability, steady-state error, root locus breakaway points and gain margin for EE and EC.
- GATE calculus practiceFive GATE-level calculus MCQs on limits, maxima and minima, the mean value theorem, definite integrals and critical points, with full worked solutions.
- GATE DA probability practiceFive GATE Data Science and AI probability and statistics MCQs on covariance, confidence intervals, the z-test, the central limit theorem and chi-squared tests.
- GATE analytical aptitude practiceFive GATE-style reasoning MCQs on deduction, number series, seating arrangement, clocks and 3D cube counting, with step-by-step answers and methods.
- GATE data structures practiceFive GATE-style data structures MCQs on postfix evaluation, BST deletion, heap insertion, C pointer arithmetic and hashing, with traced solutions for CS and DA.
- GATE analog circuits practiceFive GATE-style analog circuit MCQs on op-amp summing, BJT bias, MOSFET transconductance, negative feedback gain and Zener regulation, with worked solutions.