Date: Fri, 28 Sep 2001 14:02:24 +0200 From: Marko Cuk <cuk@xenya.si> To: nuzrin@goose.net.my, walter@binity.com, freebsd-questions@FreeBSD.ORG Subject: Re: Fair bandwidth sharing with ipfw? Message-ID: <3BB466D0.8ED66170@xenya.si> References: <19743634202.20010928031728@binity.com> <200109281144.TAA19665@venus.cyber.mmu.edu.my>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3BB466D0.8ED66170>