cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
643
Views
10
Helpful
8
Replies

IP address question

John Blakley
VIP Alumni
VIP Alumni

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

HTH, John *** Please rate all useful posts ***
2 Accepted Solutions

Accepted Solutions

Jon Marshall
Hall of Fame
Hall of Fame

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

View solution in original post

Giuseppe Larosa
Hall of Fame
Hall of Fame

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

View solution in original post

8 Replies 8

Jon Marshall
Hall of Fame
Hall of Fame

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

Giuseppe Larosa
Hall of Fame
Hall of Fame

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, he said quickly :-)

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

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

Hello Jon,

I understood your joke -))

no offense at all

Best Regards

Giuseppe

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

HTH, John *** Please rate all useful posts ***

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.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card