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

    IPv4 Addressing, Subnetting, NAT and Fragmentation notes for GATE CS: 27 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practi

    ipv4 addressing subnetting nat and fragmentation notes

    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.

    The Mechanics of Fragmentation: Flags and Offsets

    IPv4 Header Mechanics

    To manage fragmentation, the IPv4 header uses three key fields:

    • 1. Identification (16-bit)

      Identical for all fragments of the original datagram. This allows the destination host to group the correct fragments together for reassembly.

    • 2. Flags (3-bit)

      Controls fragmentation behavior. The two most relevant bits are:

      DF (Don't Fragment): If set to 1, the router must not fragment the packet. If it is too large, the packet is dropped.
      MF (More Fragments): Set to 1 for all fragments except the very last one. The last fragment has MF = 0.
    • 3. Fragment Offset (13-bit)

      Indicates the position of the fragment's data relative to the beginning of the original unfragmented datagram.

    24 more cards in this chapter

    Free preview ends here

    Login to view the complete 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.

    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 Notes for GATE CS

    IPv4 Addressing, Subnetting, NAT and Fragmentation notes for GATE CS: 27 study cards covering concepts, formulas, shortcuts and exam traps, plus solved practice questions.

    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.

    The Mechanics of Fragmentation: Flags and Offsets

    IPv4 Header Mechanics

    To manage fragmentation, the IPv4 header uses three key fields:

    • 1. Identification (16-bit)

      Identical for all fragments of the original datagram. This allows the destination host to group the correct fragments together for reassembly.

    • 2. Flags (3-bit)

      Controls fragmentation behavior. The two most relevant bits are:

      DF (Don't Fragment): If set to 1, the router must not fragment the packet. If it is too large, the packet is dropped.
      MF (More Fragments): Set to 1 for all fragments except the very last one. The last fragment has MF = 0.
    • 3. Fragment Offset (13-bit)

      Indicates the position of the fragment's data relative to the beginning of the original unfragmented datagram.

    Method: Solving Single-Router Fragmentation

    Systematic Method

    Follow this systematic method to solve any single-router fragmentation problem:

    1
    Find Original Data
    Original Data = Total Length - IP Header Size
    2
    Find Max Data per Fragment
    Max Data = MTU - IP Header Size
    3
    Apply Multiple of 8 Rule
    Round Max Data down to the nearest multiple of 8. Let this be .
    4
    Calculate Number of Fragments
    Number of Fragments = \lceil \frac{\text{Original Data}}{D_{max}} \rceil
    5
    Calculate Offset for Each Fragment
    Offset = \frac{\text{Starting Byte of Data in Original Datagram}}{8}

    More notes in this unit