All Articles
GATE8 min read20 July 2026

GATE Computer Networks: The Definitive Guide to IP Addressing & Subnetting

Computer Networks is a high-yield GATE subject. Learn the robust numerical techniques to solve IP addressing, classless inter-domain routing (CIDR), and subnetting problems quickly.

Demystifying Computer Networks in GATE

Computer Networks (CN) contributes roughly 8-10 marks in the GATE CSE paper. Unlike Theory of Computation, which requires deep logical abstraction, or Data Structures, which involves complex code tracing, a significant portion of CN evaluates your ability to perform methodical, rule-based numerical calculations.

The undisputed core of these numerical questions is the Network Layer—specifically IP Addressing, Subnetting, and CIDR (Classless Inter-Domain Routing). If you are strong in binary manipulation, you can guarantee these marks.

The Foundation: IPv4 Address Structure

An IPv4 address is 32 bits long, divided into 4 octets (8 bits each), separated by dots (e.g., 192.168.1.10). Structurally, an IP address has two parts:

  • Network ID (NID): Identifies the specific network.
  • Host ID (HID): Identifies the specific machine on that network.

Part 1: Classful Addressing (The Older Model)

Though largely obsolete in practice, GATE still tests Classful Addressing fundamentals to understand legacy systems.

  • Class A: NID is 8 bits, HID is 24 bits. Leading bit: '0'. Range: 1-126. Default Subnet mask: 255.0.0.0.
  • Class B: NID is 16 bits, HID is 16 bits. Leading bits: '10'. Range: 128-191. Default Subnet mask: 255.255.0.0.
  • Class C: NID is 24 bits, HID is 8 bits. Leading bits: '110'. Range: 192-223. Default Subnet mask: 255.255.255.0.
  • Class D: Multicast (224-239). Leading bits: '1110'.
  • Class E: Experimental (240-255).

Special Cases: Network ID 127 is reserved for Loopback testing. The address where all Host bits are 0 is the Network Address. The address where all Host bits are 1 is the Directed Broadcast Address.

Part 2: Subnetting Concept and Subnet Masks

Subnetting means borrowing bits from the Host ID portion to create smaller, manageable sub-networks.

The Subnet Mask: Uses 1s to represent the network/subnet portion and 0s to represent the host portion. ANDing an IP address with its Subnet Mask mathematically extracts the Network Address.

Key Formulas: If you borrow 'n' bits for subnetting, and 'h' bits remain for the host:

  • Number of created subnets = 2^n
  • Number of usable hosts per subnet = 2^h - 2 (Why minus 2? You must subtract the Network Address (all host bits 0) and the Broadcast Address (all host bits 1) inside that newly created subnet).

Part 3: CIDR - Classless Inter-Domain Routing

Classful addressing was terribly inefficient. CIDR solved this by ignoring classes. The network prefix can be of any length, denoted by slash notation (e.g., /24, /26).

CIDR Format: a.b.c.d / n Here, 'n' represents the exact number of bits used for the Network ID. The remaining (32 - n) bits are the Host ID.

The Typical GATE CIDR Problem

Question Type 1: Finding Network Details Given: IP = 200.10.5.68 / 28. Find the Network Address, First Host, Last Host, and Broadcast Address. Solution Workflow:

  1. Identify the 'active' octet. /28 means 8+8+8+4. So, the first 3 octets (200.10.5) are fixed. The 4th octet is split: 4 bits for network, 4 bits for host.
  2. Convert 4th octet (68) to binary: 0100 0100.
  3. Apply the mask: Keep the first 4 bits (0100_), set the remaining 4 host bits to 0. Result: 0100 0000 = 64.

Start applying this today

Veda tracks your mistakes, identifies your weak spots, and builds a personalized study plan automatically.

Try Veda Free →