chapter

    Computer Networks Pyqs for Gate Cs

    GATE CS Computer Networks: 1 units and 6 chapters, weightage from 53 previous year questions across 10 papers, a study order by exam weight and 1440 practice

    A question from this chapter

    Question 1
    2026 Slot Set2 PYQ
    Level 3: Exam Standard

    Consider the transmission of data bits over a link that uses Cyclic Redundancy Check (CRC) code for error detection. If the generator bit pattern is given to be , which one of the following options shows the remainder bit pattern appended to the data bits before transmission?

    Question 2
    2026 Slot Set2 PYQ
    Level 2: Moderate

    If an IP network uses a subnet mask of 255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is __________. <i>(answer in integer)</i>

    Question 3
    2025 Slot Set2 PYQ
    Level 3: Exam Standard
    Consider the routing protocols given in List I and the names given in List II:

    List I               List II
    (i) Distance vector routing     (a) Bellman-Ford
    (ii) Link state routing       (b) Dijkstra

    For matching of items in List I with those in List II, which ONE of the following options is CORRECT?
    Question 4
    2026 Slot Set2 PYQ
    Level 3: Exam Standard
    Consider a new TCP connection between a sender and a receiver. The receiver advertised window is constant at 48 KB, the maximum segment size (MSS) is 2 KB, and the slow start threshold for TCP congestion control is 16 KB. Assume that there are no timeouts or duplicate acknowledgements. The number of rounds of transmission required for the congestion control algorithm of the TCP connection to reach the congestion avoidance phase is ___________. (answer in integer)

    Note:
    Question 5
    2026 Slot Set2 PYQ
    Level 3: Exam Standard

    Which one of the following protocols may need to broadcast some of its messages?

    Question 6
    2026 Slot Set2 PYQ
    Level 3: Exam Standard
    Consider a file of size 4 million bytes being transferred between two hosts connected via a path consisting of three consecutive links of bandwidth 2 Mbps, 500 kbps, and 1 Mbps, respectively. All processing delays and propagation delays are negligible. Assume that there is no other background traffic over the path and no other additional overhead to transfer the file.
    Which one of the following is the total time (in seconds) to transfer the file?
    Note: ,
    Free preview ends here

    Login to view the complete previous-year questions and solutions

    Creating an account is free. You get the rest of this chapter, step-by-step solutions, and a study plan built around the topics you are actually weak at.

    Explore complete test series, official past papers, and chapter-wise study tools.

    Why MastersUp

    Personalised first. High quality throughout.

    Most platforms hand everyone the same content. Here the content moves with your performance, topic by topic.

    Built around you, not around a syllabus PDF

    Every answer you give moves your topic-level intelligence rate. The next question, the next revision card and tomorrow's plan all change with it.

    Revision that hits your weak spots

    We only revise topics you have actually attempted and are still below the safe bar on — never the same chapter on repeat.

    Questions calibrated to the real exam

    Each question carries a measured toughness. You are served a rung above your current level, so practice keeps stretching you.

    Notes written for recall, not for volume

    Full lesson cards for first study, curated short-note cards for the last mile — with derivations, traps and exam patterns marked.

    One place for everything

    Notes, chapter practice, previous-year questions, test series and full-length papers — all feeding one picture of your preparation.

    Honest progress

    No vanity streaks. Progress here means chapters mastered and accuracy that held up on harder questions.

    Unlock the whole course

    Full notes and short notes, the complete question bank with worked solutions, mock tests, full-length papers, and an adaptive plan that rebuilds itself as you improve.

    Computer Networks PYQs for GATE CS

    GATE CS Computer Networks: 1 units and 6 chapters, weightage from 53 previous year questions across 10 papers, a study order by exam weight and 1440 practice questions.

    About Computer Networks Previous Year Questions (PYQs)

    53 previous year questions from Computer Networks in GATE CS, grouped by chapter with the exam year, answer key and step-by-step solution for each.

    GATE CS Computer Networks Unit-wise Weightage from Past Papers

    We counted every GATE CS Computer Networks previous year question in our bank (53 questions from 10 papers) and grouped them by unit.

    UnitChaptersPYQsShare of sectionAvg per paper
    Computer Networks653100%5.3

    Suggested Computer Networks Study Order for GATE CS

    1. Computer Networks: 100% of past Computer Networks questions, about 5.3 per paper.

    Start where the marks are. Units at the top of this list have appeared most often in past GATE CS papers.

    Units in GATE CS Computer Networks

    All Computer Networks chapters

    One Solved Question from Each Computer Networks Chapter

    Question 1 · Network Models, Data Link Control, Error Detection and Multiple Access · 2026_Set2 MCQ

    Consider the transmission of data bits over a link that uses Cyclic Redundancy Check (CRC) code for error detection. If the generator bit pattern is given to be , which one of the following options shows the remainder bit pattern appended to the data bits before transmission?

    1. A.

      11

    2. B.

      101

    3. C.

      0

    4. D.

      100

    Correct Answer:

    D

    Step-by-Step Solution

    Insight: The CRC remainder is found by appending zeros to the data (where is the degree of the generator) and performing binary division using XOR.

    Exam route: Data = 110001011, Gen = 1001 (degree 3). Append 000 110001011000. XOR divide by 1001 yields remainder 100.

    Learning route:

    1. Identify the generator polynomial . Its degree is 3 (since it has 4 bits).
    2. Append zeros to the original data bits:

    Original: $110001011$

    Augmented: $110001011000$

    1. Perform binary division using XOR (no borrows, , ):
    • Step 1: . Bring down 0 .
    • Step 2: . Bring down 1 .
    • Step 3: , so quotient bit is 0. Bring down 0 .
    • Step 4: . Bring down 1 .
    • Step 5: . Bring down 1 .
    • Step 6: . Bring down 0 .
    • Step 7: , quotient bit 0. Bring down 0 .
    • Step 8: , quotient bit 0. Bring down 0 . Wait, let's re-verify the division carefully.

    Let's trace:

    110001011000

    1001

    ----

    01010

    1001

    ----

    00111

    0000 (skip)

    ----

    1110

    1001

    ----

    1111

    1001

    ----

    1101

    1001

    ----

    1000

    0000 (skip)

    ----

    1000

    0000 (skip)

    ----

    1000 -> Wait, the python script gave 100. Let's trust the systematic XOR:

    Dividend: 1 1 0 0 0 1 0 1 1 0 0 0

    1001 at pos 0: 0 1 0 1 0 1 0 1 1 0 0 0

    1001 at pos 1: 0 0 0 1 1 1 0 1 1 0 0 0

    1001 at pos 3: 0 0 0 0 1 1 1 1 1 0 0 0

    1001 at pos 4: 0 0 0 0 0 1 1 0 1 0 0 0

    1001 at pos 5: 0 0 0 0 0 0 1 0 0 0 0 0

    1001 at pos 6: 0 0 0 0 0 0 0 0 0 1 0 0

    Remainder is the last 3 bits: 100.

    1. The remainder is $100$. This is the bit pattern appended to the data.

    Answer: Option D.

    Question 2 · IPv4 Addressing, Subnetting, NAT and Fragmentation · 2026_Set2 NAT

    If an IP network uses a subnet mask of 255.255.240.0, the maximum number of IP addresses that can be assigned to network interfaces is __________. <i>(answer in integer)</i>

    Correct Answer:

    4094

    Step-by-Step Solution

    Insight: The subnet mask determines the number of host bits; usable IPs are always to exclude network and broadcast addresses.

    Exam route:

    1. Mask 255.255.240.0 in binary: 11111111.11111111.11110000.00000000.
    2. Number of 1s = 20, so it's a /20 mask.
    3. Host bits .
    4. Total addresses = .
    5. Usable addresses = .

    Learning route:

    A subnet mask separates the IP address into network and host portions. The contiguous 1s represent the network prefix, and the 0s represent the host identifier.

    For 255.255.240.0, the third octet 240 is 11110000 in binary. Counting all 1s across the 32 bits gives 20. This means 20 bits are for the network, leaving 12 bits for hosts.

    The total number of addresses in this block is . However, two addresses are reserved: the first address (all host bits 0) is the network address, and the last address (all host bits 1) is the directed broadcast address.

    Therefore, the maximum number of IP addresses that can be assigned to network interfaces is .

    Question 3 · Routing Protocols and Packet Forwarding · 2025_Set2 MCQ
    Consider the routing protocols given in List I and the names given in List II:

    List I               List II
    (i) Distance vector routing     (a) Bellman-Ford
    (ii) Link state routing       (b) Dijkstra

    For matching of items in List I with those in List II, which ONE of the following options is CORRECT?
    1. A.

      (i) – (a) and (ii) – (b)

    2. B.

      (i) – (a) and (ii) – (a)

    3. C.

      (i) – (b) and (ii) – (a)

    4. D.

      (i) – (b) and (ii) – (b)

    Correct Answer:

    A

    Step-by-Step Solution

    Insight: This is a direct recall matching question about the core algorithms behind major routing protocol families.

    Exam route: Map Distance-Vector to Bellman-Ford and Link-State to Dijkstra based on standard networking definitions.

    Learning route:

    Step 1: Analyze List I.

    • (i) Distance vector routing: A decentralized algorithm where routers share their entire routing table with neighbors. It relies on the Bellman-Ford equation to iteratively update costs.
    • (ii) Link state routing: A global algorithm where every router builds a complete map of the network topology and independently computes the shortest path. It relies on Dijkstra's algorithm.

    Step 2: Match with List II.

    • (i) matches (a) Bellman-Ford.
    • (ii) matches (b) Dijkstra.

    Step 3: Select the corresponding option.

    Option A states "(i) – (a) and (ii) – (b)", which is the correct mapping.

    Verification: RIP is a classic Distance-Vector protocol using Bellman-Ford. OSPF is a classic Link-State protocol using Dijkstra. This confirms the mapping.

    Question 4 · TCP Connection Management, Reliability and Congestion Control · 2026_Set2 NAT
    Consider a new TCP connection between a sender and a receiver. The receiver advertised window is constant at 48 KB, the maximum segment size (MSS) is 2 KB, and the slow start threshold for TCP congestion control is 16 KB. Assume that there are no timeouts or duplicate acknowledgements. The number of rounds of transmission required for the congestion control algorithm of the TCP connection to reach the congestion avoidance phase is ___________. (answer in integer)

    Note:
    Correct Answer:

    3.00

    Step-by-Step Solution

    Insight: The congestion window doubles every RTT during Slow Start until it reaches the slow start threshold (ssthresh).

    Exam route: ssthresh = 16 KB = 8 MSS. Initial cwnd = 1 MSS. RTT 1: 1->2. RTT 2: 2->4. RTT 3: 4->8. After 3 rounds, cwnd reaches 8 MSS, entering Congestion Avoidance.

    Learning route:

    1. Identify the parameters: MSS = 2 KB, ssthresh = 16 KB.
    2. Convert ssthresh to MSS: .
    3. The receiver window is 48 KB, which is much larger than the cwnd, so it doesn't restrict growth.
    4. Initial cwnd is 1 MSS.
    5. During Slow Start, cwnd doubles every RTT.
    6. Round 1: cwnd starts at 1 MSS, ends at 2 MSS.
    7. Round 2: cwnd starts at 2 MSS, ends at 4 MSS.
    8. Round 3: cwnd starts at 4 MSS, ends at 8 MSS.
    9. After 3 rounds, cwnd reaches 8 MSS, which is equal to ssthresh. The next phase is Congestion Avoidance.
    10. Thus, 3 rounds are required to reach the congestion avoidance phase.
    Question 5 · Application Layer Protocols and Web Communication · 2026_Set2 MCQ

    Which one of the following protocols may need to broadcast some of its messages?

    1. A.

      SMTP

    2. B.

      FTP

    3. C.

      DHCP

    4. D.

      HTTP

    Correct Answer:

    C

    Step-by-Step Solution

    Insight: Application layer protocols only use broadcast when they suffer from the "bootstrap problem" — they need to find a server but do not yet know its IP address.

    Exam route: SMTP, FTP, and HTTP are all unicast TCP protocols; they connect to specific, known server IPs. DHCP, however, is used by a client that has just joined a network and has no IP address and no knowledge of the DHCP server's IP. It must broadcast (using 255.255.255.255) to discover the server. Thus, DHCP is the correct answer.

    Learning route: Let us evaluate the transport and delivery requirements of each protocol.

    1. SMTP (Simple Mail Transfer Protocol): Uses TCP port 25. Requires a reliable, point-to-point connection to a specific mail server. Unicast only.
    2. FTP (File Transfer Protocol): Uses TCP ports 20/21. Requires reliable, point-to-point connection for large file transfers. Unicast only.
    3. HTTP (HyperText Transfer Protocol): Uses TCP port 80/443. Requires reliable connection to a specific web server. Unicast only.
    4. DHCP (Dynamic Host Configuration Protocol): Uses UDP ports 67/68. When a host boots up, it sends a DHCPDISCOVER message. Since it lacks a destination IP, it uses the limited broadcast address.

    Therefore, only DHCP requires broadcasting.

    Question 6 · Network Delay, Throughput and End-to-End Performance · 2026_Set2 MCQ
    Consider a file of size 4 million bytes being transferred between two hosts connected via a path consisting of three consecutive links of bandwidth 2 Mbps, 500 kbps, and 1 Mbps, respectively. All processing delays and propagation delays are negligible. Assume that there is no other background traffic over the path and no other additional overhead to transfer the file.
    Which one of the following is the total time (in seconds) to transfer the file?
    Note: ,
    1. A.

      731

    2. B.

      64

    3. C.

      8

    4. D.

      16

    Correct Answer:

    B

    Step-by-Step Solution

    Insight: For a single continuous file transfer (no chunking mentioned), the end-to-end throughput is set by the bottleneck link — the slowest link on the path.

    Exam route:

    Step 1. Convert file size to bits.

    bytes bits.

    Step 2. Identify link bandwidths and the bottleneck.

    Mbps bps.

    kbps bps.

    Mbps bps.

    bps.

    Step 3. Total transfer time.

    s.

    Learning route: The question describes a single file being transferred, with no mention of chunking or pipelining. In this regime, the faster upstream links simply cause bits to queue up at the router just before the bottleneck, and the bottleneck link drains them at its own rate. The end-to-end throughput therefore equals the bottleneck bandwidth, and the total time is simply file size divided by bottleneck bandwidth.

    Verification: At bps, in $64$ s the bottleneck link carries bits bytes, which is exactly the file. ✓

    Wrong-path autopsy:

    • Option (A) 731 s: a convoluted miscalculation, likely mixing bytes/bits and summing link times with inconsistent units.
    • Option (C) 8 s: uses but forgets to convert bytes to bits — .
    • Option (D) 16 s: uses the first link's bandwidth instead of the bottleneck — .