The GATE Grind

GATE 2026 CS (CS2) – Question 33

Computer Networks · IPv4: Addressing, CIDR, Fragmentation and NAT · 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 integer)

Practise this question in The GATE Grind →

Show answer and explanation

Correct answer: 4094

Explanation

The subnet mask 255.255.240.0 corresponds to a /20 network, leaving $32-20=12$ host bits. Hence the number of assignable host addresses is $$2^{12}-2=4096-2=4094,$$ where 2 addresses are excluded for the network and broadcast addresses. Therefore, the answer is 4094.