4.8-Stable DummyNet

Matthew Dillon dillon at apollo.backplane.com
Mon Jun 2 14:08:38 PDT 2003


    Hmm.  I think the easiest thing to do is to control the bandwidth on
    the LAN side of natd rather then on the ADSL side.  If the PCs do not
    advertise huge TCP windows limiting the bandwidth on the LAN side
    should be sufficient to prevent continuous saturation of your uplink.

    There are two ways to do this:  Dynamic queues associated with a single
    pipe, or dynamic pipes.

    If you use dynamic queues associated with a single pipe IPFW can share
    the bandwidth and any given client can use the full available bandwidth
    if nobody else is.  However, this may not turn out as you expect because
    disparate protocols are competing for the bandwidth... UDP for in-game
    play and bulk TCP for downloads, and the people playing in games may
    still see glitches.  Setting the pipe to slightly less then the ADSL
    line's actual bandwidth might solve the glitches, though.

    If you use dynamic pipes you can hard limit the maximum bandwidth that
    any single client is allowed to use.  For example, if your ADSL is
    6 MBits you could limit the per-client bandwidth to 1 MBit.  Even though
    6 or more clients downloading at once could saturate the pipe, this
    solution is likely to result in fewer glitches then the queue mechanism.

    Ultimately the queue mechanism is likely going to be the best way to go,
    but it will require a lot of fine tuning to get there and I expect you
    could implement the dynamic pipe mechanism (hard limit maximum bandwidth
    to each client) in an hour or two.

    Now unfortunately I am not an expert on dynamic queues and dynamic pipes.
    The IPFW manual page describes them (look for the mask-specifier phrase
    in the manual page).  From my read it ought to be really easy to set
    up dynamic pipes as an initial solution, and then experiment with the
    dynamic queues for a possible long-term solution.

						-Matt

:Hi.  We just opened a gaming center and have chosen to run a FreeBsd box for 
:our firewall.  IPFW is configured at it's very basic running natd through rl0 
:and allowing any to any connections from the lan to the outer world.  Natd 
:controls access to the lan.
:
:We have a 6.0 mb/s ADSL net connection for all the gaming clients to use, 
:however if a gamer starts downloading a file, that file takes precendence and 
:causes everyone's pings 'in-game' to sky rocket to unplayable levels.  I have 
:done some reading on DummyNet which is attached at the hip with IPFW, however I 
:have been unsuccessful in getting it to work properly.
:
:I have done some research and found this site: 
:http://info.iet.unipi.it/~luigi/ip_dummynet/
:
:After reading I became more confused than before.  Should I share the link as a 
:whole to all 64 client machines OR should I set a fixed BW for all client 
:machines.  Are there other websites out there that can help with this?
:
:Also if and when I do find a working pipe/queue config do I put it before the 
:natd via rl0 command or after?
:
:Thanks.


More information about the freebsd-stable mailing list