Results 1 to 2 of 2

Thread: FreeBSD - Dummynet / IPFW

  1. #1
    Senior Member
    Join Date
    Aug 2001
    Posts
    356

    FreeBSD - Dummynet / IPFW

    Hi All,

    I'm hoping maybe someone is familiar with using Dummynet to manage pipes. I have a full class C network that I use for web hosting. I have been using Dummynet to divide my pipe into seperate pipes. One for dedicated hosting and one for shared hosting.

    Everything works great, except my rules are really starting to add up as I have to add a rule per ip address. It's starting to become quite a pain to work with them.

    Is there anyway to specify IP Ranges in the rules instead of adding 1 rule per IP Address? Say I wanted 192.168.1.1 - 192.168.1.30 to all go through pipe1. Currently I add a rule for every IP Address. It would be great if I could have one rule that just specifies the IP range.

    I know you can specify the whole Class C by using 192.168.1.0/24. Maybe there is a way to specify certain ranges in a similar manner? I am familiar with CIDR but I can't seem to get the rules to work with this method. If it is possible, maybe someone could give me a quick example how to specify a range?

    Thanks for any help!

    --

    Here is an example of how my ipfw rules are currently sending traffic to their pipes. They really start to add up.

    # Create The Pipes

    pipe 1 config bw 616KBit/s # Shared Pipe
    pipe 2 config bw 384KBit/s # Dedicated Pipe

    # Direct Traffic To Correct Pipes
    # Shared Range 192.168.1.1 - .30
    add 01001 pipe 1 all from 192.168.1.1 to any
    add 01002 pipe 1 all from 192.168.1.2 to any
    add 01003 pipe 1 all from 192.168.1.3 to any
    add 01004 pipe 1 all from 192.168.1.4 to any
    [ Do this all the way until .30 is reached ]
    add 01030 pipe 1 all from 192.168.1.30 to any

    # Dedicated Pipe 192.168.1.31
    add 01031 pipe 2 all from 192.168.1.31 to any

    # Shared Range 192.168.1.32 - .55
    add 01032 pipe 1 all from 192.168.1.32 to any
    add 01033 pipe 1 all from 192.168.1.33 to any
    add 01034 pipe 1 all from 192.168.1.34 to any
    [ Do this all the way until .55 is reached ]
    add 0105 pipe 1 all from 192.168.1.55 to any
    An Ounce of Prevention is Worth a Pound of Cure...
     

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Posts
    356
    Nevermind, I just found out that IPFW2 supports ranges...

    Now I just need to get it running... Damn!
    An Ounce of Prevention is Worth a Pound of Cure...
     

Posting Permissions

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