The GATE Grind

GATE Computer Networks: IPv4: Addressing, CIDR, Fragmentation and NAT – Previous Year Questions

38 GATE previous year questions on IPv4: Addressing, CIDR, Fragmentation and NAT (Computer Networks, Computer Science) with answers and explanations, from every paper.

38 questions worth 61 marks in all (15 1-mark, 23 2-mark). Asked between 2007 and 2026, so you can see how the topic has been tested over time.

  1. GATE 2007 CS Q67 (2 marks, Multiple choice) – A class-B host address is split into subnets using a6-bit subnet number. Give maximum subnets and hosts per subnet.
  2. GATE 2008 CS Q57 (2 marks, Multiple choice) – A class-B network has subnet mask255.255.248.0. What maximum number of hosts per subnet?
  3. GATE 2015 CS (CS3) Q46 (2 marks, Numerical answer) – In network 200.10.11.144/27, find the final octet of the last host-assignable IP address, in decimal.
  4. GATE 2015 CS (CS2) Q36 (2 marks, Multiple choice) – An IP router has these routes: Network Mask Next hop --- --- --- 128.96.170.0 255.255.254.0 Interface 0 128.96.168.0 255.255.254.0 Interface 1…
  5. GATE 2015 CS (CS2) Q37 (2 marks, Multiple choice) – Host A sends 8880 bytes of user data by UDP over Ethernet with MTU 1500 bytes. UDP header is 8 bytes and IP header 20 bytes with no options. Find the…
  6. GATE 2010 CS Q25 (1 mark, Multiple choice) – Why does an IP datagram contain a Time-to-Live field?
  7. GATE 2010 CS Q57 (2 marks, Multiple choice) – 10.105.1.113 and 10.105.1.91 belong to the same IP network. Which subnet mask is NOT possible?
  8. GATE 2013 CS Q47 (2 marks, Multiple choice) – An IPv4 datagram has M=0, HLEN=10, total length 400 and fragment offset 300. Identify fragment position and zero-based first/last payload-byte…
  9. GATE 2012 CS Q33 (1 mark, Multiple choice) – In classful IPv4, how many Class C networks are possible?
  10. GATE 2012 CS Q44 (2 marks, Multiple choice) – An ISP holds CIDR block 245.248.128.0/20. Half goes to A, one quarter to B, and the rest is retained. Which A,B allocation is valid?
  11. GATE 2017 CS (CS2) Q30 (1 mark, Numerical answer) – What is the largest number of IPv4 router addresses that fit in the record-route option of an IPv4 header?
  12. GATE 2014 CS (CS3) Q35 (1 mark, Multiple choice) – Host A in IPv4 network A sends datagram D to host B in IPv4 network B. Transmission is error-free. On arrival, which header fields may differ from D’s…
  13. GATE 2014 CS (CS3) Q36 (2 marks, Numerical answer) – A CIDR router receives a packet for 131.23.151.76. Routing entries (prefix → output interface) are 131.16.0.0/12 → 3; 131.28.0.0/14 → 5; 131.19.0.0/16…
  14. GATE 2014 CS (CS3) Q37 (2 marks, Numerical answer) – Every IPv4 host has a battery-backed, one-second-resolution real-time clock and a globally unique IPv4 address. Each must generate up to 1000 unique…
  15. GATE 2014 CS (CS3) Q38 (2 marks, Multiple choice) – An IP router with MTU 1500 bytes receives a 4404-byte IP packet with 20-byte header. What are the relevant header fields of the third fragment?
  16. GATE 2014 CS (CS2) Q35 (1 mark, Numerical answer) – In the diagram, L1 is Ethernet and L2 is Token-Ring. An IP packet travels from S to R. Links within and across the two ISPs are point-to-point optical…
  17. GATE 2016 CS (CS1) Q34 (1 mark, Multiple choice) – Which one of the following protocols is NOT used to resolve one form of address to another one?
  18. GATE 2016 CS (CS1) Q63 (2 marks, Numerical answer) – An IP datagram of size 1000 bytes arrives at a router. The router has to forward this packet on a link whose MTU (maximum transmission unit) is 100…
  19. GATE 2015 CS (CS1) Q26 (1 mark, Multiple choice) – Which one of the following fields of an IP header is NOT modified by a typical IP router?
  20. GATE 2018 CS Q64 (2 marks, Numerical answer) – Consider an IP packet with a length of 4,500 bytes that includes a 20-byte IPv4 header and a 40-byte TCP header. The packet is forwarded to an IPv4…
  21. GATE 2019 CS Q38 (2 marks, Multiple choice) – Consider three machines M, N, and P with IP addresses 100.10.5.2, 100.10.5.5, and 100.10.5.6 respectively. The subnet mask is set to 255.255.255.252…
  22. GATE 2026 CS (CS2) Q33 (1 mark, Numerical answer) – 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 . (answer in…
  23. GATE 2026 CS (CS1) Q56 (2 marks, Multiple select) – An ISP having an address block 202.16.0.0/15 assigns a block of 6000 IP addresses to a client, using the classless inter-domain routing (CIDR)…
  24. GATE 2025 CS (CS2) Q18 (1 mark, Multiple choice) – 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…
  25. GATE 2025 CS (CS2) Q23 (1 mark, Multiple choice) – 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…
  26. GATE 2025 CS (CS1) Q57 (2 marks, Numerical answer) – 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…
  27. GATE 2024 CS (CS2) Q28 (1 mark, Multiple select) – Which of the following statements about IPv4 fragmentation is/are TRUE?
  28. GATE 2024 CS (CS2) Q32 (1 mark, Multiple select) – Which of the following fields of an IP header is/are always modified by any router before it forwards the IP packet?
  29. GATE 2024 CS (CS2) Q38 (2 marks, Multiple choice) – Which one of the following CIDR prefixes exactly represents the range of IP addresses 10.12.2.0 to 10.12.3.255?
  30. GATE 2024 CS (CS1) Q31 (1 mark, Multiple select) – 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…
  31. GATE 2024 CS (CS1) Q58 (2 marks, Numerical answer) – A router has forwarding entries: 10.1.1.0/24→R1, 10.1.1.128/25→R2, 10.1.1.64/26→R3, 10.1.1.192/26→R4. The router forwards 20 packets each to 5 hosts…
  32. GATE 2024 CS (CS1) Q65 (2 marks, Numerical answer) – 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…
  33. GATE 2023 CS Q65 (2 marks, Numerical answer) – The forwarding table of a router is shown below. Subnet Number / Subnet Mask / Interface ID: 200.150.0.0 / 255.255.0.0 / 1 200.150.64.0 /…
  34. GATE 2022 CS Q22 (1 mark, Multiple choice) – Consider an enterprise network with two Ethernet segments, a web server and a firewall, connected via three routers as shown below. What is the number…
  35. GATE 2022 CS Q55 (2 marks, Multiple select) – Consider routing table of an organization’s router shown below: Subnet Number Subnet Mask Next Hop 12.20.164.0 255.255.252.0 R1 12.20.170.0…
  36. GATE 2021 CS (CS1) Q55 (2 marks, Multiple select) – Consider two hosts P and Q connected through a router R. The maximum transfer unit (MTU) value of the link between P and R is 1500 bytes, and between…
  37. GATE 2020 CS Q25 (1 mark, Multiple choice) – Consider the following statements about the functionality of an IP based router. I. A router does not modify the IP packets during forwarding. II. It…
  38. GATE 2020 CS Q48 (2 marks, Multiple choice) – An organization requires a range of IP addresses to assign one to each of its 1500 computers. The organization has approached an Internet Service…