Date: Mon, 15 Apr 2002 03:24:32 -0700 From: Luigi Rizzo <rizzo@icir.org> To: Mihail Balikov <misho@interbgc.com> Cc: freebsd-ipfw@FreeBSD.ORG Subject: Re: dummynet and ip.fw.one_pass Message-ID: <20020415032432.A24198@iguana.icir.org> In-Reply-To: <000901c1e45c$6f89a3a0$eee209d9@interbgc.com> References: <003401c1e419$70e73340$eee209d9@interbgc.com> <20020414221105.B21946@iguana.icir.org> <000901c1e45c$6f89a3a0$eee209d9@interbgc.com>
next in thread | previous in thread | raw e-mail | index | archive | help
i do not follow your reasoning -- there is no "burst" parameter in the pipe configuration. cheers luigi On Mon, Apr 15, 2002 at 12:03:40PM +0300, Mihail Balikov wrote: > in configuration: > > ipfw pipe 1 config bw 1Mbit/s > ipfw queue 2 config pipe 1 weight 1 mask dst-ip 0x000000ff > ipfw add queue 2 ip from any to 1.2.3.0/24 > ipfw pipe 3 config bw 64Kbit/s burst 128Kbit/s mask dst-ip 0x000000ff > ipfw add 3 pipe 3 ip from any to 1.2.3.0/24 > > is it correct following logic: > > if ( (packet & M_DUMMYNET) && /* packet has passed through > pipe ==> pipe 2 */ > ! (packet & M_DUMMYNET_DELAIED)) /* packet has not been delaied by pipe > 2 */ > { > allow_burst_upto(128Kbit/s); > } else { > exact_shape(64Kbit/s); > } > > regards, > Mihail > > > > ----- Original Message ----- > From: "Luigi Rizzo" <rizzo@icir.org> > To: "Mihail Balikov" <misho@interbgc.com> > Cc: <freebsd-ipfw@FreeBSD.ORG> > Sent: Monday, April 15, 2002 8:11 AM > Subject: Re: dummynet and ip.fw.one_pass > > > > the code seems correct, but I would do the shaping in the opposite > > order so that a single host won't be able to monopolise the 1Mbit > > that you allow for the network. > > > > Secondly, this seems to be a good use for fair queueing, where > > you want equal sharing of the 1Mbit/s bandwidth: > > > > ipfw pipe 1 config bw 1Mbit/s > > ipfw queue 2 config pipe 1 weight 1 mask dst-ip 0x000000ff > > > > ipfw add queue 2 ip from any to 1.2.3.0/24 > > > > (you do not need fw_one_pass=0 in this case) > > > > cheers > > luigi > > > > On Mon, Apr 15, 2002 at 04:04:06AM +0300, Mihail Balikov wrote: > > > Hi, > > > > > > is it correct to use such configuration : > > > > > > sysctl -w net.inet.ip.fw.one_pass=0 > > > > > > # process only outgoing packets > > > ipfw add 10 allow all from any to any in > > > # shape whole network to 1Mb/s > > > ipfw add 15 pipe 15 all from any to 1.2.3.0/24 > > > ipfw pipe 15 config bw 1Mbit/s > > > # shape every host to 64Kb/s > > > ipfw add 20 pipe 20 all from any to 1.2.3.0/24 > > > ipfw pipe 20 config mask dst-ip 0x000000ff bw 64Kbit/s > > > # transmit packet > > > ipfw add 30 allow all from any to any > > > > > > regards, > > > Mihail > > > > > > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > > with "unsubscribe freebsd-ipfw" in the body of the message > > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > > with "unsubscribe freebsd-ipfw" in the body of the message > > > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ipfw" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020415032432.A24198>