chapter
    IPv4 Addressing, Subnetting, NAT and Fragmentation PYQs for GATE CS

    Solve 11+ IPv4 Addressing, Subnetting, NAT and Fragmentation previous year questions for GATE CS with answers and detailed solutions. Free sample questions be

    Try a question

    Answer it here to see how it works. Nothing is recorded until you sign in.

    Question 1
    2026 Slot Set2 PYQ

    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 2
    2026 Slot Set1 PYQ

    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
    Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in its data field. A UDP segment is transmitted. The payload (data) in the UDP segment is 7488 bytes.

    Which ONE of the following choices has the CORRECT total number of fragments transmitted and the size of the last fragment including IPv4 header?
    Question 4
    2025 Slot Set2 PYQ
    A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the protocol number of a protocol X.

    Which ONE of the following is NOT a possible candidate for X?
    Question 5
    2025 Slot Set1 PYQ
    Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is ________ . (Answer in integer)

    SourceRouter-1(MTU=5000 bytes)Router-2(MTU=3000 bytes)Destination
    Question 6
    2024 Slot Set2 PYQ

    Which of the following statements about IPv4 fragmentation is/are TRUE?

    Question 7
    2024 Slot Set2 PYQ

    Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?

    Question 8
    2024 Slot Set2 PYQ

    Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?

    Question 9
    2024 Slot Set1 PYQ

    Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _________

    Question 10
    2024 Slot Set1 PYQ

    Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?

    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.

    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.

    IPv4 Addressing, Subnetting, NAT and Fragmentation PYQs for GATE CS

    Solve 11+ IPv4 Addressing, Subnetting, NAT and Fragmentation previous year questions for GATE CS with answers and detailed solutions. Free sample questions below.

    Chapter Roadmap: IPv4 Addressing, Subnetting, NAT and Fragmentation

    Chapter Roadmap

    Step 1: Current Topic
    IPv4 Fragmentation and MTU Handling
    Master how large datagrams are split across links with smaller MTUs. High yield for numericals involving offset calculation and multi-router paths.
    Step 2: Upcoming
    IPv4 Header Fields, Protocols and NAT
    Understand the anatomy of the IP header, protocol numbers, and how Network Address Translation modifies packets.
    Step 3: Upcoming
    CIDR, Subnet Masks and Address Allocation
    Heavy calculation topic. Learn to aggregate routes, calculate subnet capacities, and allocate address blocks efficiently.

    Why Fragmentation Exists: The MTU Constraint

    The MTU Constraint

    Imagine trying to drive a large truck through a tunnel that is too short. The truck must be disassembled, shipped in smaller pieces, and reassembled at the destination.

    MTU Limit Data Frag 1 Frag 2

    In networking, the Maximum Transmission Unit (MTU) is that tunnel size limit. It is the maximum size of a data frame that a network link can transmit. When an IP datagram is larger than the MTU of a link, a router must fragment it into smaller pieces to cross that link. The destination host is solely responsible for reassembling these pieces back into the original datagram.

    IPv4 Addressing, Subnetting, NAT and Fragmentation: Solved Questions with Step-by-Step Explanations (10 Problems)

    Question 1 · Computer Networks · 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>

    Question 2 · Computer Networks · 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

    Question 3 · Computer Networks · 2025_Set2 MCQ
    Consider a network that uses Ethernet and IPv4. Assume that IPv4 headers do not use any options field. Each Ethernet frame can carry a maximum of 1500 bytes in its data field. A UDP segment is transmitted. The payload (data) in the UDP segment is 7488 bytes.

    Which ONE of the following choices has the CORRECT total number of fragments transmitted and the size of the last fragment including IPv4 header?
    1. A.

      5 fragments, 1488 bytes

    2. B.

      6 fragments, 88 bytes

    3. C.

      6 fragments, 108 bytes

    4. D.

      6 fragments, 116 bytes

    Question 4 · Computer Networks · 2025_Set2 MCQ
    A machine receives an IPv4 datagram. The protocol field of the IPv4 header has the protocol number of a protocol X.

    Which ONE of the following is NOT a possible candidate for X?
    1. A.

      Internet Control Message Protocol (ICMP)

    2. B.

      Internet Group Management Protocol (IGMP)

    3. C.

      Open Shortest Path First (OSPF)

    4. D.

      Routing Information Protocol (RIP)

    Question 5 · Computer Networks · 2025_Set1 NAT
    Suppose a message of size 15000 bytes is transmitted from a source to a destination using IPv4 protocol via two routers as shown in the figure. Each router has a defined maximum transmission unit (MTU) as shown in the figure, including IP header. The number of fragments that will be delivered to the destination is ________ . (Answer in integer)

    SourceRouter-1(MTU=5000 bytes)Router-2(MTU=3000 bytes)Destination
    Question 6 · Computer Networks · 2024_Set2 MSQ

    Which of the following statements about IPv4 fragmentation is/are TRUE?

    1. A.

      The fragmentation of an IP datagram is performed only at the source of the datagram

    2. B.

      The fragmentation of an IP datagram is performed at any IP router which finds that the size of the datagram to be transmitted exceeds the MTU

    3. C.

      The reassembly of fragments is performed only at the destination of the datagram

    4. D.

      The reassembly of fragments is performed at all intermediate routers along the path from the source to the destination

    Question 7 · Computer Networks · 2024_Set2 MCQ

    Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?

    1. A.

      10.12.2.0/23

    2. B.

      10.12.2.0/24

    3. C.

      10.12.0.0/22

    4. D.

      10.12.2.0/22

    Question 8 · Computer Networks · 2024_Set2 MSQ

    Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?

    1. A.

      Source IP Address

    2. B.

      Protocol

    3. C.

      Time to Live (TTL)

    4. D.

      Header Checksum

    Question 9 · Computer Networks · 2024_Set1 NAT

    Consider sending an IP datagram of size 1420 bytes (including 20 bytes of IP header) from a sender to a receiver over a path of two links with a router between them. The first link (sender to router) has an MTU (Maximum Transmission Unit) size of 542 bytes, while the second link (router to receiver) has an MTU size of 360 bytes. The number of fragments that would be delivered at the receiver is _________

    Question 10 · Computer Networks · 2024_Set1 MSQ

    Which of the following fields is/are modified in the IP header of a packet going out of a network address translation (NAT) device from an internal network to an external network?

    1. A.

      Source IP

    2. B.

      Destination IP

    3. C.

      Header Checksum

    4. D.

      Total Length

    More previous year questions (pyqs) in this unit