Results 1 to 4 of 4

Thread: Stupid IP question

  1. #1

    Stupid IP question

    Ok, I know some of you guys are gonna think I am nuts but for some reason I can't get this. CIDR. I am trying to write a ruleset for my firewall. If I have an IP that is I know it is basically 192.168.*.*, and is 192.168.0.* but I don't get the or /32 etc subnets. I know the subnet for /22 is but what does that really mean in terms of IP address'?Can someone explain in plain English.

  2. #2

    Re:Stupid IP question

    That's fairly simply (although I must admit i'll never get used to that subnet stuff...)
    /32, or any number actually means the number of ONEs in octet (each octet has eight ones - 11111111, which means 255 if you'll convert it from binary format to decimal, I use calc in scientific view to do that)
    So following that logic 32 is 11111111.11111111.11111111.11111111 - which is - which means host itself, so when you see it means that this is the host itself.

    /12 using that logic would mean the following:
    12 is twelve ones - 11111111.11000000.00000000.000000000,
    11111111 - gives us 255
    11000000 - gives us 192 (use calc to convert it from binary to decimal format)
    000000 - gives us 0
    So in the end you get

    Hopefully I didn't oversimplified that, if I did, then I just tried to be as fothcoming as possible ;D

  3. #3
    redhead's Avatar
    Join Date
    Jun 2001
    Copenhagen, Denmark

    Re:Stupid IP question

    So, if you want to figure out how many IP's you've covered with a rule like:
    IP/16, then it'll be: 2^(32-16)

  4. #4
    Good Guru
    Schotty's Avatar
    Join Date
    Jul 2001
    Milwaukee, WI

    Re:Stupid IP question

    I am not quite sure that would work.

    I know how to do it, but cant say it in a clean fashion (or at least I think its a shitty explanation) but here it goes anyhow.

    IIRC the way to do it, is break it into each of the four octets. Turn each octet into how much of a range you have sitting there, and multiply it out.

    For example, we know that class C is 192.168.0.xx (to pick one). In a class C we have 255 addresses (1-255 even though 255 is your broadcast and is unusable). So we have a range set of 1,1,1,255. We can multiply that out to 1x1x1x255=255.

    If we cut back or expand it this will work. But as said before, I can do it, but its probably the uber-long way. I do know there is a cute little formula, but I forogt it 3 seconds after reading it ;D

Similar Threads

  1. Stupid Question.
    By singularity589 in forum Linux - Software, Applications & Programming
    Replies: 1
    Last Post: 06-07-2006, 03:57 PM
  2. Stupid Question
    By beagleboy4tv in forum Linux - Software, Applications & Programming
    Replies: 4
    Last Post: 03-25-2004, 02:16 PM
  3. Ask a stupid question, get a stupid answer.
    By Stuart in forum General Chat
    Replies: 17
    Last Post: 10-02-2003, 12:39 AM
  4. Stupid question
    By mcdougrs in forum Windows - General Topics
    Replies: 3
    Last Post: 12-15-2002, 08:06 AM
  5. Stupid question
    By stryder144 in forum Linux - Software, Applications & Programming
    Replies: 2
    Last Post: 05-12-2002, 04:58 PM


Posting Permissions

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