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 188.8.131.52/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
184.108.40.206 to 220.127.116.11. To determine this you bitwise AND the IP address with the netmask.
It isn't stupid it just uses bitwise math operations.