chapter

    Computer Networks Short Notes 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
    Level 3: Exam Standard

    Consider a local LAN with 3 hosts: A, B, and C. All ARP caches are initially empty. The following communication sequence occurs:

    1. Host A sends a data packet to Host B.
    2. Host B sends a data packet to Host C.
    3. Host C sends a data packet to Host A.
    4. Host A sends a data packet to Host C.

    Assume that in standard operation, receiving an ARP Request or an ARP Reply updates the receiver's ARP cache. Let be the total number of ARP frames (Requests + Replies) generated in this sequence under standard operation. Let be the total number of ARP frames generated if ARP caches were NOT updated by receiving an ARP Request (only by Replies). What is the value of ?

    Question 2
    Level 3: Exam Standard

    Consider any valid, fragmented IPv4 datagram with a standard 20-byte header and no options. The maximum possible value of the Fragment Offset field in its last fragment is

    Question 3
    Level 3: Exam Standard

    Consider the following network of five routers with the given symmetric link costs:

    A-B: 1, A-C: 6, B-C: 2, B-D: 7, C-D: 4, C-E: 1, D-E: 1.

    Using Dijkstra's algorithm from source A, in which exact sequence are the nodes added to the permanent set ?

    Question 4
    Level 3: Exam Standard

    A TCP connection is established between a client and a server. The client's initial sequence number is 1500 and the server's initial sequence number is 3000. After the 3-way handshake is fully completed, the client sends a segment containing 400 bytes of data. The server immediately responds with an ACK segment that also contains 600 bytes of data. What is the acknowledgement number in the server's response segment?

    Question 5
    Level 3: Exam Standard

    A user attempts to fetch a webpage from a remote server. All caches (browser, OS, and all DNS servers) are initially empty, and standard iterative DNS resolution is used.

    Which of the following sequences of events is strictly IMPOSSIBLE?

    Question 6
    Level 3: Exam Standard

    Consider four network scenarios (P, Q, R, S) for transferring a file of size bytes over multiple links using store-and-forward packet switching. Neglect all headers, processing delays, and propagation delays. The details of each scenario are as follows:

    Scenario P: 3 links with bandwidths 10 Mbps, 5 Mbps, and 2 Mbps. Packet size = 1000 bytes.

    Scenario Q: 2 links with bandwidths 4 Mbps and 4 Mbps. Packet size = 2000 bytes.

    Scenario R: 3 links with bandwidths 20 Mbps, 20 Mbps, and 20 Mbps. Packet size = 5000 bytes.

    Scenario S: 3 links with bandwidths 20 Mbps, 10 Mbps, and 5 Mbps. Packet size = 1000 bytes.

    If the scenarios are ranked in ascending order of their total transfer times, the rank of Scenario R is _________

    Free preview ends here

    Login to view the complete short notes

    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 Short Notes 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 Short Notes

    Quick revision sheets for Computer Networks in GATE CS. Every chapter is condensed into key formulas, shortcuts and common traps so you can revise 6 chapters fast before the exam.

    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 MCQ

    Consider a local LAN with 3 hosts: A, B, and C. All ARP caches are initially empty. The following communication sequence occurs:

    1. Host A sends a data packet to Host B.
    2. Host B sends a data packet to Host C.
    3. Host C sends a data packet to Host A.
    4. Host A sends a data packet to Host C.

    Assume that in standard operation, receiving an ARP Request or an ARP Reply updates the receiver's ARP cache. Let be the total number of ARP frames (Requests + Replies) generated in this sequence under standard operation. Let be the total number of ARP frames generated if ARP caches were NOT updated by receiving an ARP Request (only by Replies). What is the value of ?

    1. A.

      0

    2. B.

      2

    3. C.

      4

    4. D.

      6

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a casework tracing question testing the precise mechanics of ARP cache updates (RFC 826). Receiving an ARP Request updates the receiver's cache with the sender's details, which is a frequently overlooked detail.

    Step 1: Calculate (Standard Operation).

    • Step 1.1 (A B): A's cache is empty. A broadcasts ARP Request (1). B receives it and caches A. B unicasts ARP Reply (2). A receives it and caches B. (Total = 2)
    • Step 1.2 (B C): B's cache has A, but not C. B broadcasts ARP Request (3). C receives it and caches B. C unicasts ARP Reply (4). B receives it and caches C. (Total = 4)
    • Step 1.3 (C A): C's cache has B, but not A. C broadcasts ARP Request (5). A receives it and caches C. A unicasts ARP Reply (6). C receives it and caches A. (Total = 6)
    • Step 1.4 (A C): A's cache already has C (from Step 1.3). A sends the data packet directly. (0 frames).
    • Therefore, .

    Step 2: Calculate (Non-standard: No cache update on Request).

    • Step 2.1 (A B): A broadcasts Request (1). B does NOT cache A. B unicasts Reply (2). A caches B. (Total = 2)
    • Step 2.2 (B C): B does not have C. B broadcasts Request (3). C does NOT cache B. C unicasts Reply (4). B caches C. (Total = 4)
    • Step 2.3 (C A): C does not have A. C broadcasts Request (5). A does NOT cache C. A unicasts Reply (6). C caches A. (Total = 6)
    • Step 2.4 (A C): A does not have C (since A didn't cache C from the request in 2.3). A broadcasts Request (7). C unicasts Reply (8). (Total = 8)
    • Therefore, .

    Step 3: Compute .

    Answer: 2

    Question 2 · IPv4 Addressing, Subnetting, NAT and Fragmentation MCQ

    Consider any valid, fragmented IPv4 datagram with a standard 20-byte header and no options. The maximum possible value of the Fragment Offset field in its last fragment is

    1. A.

      8191

    2. B.

      8190

    3. C.

      8189

    4. D.

      8188

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: This is an observation question testing the boundary limits of the IPv4 header fields. You must maximize the fragment offset while respecting both the 13-bit offset field limit and the 16-bit Total Length field limit.

    Step 1: Identify the absolute limits.

    The maximum size of an IPv4 datagram is determined by the 16-bit Total Length field: bytes.

    With a 20-byte header, the maximum possible data payload is bytes.

    Step 2: Relate the offset to the data payload.

    The Fragment Offset field measures in 8-byte units. If the last fragment has an offset of , it means the last fragment starts at byte .

    Since the last fragment must contain at least 1 byte of data, the starting byte plus 1 must not exceed the maximum data payload:

    Step 3: Solve for the maximum offset .

    Since must be an integer, the maximum possible value is .

    Step 4: Verify the boundary condition.

    If , the last fragment starts at byte .

    The last fragment carries bytes of data.

    Total datagram size = bytes. This perfectly fits within the 16-bit Total Length limit.

    If we tried , the starting byte would be $65520$. The datagram would need to be at least bytes, which exceeds the 65535 limit.

    Common trap: Option A (8191) is the maximum value of the 13-bit field itself, but it ignores the 16-bit Total Length limit. Option B (8190) ignores the fact that .

    Answer: C

    Question 3 · Routing Protocols and Packet Forwarding MCQ

    Consider the following network of five routers with the given symmetric link costs:

    A-B: 1, A-C: 6, B-C: 2, B-D: 7, C-D: 4, C-E: 1, D-E: 1.

    Using Dijkstra's algorithm from source A, in which exact sequence are the nodes added to the permanent set ?

    1. A.

      A, B, C, D, E

    2. B.

      A, B, C, E, D

    3. C.

      A, B, E, C, D

    4. D.

      A, C, B, E, D

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: this is a boundary_case problem — trace Dijkstra's algorithm step-by-step, paying close attention to the tentative distances after each node is added to . The boundary case occurs when a node further in the graph structure is added before a seemingly "closer" node.

    Step 1: Initialization.

    .

    Tentative distances: , , , .

    Step 2: First iteration.

    Minimum tentative distance is (1). Add to .

    .

    Update neighbors of :

    • .
    • .

    Step 3: Second iteration.

    Minimum tentative distance is (3). Add to .

    .

    Update neighbors of :

    • .
    • .

    Step 4: Third iteration (The Boundary Case).

    Current tentative distances: , .

    Minimum is (4). Add to .

    .

    Update neighbors of :

    • .

    Step 5: Fourth iteration.

    Minimum tentative distance is (5). Add to .

    .

    Step 6: Final sequence.

    The order in which nodes were added to is: A, B, C, E, D.

    Answer: B.

    Question 4 · TCP Connection Management, Reliability and Congestion Control MCQ

    A TCP connection is established between a client and a server. The client's initial sequence number is 1500 and the server's initial sequence number is 3000. After the 3-way handshake is fully completed, the client sends a segment containing 400 bytes of data. The server immediately responds with an ACK segment that also contains 600 bytes of data. What is the acknowledgement number in the server's response segment?

    1. A.

      1900

    2. B.

      1901

    3. C.

      2501

    4. D.

      2500

    Correct Answer:

    B

    Step-by-Step Solution

    Key idea: This is a sequence number tracking question. The acknowledgement number always represents the next expected sequence number from the other side.

    Step 1: Client sends SYN. Seq = 1500. (SYN consumes 1, so next expected is 1501).

    Step 2: Server sends SYN-ACK. Seq = 3000, Ack = 1501. (SYN consumes 1, so server's next expected is 3001).

    Step 3: Client sends ACK. Seq = 1501, Ack = 3001. Handshake complete.

    Step 4: Client sends 400 bytes of data. Seq = 1501. The next expected sequence number from the client is 1501 + 400 = 1901.

    Step 5: Server responds with ACK + 600 bytes data. The server's acknowledgement number must be the client's next expected sequence number, which is 1901. (The server's own data length of 600 bytes affects the server's sequence number, not its acknowledgement number).

    Answer: 1901.

    Question 5 · Application Layer Protocols and Web Communication MCQ

    A user attempts to fetch a webpage from a remote server. All caches (browser, OS, and all DNS servers) are initially empty, and standard iterative DNS resolution is used.

    Which of the following sequences of events is strictly IMPOSSIBLE?

    1. A.

      The local DNS server queries the TLD server after receiving a referral from the Root server.

    2. B.

      The host sends a TCP SYN packet to the web server after receiving the DNS response from the local DNS server.

    3. C.

      The host sends an HTTP GET request before the TCP three-way handshake is fully complete.

    4. D.

      The local DNS server responds to the host's query after receiving the IP address from the Authoritative server.

    Correct Answer:

    C

    Step-by-Step Solution

    Key idea: Validate each sequence against the fundamental state machine dependencies of DNS and TCP protocols.

    Step 1: Analyze Option A. In standard iterative DNS resolution, the local DNS server queries the Root server first. The Root server responds with a referral to the TLD server. The local DNS server then queries the TLD server. This is the correct and standard behavior. (Possible)

    Step 2: Analyze Option B. The host must know the web server's IP address before it can initiate a TCP connection. Receiving the DNS response provides this IP address, making the subsequent TCP SYN the correct next step. (Possible)

    Step 3: Analyze Option C. HTTP is an application-layer protocol that relies on a reliable TCP connection. The TCP connection is only considered established after the three-way handshake (SYN, SYN-ACK, ACK) is fully complete. Sending an HTTP GET request before this handshake is complete violates the TCP state machine. (Impossible)

    Step 4: Analyze Option D. In iterative resolution, the local DNS server must traverse the entire hierarchy to get the final answer. It waits for the Authoritative server's response before it can respond to the host's original query. (Possible)

    Answer: The host sends an HTTP GET request before the TCP three-way handshake is fully complete.

    Question 6 · Network Delay, Throughput and End-to-End Performance NAT

    Consider four network scenarios (P, Q, R, S) for transferring a file of size bytes over multiple links using store-and-forward packet switching. Neglect all headers, processing delays, and propagation delays. The details of each scenario are as follows:

    Scenario P: 3 links with bandwidths 10 Mbps, 5 Mbps, and 2 Mbps. Packet size = 1000 bytes.

    Scenario Q: 2 links with bandwidths 4 Mbps and 4 Mbps. Packet size = 2000 bytes.

    Scenario R: 3 links with bandwidths 20 Mbps, 20 Mbps, and 20 Mbps. Packet size = 5000 bytes.

    Scenario S: 3 links with bandwidths 20 Mbps, 10 Mbps, and 5 Mbps. Packet size = 1000 bytes.

    If the scenarios are ranked in ascending order of their total transfer times, the rank of Scenario R is _________

    Correct Answer:

    1

    Step-by-Step Solution

    Key idea: This is a bounding and ranking question. The total transfer time for a large file is dominated by the pipelining term . We can bound the total time by calculating this dominant term for each scenario to quickly rank them.

    Step 1: Calculate the number of packets and the bottleneck bandwidth for each scenario.

    • P: , Mbps.
    • Q: , Mbps.
    • R: , Mbps.
    • S: , Mbps.

    Step 2: Calculate the exact total time for each scenario using .

    • P: First packet = ms. Rest = ms. Total = $4002.4$ ms.
    • Q: First packet = ms. Rest = ms. Total = $2004$ ms.
    • R: First packet = ms. Rest = ms. Total = $404$ ms.
    • S: First packet = ms. Rest = ms. Total = $1601.2$ ms.

    Step 3: Rank the scenarios in ascending order of total time.

    Order: R (404) < S (1601.2) < Q (2004) < P (4002.4).

    The rank of Scenario R is 1.

    Answer: 1