Cheat sheets

CN-13Cheat sheet1 pageIn a paid pack

IPv4 Header

The IPv4 header (RFC 791) for GATE CS: the layout of the 20-byte fixed part and up to 40 bytes of options, each field's width and unit (IHL in 4-byte words, total length in bytes, fragment offset in 8-byte units), the flags, TTL and its decrement, protocol numbers, the header-only checksum and why every router recomputes it, the size limits that follow from field widths, and a solved 2024 past question on which fields every router changes.

Diagrams from CN-13

CN-14Cheat sheet1 pageIn a paid pack

IPv4 Fragmentation

IPv4 fragmentation for GATE CS: the data each fragment can carry (MTU minus header, rounded down to a multiple of 8), offsets in 8-byte units, the MF and DF flags, refragmentation on a later link with a smaller MTU, reassembly only at the destination, reading a fragment back into byte positions, and the transport header counted as IP payload. Includes three worked tables and two solved past questions (2024, 2025), every value from a script.

Diagrams from CN-14

CN-15Cheat sheet1 pageIn a paid pack

CIDR and Subnetting

CIDR notation (RFC 4632) for GATE CS: prefix length, mask and block size, network and broadcast addresses by AND and OR with the mask, usable hosts with the /31 and /32 exceptions, splitting a block into equal subnets and variable-length subnets (VLSM), the same-subnet test, the classful view still used in older questions, and the special and private address blocks. Includes a solved 2026 past question; every value checked with Python's ipaddress module.

CN-16Cheat sheet1 pageIn a paid pack

Aggregation, Longest Match and NAT

Supernetting and route aggregation (RFC 4632): when contiguous blocks merge into one prefix and when misalignment stops it, valid CIDR blocks for an allocation, longest-prefix match in a forwarding table with a default route, and network address translation (RFC 3022): basic NAT and NAPT, the translation table, the header fields and checksums that change in each direction, and NAT's side effects. Solved past questions from 2024, 2025 and 2026; every value checked with Python's ipaddress module.