chapter

    Computer Networks Pyqs for Gate Cs

    GATE CS Computer Networks: 6 chapters, 53 previous year questions (100% of Computer Networks), 1440 practice questions and one solved question from each chapt

    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 Set1 PYQ
    Level 3: Exam Standard

    An ISP having an address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client, using the classless internet domain routing (CIDR) super-netting approach. Which of the following address blocks can be assigned by the ISP?

    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: 6 chapters, 53 previous year questions (100% of Computer Networks), 1440 practice questions and one solved question from each chapter.

    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.

    Computer Networks Weightage in GATE CS

    Computer Networks accounts for 53 of 53 Computer Networks previous year questions in our bank (100%), about 5.3 per paper across 10 papers.

    Computer Networks Chapter Matrix

    ChapterTopicsPYQsShare of unit PYQsPractice questions
    Network Models, Data Link Control, Error Detection and Multiple AccessNetwork Models, Arp and Link-layer Addressing, Stop-and-wait and Sliding-window Flow Control, Error Detection, Coding and Reliable Transmission, Ethernet Collision Detection and Multiple Access1630%435
    Ipv4 Addressing, Subnetting, Nat and FragmentationIpv4 Fragmentation and Mtu Handling, Ipv4 Header Fields, Protocols and Nat, Cidr, Subnet Masks and Address Allocation1121%294
    Routing Protocols and Packet ForwardingLongest-prefix Matching and Packet Forwarding, Distance-vector and Link-state Routing815%207
    Tcp Connection Management, Reliability and Congestion ControlTcp Handshake, Connection State and Termination, Tcp Sequence Numbers and Wraparound, Tcp Slow Start and Congestion-window Evolution1019%263
    Application Layer Protocols and Web CommunicationDns Resolution and Web Request Sequencing, Http Connections, Persistence and Web Latency, Application Protocol Message Delivery59%150
    Network Delay, Throughput and End-to-end PerformanceStore-and-forward Transfer and Bottleneck Throughput, Transmission and Propagation Delay36%91

    More from Computer Networks

    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_Set1 MSQ

    An ISP having an address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client, using the classless internet domain routing (CIDR) super-netting approach. Which of the following address blocks can be assigned by the ISP?

    1. A.

      202.16.0.0/19

    2. B.

      202.17.64.0/19

    3. C.

      202.16.32.0/19

    4. D.

      202.17.24.0/19

    Correct Answer:

    ["A","B","C"]

    Step-by-Step Solution

    Insight: A /19 block has a size of 8192, so its starting IP's third octet must be a multiple of 32; check both alignment and containment within the ISP's /15 block.

    Exam route:

    1. Client needs 6000 IPs. Smallest power of 2 is .
    2. Host bits , so prefix length . Block size = 8192.
    3. For a /19 block, the 19th bit is the 3rd bit of the 3rd octet. The 3rd octet must be a multiple of .
    4. ISP block 202.16.0.0/15 covers 202.16.0.0 to 202.17.255.255.
    5. Evaluate options:
    • A) 202.16.0.0/19: 3rd octet 0 (multiple of 32). Within /15. Valid.
    • B) 202.17.64.0/19: 3rd octet 64 (multiple of 32). Within /15. Valid.
    • C) 202.16.32.0/19: 3rd octet 32 (multiple of 32). Within /15. Valid.
    • D) 202.17.24.0/19: 3rd octet 24 (NOT a multiple of 32). Invalid alignment.

    Learning route:

    When allocating sub-blocks from a supernet, the block must be properly aligned. The starting IP address of any CIDR block must be a multiple of the block size.

    For a /19 block, the block size is . Since 8192 = 32 256, the third octet of the starting IP must be a multiple of 32 (0, 32, 64, 96, ...).

    The ISP's block is 202.16.0.0/15, which covers the range 202.16.0.0 to 202.17.255.255. Any assigned /19 block must fall entirely within this range.

    Checking the options:

    • 202.16.0.0/19: 0 is a multiple of 32, and it's within the /15 range.
    • 202.17.64.0/19: 64 is a multiple of 32, and 202.17.x.x is within the /15 range.
    • 202.16.32.0/19: 32 is a multiple of 32, and it's within the /15 range.
    • 202.17.24.0/19: 24 is not a multiple of 32, so this block is misaligned and invalid.
    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 — .