# IP address question

Answered Question
Nov 26th, 2008

Okay,

How do I get the subnet ID if I have an address and mask only?

I always use a calculator (Advanced IP Address Calculator is good), but I've been trying to figure this out.

172.20.13.27 255.255.255.240

I *know* what the subnet id is (the beginning of the block), but how would I figure this out quickly?

Thanks,

John

0 votes
Correct Answer by Giuseppe Larosa about 7 years 11 months ago

Hello John,

make the conversion in binary of ip address and subnet mask

let's concentrate on 4th byte

27 = 00011011 binary

240 = 11110000 binary

then you put zeros in the host position of the mask

that leave you:

16 = 10000 binary

so the subnet address is:

172.20.13.16/28

Hope to help

Giuseppe

Correct Answer by Jon Marshall about 7 years 11 months ago

John

256 - 240 (240 because of the last octet in 255.255.255.240) = 16 so subnets go up in 16

172.20.13.0

172.20.13.16

172.20.13.32

so subnet is 172.20.13.16

Jon

Overall Rating: 5 (4 ratings)

## Replies

Correct Answer
Jon Marshall Wed, 11/26/2008 - 13:07

John

256 - 240 (240 because of the last octet in 255.255.255.240) = 16 so subnets go up in 16

172.20.13.0

172.20.13.16

172.20.13.32

so subnet is 172.20.13.16

Jon

Correct Answer
Giuseppe Larosa Wed, 11/26/2008 - 13:11

Hello John,

make the conversion in binary of ip address and subnet mask

let's concentrate on 4th byte

27 = 00011011 binary

240 = 11110000 binary

then you put zeros in the host position of the mask

that leave you:

16 = 10000 binary

so the subnet address is:

172.20.13.16/28

Hope to help

Giuseppe

Giuseppe Larosa Wed, 11/26/2008 - 13:19

hello Jon,

I was going to edit my post ...

because of course John is not so a beginner to need a full binary lesson !

Excuse me John !

Best Regards

Giuseppe

Jon Marshall Wed, 11/26/2008 - 13:23

Giuseppe

I was just making a joke, no offense intended at all. The joke being that converting backwards and forwards from binary is not that quick ! or at least it isn't for me.

Once again no offense intended.

Jon

Giuseppe Larosa Wed, 11/26/2008 - 13:43

Hello Jon,

I understood your joke -))

no offense at all

Best Regards

Giuseppe

John Blakley Wed, 11/26/2008 - 14:55

Thanks Jon and Giuseppe! Yeah, after I had posted this I decided to write it out in binary and I got the same thing. Jon I seem to remember asking you this a couple of weeks ago though. Sorry if this is the same exact question! :-)

Thanks!

John

marikakis Wed, 11/26/2008 - 15:01

Hello all,

I normally follow a mixture of both procedures to find subnets or things like that, depending on what fits me best at a particular time. The binary might not be quick for some people, but for me it's good when I am too tired to think of shortcuts. I think binary is a definite method, unless one really hates binary.

Always nice to see people having fun here :-)

Kind Regards,

M.