GATE 2026 CS (CS2) – Question 33
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.
More IPv4: Addressing, CIDR, Fragmentation and NAT questions
- GATE 2025 CS (CS1) Q57
- GATE 2025 CS (CS2) Q18
- GATE 2025 CS (CS2) Q23
- GATE 2024 CS (CS1) Q31
- GATE 2024 CS (CS1) Q58
- GATE 2024 CS (CS1) Q65
All IPv4: Addressing, CIDR, Fragmentation and NAT questions →