Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 26 Jun 2002 08:50:25 +0300
From:      "Artyom V. Viklenko" <artem@mipk-kspu.kharkov.ua>
To:        Alexander <amour@bugs.elitsat.net>
Cc:        freebsd-isp@FreeBSD.ORG
Subject:   Re: ipfw question
Message-ID:  <3D195621.BF8BD874@mipk-kspu.kharkov.ua>
References:  <20020625212231.U4383-100000@bugs.elitsat.net>

next in thread | previous in thread | raw e-mail | index | archive | help
Alexander wrote:
> 
> Hello,
> I have few clients which should share 1 channel of 256Kbit/s and each one
> of them should have max 64Kbit/s.
> The idea is like 5-6 clients to share 256Kbit/s
> 
> I do the following pipe configs
> 
> ipfw pipe 1 config bw 64Kbit/s queue 5
> ...
> ipfw pipe 6 config bw 64Kbit/s queue 5
> ipfw pipe 7 config bw 256Kbit/s queue 5

You set 6 clients with 64kbit/s limits, so each
client will never reach higher bandwidth!
In this case IMHO you didn't need pipe 7 with 256 kbit/s.

But if you want more than 6 clients with max bandwidth at 64kbit/s
and 256kbit/s total limit, then you have to set up queue with pipe for
256 kbit/s. In this case pipe will force max. total bandwidth and
queue will enforce policy to reduce bandwidth for each client.
For examle if you will have 12 clients each of them can transfer data
with speed up to 64kbit/s alone. But if all clients will transfer data
simultaneously they got, for example, 32kbit/s, if you set equal
priority for each client. And if you set them different priority
some clients can have guaranted 64 and some clients will have
less guaranted speed ( say 28 or less kbit/s ). Read man page for ipfw
for more explanation of traffic shaping.

And you need to set net.inet.ip.fw.one_pass to 0 in order to
walk through several pipes but not just one.

> 
> ipfw add pipe 1 all from any to any via tun0
> ipfw add pipe 7 all from any to any via tun0
> ...
> ...
> ipfw add pipe 6 all from any to any via tun5
> ipfw add pipe 7 all from any to any via tun5
> 
> (Each client has a tunnel)
> 
> And what happens is that packets only go to the first rule
> and everyone have 64k but they don't share one 256k/s channel
> 
> Is there a way doing this without using sysctl variable
> net.inet.ip.fw.one_pass
>  ?
> 
> thanks
> 
> P.S. I'll be glad if someone responds as quick as possible.
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-isp" in the body of the message

-- 
       Sincerely yours,
                         Artyom V. Viklenko.
======================================================
System Administrator        artem@mipk-kspu.kharkov.ua
------------------------------------------------------
IIAT NTU "KhPI" 21, Frunze Str., Kharkov Ukraine 61002
Phone: +380 (572) 400026        Fax: +380 (572) 474062
======================================================

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?3D195621.BF8BD874>