2

Consider a router that interconnects three subnets: Subnet1, Subnet2, and Subnet3. Suppose all of the interfaces in each of these three subnets are required to have the prefix 223.1.17/24. Also suppose that Subnet #1 is to support at least 60 interfaces Subnet #2 is to support at least 90 interfaces Subnet #3 is to support at least 12 interfaces. Provide three network addresses (of the form a.b.c.d/x) that satisfy these constraints.

Here is my work.

For Subnet1 we have to support at least 60 interfaces and 2^6 >= 60 so the prefix for subnet1 is 32-6 = 26 for subnet1 = 223.1.17.x/26

For Subnet2 we have to support at least 90 interfaces and 2^7 >= 90 so the prefix for subnet2 is 32-7 = 25 , and so subnet2 = 223.1.17.y/25

For Subnet3 we have to support at least 12 interfaces and 2^4 >= 12 so the prefix for subnet3 is 32-4 = 28 , and so subnet3 = 223.1.17.z/28

Now my problem is working the values for x,y and z.

I know that for subnet1 (I have 2^6 different values) and for subnet2 (I have 2^7) and for subnet3 (I have 2^4). I also know that all these subnets are not allowed to overlap. So how should I figure out the value for x,y,z ?

7
  • Start each of x, y, and z at 0 and calculate the possible network addresses for each based on the three subnet masks. From there it should be easy to pick one option from each of the three lists of possibilities that work together. Commented Apr 13, 2015 at 22:19
  • For x I have from 64 different values from 0 to 64 ? for y I have from 128 values from ? for z i have from ?
    – alkabary
    Commented Apr 13, 2015 at 22:47
  • 0 to 64 is 65 different values, 0 to 63 is 64 different values.
    – Ron Maupin
    Commented Apr 13, 2015 at 23:15
  • 2
    This sure looks like a homework question
    – Ron Trunk
    Commented Apr 14, 2015 at 0:18
  • @Ron, yes, that's why I only gave one hint in a comment. I actually have an entire answer that properly explains it so that even for newbies seem to understand.
    – Ron Maupin
    Commented Apr 14, 2015 at 0:26

2 Answers 2

1

Generally when subnetting using requirements like these, it is easiest to start by organizing the subnets from largest to smallest.

In your example, you have a /24 to work with and need to fit a /25 (y), a /26 (x), and a /28 (z) into that range.

A /24 is easily separated into two /25s. The first of these becomes your y subnet.

The second /25 can in turn be separated into two /26s. Similarly, the first /26 becomes your x subnet.

From there, it should be easy to figure out z from the remaining IP addresses in your original /24. The unused IP addresses could then be reserved for future use.

0

Wouldn't x, y and z be 0, 64 and 192? Since, for subnet1 you can have 64 addresses in total, so the network address for the first subnet would be 223.1.17.0, and the broadcast address would be 223.1.17.63 - this gives 62 (64 - 2) usable addresses. The network address for subnet2 would be the one after where subnet 1 left off - 223.1.17.64, and the CIDR prefix allows 128 hosts for this subnet so the broadcast address would be 223.1.17.191 - giving 126 (128 - 2) usable addresses. Finally for subnet 3 you can have 16 addresses in total, similarly, we start from where subnet2 left off, so 223.1.17.192 for the network address for subnet 3, and 223.1.17.207 for the broadcast address. This gives 14 (16 - 2) usable addresses.

Not the answer you're looking for? Browse other questions tagged or ask your own question.