View Full Version : IP blocks
02-14-2012, 01:39 PM
One of the most stupidest thing I have ever seen in computers is IP blocks.
I was wondering if anyone knows how I can convert them without making my mind explode?
I.E, how would I convert this?
02-14-2012, 10:18 PM
That typically isn't how you would write that, it would be written as 220.127.116.11/17. Nevertheless if you are asking about the /17 part that is representing the net mask and it means the upper 17 of the 32 bits are set.
So if you turn that into a hex number you get FFFF8000 and then break that into 4 bytes you get: FF FF 80 00 and then convert to decimal: 255 255 128 0. Then format it like a netmask: 255.255.128.0. Done.
So a network subnet with that netmask would have an IP range of
18.104.22.168 to 22.214.171.124. To determine this you bitwise AND the IP address with the netmask.
It isn't stupid it just uses bitwise math operations.
02-15-2012, 01:12 AM
Cool. I didn't understand that.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.