Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3

Thread: IP blocks

  1. #1
    Banned
    Join Date
    Jan 2012
    Posts
    93
    Thanks
    8
    Thanked 0 Times in 0 Posts

    IP blocks

    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?
    186.120.128/17

  • #2
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts
    That typically isn't how you would write that, it would be written as 186.120.128.0/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
    186.120.128.0 to 186.120.255.255. To determine this you bitwise AND the IP address with the netmask.

    It isn't stupid it just uses bitwise math operations.
    OracleGuy

  • #3
    Banned
    Join Date
    Jan 2012
    Posts
    93
    Thanks
    8
    Thanked 0 Times in 0 Posts
    Cool. I didn't understand that.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •