cancel
Showing results for
Did you mean:
Announcements
New Member

## subnetting an ip

I understand subnetting the long way, but that wont help on the exam. So I need to be able to get it quick for the exam. I understand the powers of 2 chart but I only know part of it and need some help and advice with the rest just to make sure I'm getting it right. Especially on the way they ask the questions or using cidr or not for th esubnet mask.

29                  28                  27                  26                  25                  24                  23            22            21                  20

512         256              128            64              32             16              8              4              2              1

128

192

224

240

248

252

254

255

I understand (I think) this so far - How many subnets and hosts can this IP  give you? 172.20.15.0 /23?

So a /23 uses 7 extra bits in the mask for the network, so looking at the chart 2^7=128, so they could have 128 subnets (we only minus 2 for hosts from what I learned). So, using 7 bits for the network we have 9 bits leftover for hosts, we look at the chart 2^9 is 512-2=510, then 510 is the number of hosts we can have.

Is that correct? How do I find the subnet mask based on the chart above? Is it if I used 7 bits for the network then I would count 7 on the column on the left and that is 254. So the subet mask for this /23 address is 255.255.254.0, correct?

Also, what subnet does this IP reside on 172.20.15.5 /16? This is where I need help since I dont know how to find the subnet increment.

Is this where I take the /23 as previously and see it uses 7 bits for the network and on the chart that would be increment of 128.

172.20.0.0

172.20.128.0

172.20.256.0

So it must live between the .0 and .128 networks and the range of usable hosts would be

172.20.0.1

172.20.127.254 (I might have messed that up?)

Also, if my logic is correct on this, is that I need to know for the exams?

Thanks.

Everyone's tags (1)
5 REPLIES
Hall of Fame Super Blue

## subnetting an ip

Not sure i follow you entire question but quick way of working out subnets in your head is -

192.168.5.50 255.255.255.224

1) take the first octet in the subnet mask moving from the left that is not 255 ie. in the above it is the last octet which is 224

2) take 224 away from 256 eg. 256 - 224 = 32

so your subnets go up in 32's ie.

192.168.5.0

192.168.5.32

192.168.5.64

192.168.5.96

etc...

for each subnet there is the actual subnet address itself + the broadcast address so looking at above subnets 192.168.5.50 255.255.255.224 is -

subnet -  192.168.5.32

host range - 192.168.5.33 -> 192.168.5.62

this method should work for any IP/subnet mask pair eg.

172.16.22.12 255.255.248.0

from the left the first octet in the subnet mask that is not 255 is 248.  256 - 248 = 8 so your subnets go up in 8 eg.

172.16.0.0

172.16.8.0

172.16.16.0

172.16.24.0

172.16.32.0

etc...

172.16.22.12 falls into the 172.16.16.0/21 subnet so  -

subnet - 172.16.16.0

host range -  172.16.16.1 -> 172.16.23.254

Hope that makes sense.

Jon

New Member

## subnetting an ip

Thanks, but what if I dont have the decimal for the SM and its a class A with a slash /20 and they want to know how many subnets and hosts. etc etc. The chart I can do to a certain extent.

During the exam I would need to know how to solve that quickly without using the long way.

Did my math make any sense on the first post?

Hall of Fame Super Blue

## Re: subnetting an ip

If the chart works for you then use it.

You worked out the subnet mask for 172.20.15.0/23 to be 255.255.254.0 which is correct and that is the way to do it ie. 7 extra bits means from the binary -

128 + 64 + 32 + 16 + 8 + 4 + 2 -= 254

You just need to memorise the left hand columnn so you can work these out quickly. That is why i was trying to show you how to do it in your head because once you get used to the maths it is very quick to switch between subnet masks and /notation in your head.

So a /23 uses 7 extra bits in the mask for the network, so looking at the chart 2^7=128, so they could have 128 subnets

Yes you can.

we look at the chart 2^9 is 512-2=510, then 510 is the number of hosts we can have.

Again yes. You take away two for the subnet and broadcast addresses.

So a quick test -

10.54.10.12/14

what is the subnet address and subnet mask for the above IP address ?

Jon

New Member

## Re: subnetting an ip

So a quick test -

10.54.10.12/14 - would be 255.252.0.0

/14 uses 6 extra bits, so increments would be 4 for the network

10. 0.0.0

10.4.0.0

10.8.0.0

etc..

10.32.0.0 (so it would live on this network)

10.64.0.0

I probably got it wrong and it took me too long.

wait...

10.54.0.0 (it would live here, 10.54.0.1 to 10.57.255.254 as useable)?

10.58.0.0

10.62.0.0

Hall of Fame Super Blue

## Re: subnetting an ip

I probably got it worng and it took me too long.

Doesn't matter how long it took, it's all practice and believe me it gets easier the more you pratice.

10.54.10.12/14 - would be 255.252.0.0

14 uses 6 extra bits, so increments would be 4 for the network

spot on with both statements.

10. 0.0.0

10.4.0.0

10.8.0.0

etc..

10.32.0.0 (so it would live on this network)

it doesn't but only because you didn't go up in 4 for each network ie you get to 10.32, from there it should be -

10.36.0.0

10.40.0.0

10.44.0.0

10.48.0.0

10.52.0.0  <-- it is on this network

10.56.0.0

subnet - 10.52.0.0

host range 10.52.0.1 -> 10.55.255.254

So i think you worked it out up to the last bit but even then you knew the increment the subnets went up so you weren't that far off.

Like i say it really is just practice and you need to use whichever solution is quickest for you. If that means memorising the table then do that. I can say from experience that the more you do it in your head the easier and easier it becomes until you can work them out very quickly.

Any further questions please feel free to ask.

Jon

177
Views
5