02-14-2012, 12: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, 09:18 PM
That typically isn't how you would write that, it would be written as 184.108.40.206/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
220.127.116.11 to 18.104.22.168. 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, 12:12 AM
Cool. I didn't understand that.