I wrote this on Yahoo Answers years ago, and I've had countless people email/thank me for this explanation. Since you have an understanding of subnetting, read this and see if you can figure out your question. If you figure it out, leave an answer in a comment. If you get stumped, ask a question in a comment. It's good practice, and the only way to learn subnetting!
So you're given your networks, and are told to break them up into smaller networks. I'll start with question A.
Question A says that we have the 172.18.0.0 /16
network, and we want to break it up into smaller networks. To do that, we need to borrow some host bits from our given network. Right now, our network bits are the 172.18
octets, and our host bits are in the 0.0
octets. In binary this would be a bunch of 1's and 0's but to help you visually see this, I'm going to use N for network, and H for host bits.
We would have nnnnnnnn.nnnnnnnn.hhhhhhhh.hhhhhhhh
. To make our network smaller we need to take some of those "h"
bits and make them "n"
bits. The formula for this is 2^n
. Then this will tell you how many networks you can make. So if we just borrow one "h"
bit, we would take 2^1=2
. So now out octets would look like nnnnnnnn.nnnnnnnn.nhhhhhhh.hhhhhhhh
. Since the bit values of the octets go 128 64 32 16 8 4 2 1
, our new network bit is using the .128
. So our networks will be 172.18.0.0 /17
and 172.18.128.0 /17
.
Since your questions asks to break it into 8 smaller networks we just need to find 2^n = 8
. Since 2^3 = 8
we're going to borrow three host bits. So now our bits would look like nnnnnnnn.nnnnnnnn.nnnhhhhh.hhhhhhhh
. Since our network bit is now using the 32 bit, our networks will go by 32
. So your four networks would be 172.18.0.0 /19
, 172.18.32.0 /19
, 172.18.64.0 /19
and so on until you get to your last network of 172.18.224.0/19
.
For question B, it wants us to subnet the 10.0.0.0 /8
into four subnets. Again, our bits would look like nnnnnnnn.hhhhhhhh.hhhhhhhh.hhhhhhhh
. The now we need to find out 2^n = 4
. Since 2^2 = 4
, we'll borrow two host bits, and use them as network bits. So our octet would now look like nnnnnnnn.nnhhhhhh.hhhhhhhh.hhhhhhhh
. And our networks would be the 10.0.0.0 /10
and the 10.64.0.0 /10
.
Now that we know our network addresses, finding the broadcast address and number of nodes per subnet is easy. For example our first 172.18.0.0
network is the 172.18.0.0 /17
and the next network would be 172.18.32.0 /17
. The broadcast address is always the last address of the subnet, so for the 172.18.0.0
network it would be 172.18.31.255
. For the 172.18.32.0
network, it would be 172.18.63.255
.
To find out the number of nodes, the long/hard way is to take 2^h
. H being the number of hosts bits that you have. So for the 172.18.0.0 /17
network, we have 15 host bits, so we would take 2^15 = 32768
.
I'm sorry that is extremely lengthy. I'm not sure on how comfortable you are with subnetting overall, but here are some shortcuts. If you're wanting to find out the number of subets, just take your bit value of either 128 64 32 16 8 4 2 1 and divide it by 256
. So for example, question A, we needed eight subnets. All you would have to do is take 256/32 = 8. Then you would count your networks by 32, since you're using the 32 valued bit.
For finding the number of nodes per network, you just start doubling numbers. A /30 can have 4 hosts totals, 2 usable. a /29 has 8, /28 has 16 and so on. The last octet really goes by bit values so it would just go 128 64 32 16 8 4 2 1
. That's the number of total hosts, if you minus 2, that would be the number of usable hosts.
Then once you get to the /23
, you start doubling. A /24 is 256
, /23 is 512
, /22 1024
. Then just double each time you increase one bit value