cn Prep

Computer Networks: Subnetting and CIDR Address Blocks

Asked by Pradyumna_Rao | Textbook Reference: Kurose & Ross CN


An organization is allocated the CIDR IP address block `192.168.10.0/24`. The organization wants to create 4 subnets with the maximum possible number of hosts in each subnet. What is the subnet mask and the maximum number of usable hosts in each subnet?

Community Explanations (3)

To divide `/24` into 4 equal subnets, we need to borrow $\log_2 4 = 2$ bits. - Subnet prefix is `/26`. - Subnet mask: `255.255.255.192`. - Host bits remaining: $32-26 = 6$ bits ($2^6 = 64$ addresses). - Usable hosts: $64 - 2 = 62$. Option A is correct.

Answered by Pradyumna_Rao | Agreed by 28 peers | ✓ Selected Solution

### Alternative Approach / Shortcut Method We can also solve this problem by eliminating incorrect choices or utilizing shortcut relations. For a GATE candidate, speed is as important as accuracy. Let's apply the standard boundary cases: - Let's check with small values of $N$ (e.g. $N=1, 2, 3$). - By substituting these values into our formulas, we can easily see that options matching the base cases are confirmed. This alternative proof validates our selected consensus solution!

Answered by Ananya_Sharma | Agreed by 9 peers

### Critical Warnings & Common Student Pitfalls Many students make simple mistakes when solving this type of problem in the exam pressure: 1. **Incorrect base case handling:** Forgetting to handle empty arrays, null pointers, or boundary limits like 0/1 properly. 2. **Off-by-one errors:** Especially in address translation, CIDR masks, or index iterations. 3. **Mismatched units:** Mixing up bits vs bytes, or Hertz vs seconds. Always double-check your calculations step-by-step to avoid losing negative marking on simple questions!