From owner-freebsd-questions Fri Sep 28 5: 2:51 2001 Delivered-To: freebsd-questions@freebsd.org Received: from nu.cuk.nu (nu.cuk.nu [212.30.95.50]) by hub.freebsd.org (Postfix) with ESMTP id 47E0E37B408 for ; Fri, 28 Sep 2001 05:02:45 -0700 (PDT) Received: from localhost (localhost.nu.cuk.nu [127.0.0.1]) by nu.cuk.nu (Postfix) with ESMTP id 3933E1ABE8; Fri, 28 Sep 2001 14:03:09 +0200 (CEST) Received: from xenya.si (note.nat.xenya.si [192.168.1.223]) by nu.cuk.nu (Postfix) with ESMTP id 96E4B1ABE0; Fri, 28 Sep 2001 14:02:57 +0200 (CEST) Message-ID: <3BB466D0.8ED66170@xenya.si> Date: Fri, 28 Sep 2001 14:02:24 +0200 From: Marko Cuk X-Mailer: Mozilla 4.78 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: nuzrin@goose.net.my, walter@binity.com, freebsd-questions@FreeBSD.ORG Subject: Re: Fair bandwidth sharing with ipfw? References: <19743634202.20010928031728@binity.com> <200109281144.TAA19665@venus.cyber.mmu.edu.my> Content-Type: text/plain; charset=iso-8859-2 Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS perl-10 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG I think, that this can help. Cuk man ipfw A queue is an abstraction used to implement the WF2Q+ policy. The queue associates to each flow a weight and a reference pipe. Then, all flows linked to the same pipe are scheduled at the rate fixed by the pipe according to the WF2Q+ policy. weight weight Specifies the weight to be used for flows matching this queue. The weight must be in the range 1..100, and defaults to 1. http://www.iet.unipi.it/~luigi/ip_dummynet/ It simulates/enforces queue and bandwidth limitations, delays, packet losses, and multipath effects. It also implements a variant of Weighted Fair Queueing called WF2Q+. It can be used on user's workstations, or on FreeBSD machines acting as routers or bridges. To use WF2Q+, packets must be passed to queues which in turn must be connected to a pipe. The following ipfw commands control dummynet pipes ipfw queue NN config ... This command is used to create or reconfigure a queue. NN is the numeric identifier (between 1 and 65535) of the queue. Issuing multiple time the configuration command results in the queue being reconfigured. ipfw queue NN delete Destroys a single queue. Remember that packets sent to a non-existing queue are silently dropped. ipfw queue flush Destroys all queues. The following parameters can be configured for a queue, adding the command in the queue config... line: Pipe: pipe NN NN is the identifier of the pipe used for regulating traffic. Weight: weight NN NN is the weight (1..100, default 1) associated to the queue. Per-Flow queueing: mask ... The syntax is the same as for pipes. However, all queues created dynamically will share the parent pipe's bandwidth according to the weight. Queue size, Random Packet Loss: Same as for pipes. nuzrin yaapar wrote: > Try looking at ALTQ, it can do what you describe. But last I check it still > doesn't have a patch for FreeBSD 4.4, only patchset until 4.3 is available. > > Not relevant to the question somehow...does anyone have any idea as to > whether ALTQ will be integrated to the main FreeBSD tree? It will be nice to > have this thing in the base distribution, and thus many more reason to use > FreeBSD!!! > > On Friday 28 September 2001 9:17 am, Walter Hop wrote: > > Hi all, > > > > I've used dummynet pipes for bandwidth management, which is working out > > pretty well. Still there is a scenario I haven't dealt with: > > > > I want to connect my apartment to an ADSL line (256k/1024kbit) through a > > FreeBSD natd+ipfw router, and share the bandwidth fairly between the > > housemates, so that: > > > > 1] When only one of the workstations is busy, it can use 90% of the > > available bandwidth. > > > > 2] When multiple workstations are up/downloading, the available > > bandwidth is divided more or less equally between the workstations. > > > > Now in many situations, this balance will appear automatically; but I > > noticed by tcpdumping that sometimes one station occupies most of the > > bandwidth while other machines are all stalled -- their transfer rates > > get back to normal levels when a busy machine is ipfw'ed down. > > > > Is this possible with ipfw (ipfw queues perhaps)? > > Thanks. :) > > > > walter > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message