All of lore.kernel.org
 help / color / mirror / Atom feed
* traffic shaping between two LANs and one ppp0 default gw
@ 2010-06-10  2:20 Thanasis
  2010-06-12 14:36 ` Michele Petrazzo - Unipex
  0 siblings, 1 reply; 5+ messages in thread
From: Thanasis @ 2010-06-10  2:20 UTC (permalink / raw)
  To: netfilter

Maybe this is not directly related to netfilter, but I believe that
someone may be able to help in this simple scenario:
A router (linux) has 3 NICs: eth1 (ppp0) connects to WAN via ADSL modem
~2Mbps/700Kbps up/down.
The other 2 NICs connect to local LANs with private IPs: eth0 to
192.168.0.0/24, and eth2 to 192.168.10.0/24.
The router provides internet connectivity to both LANs' PCs by NATing
(the one public IP).
We would like to divide the incoming and outgoing bandwidth equally
between those two LANs, ie:
PCs from the two LANs should not be able to upload more than 300Kbps
(total per LAN) via either eth2 or eth0, so as not to flood the outgoing
ppp0 interface.
On the other hand, routing packets between the 2 LANs (from eth2 to eth0
and vice versa) should not be restricted, ie should be at 100Mbps.
How would this be best and simplest implemented by using iproute2 (tc) ?


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: traffic shaping between two LANs and one ppp0 default gw
  2010-06-10  2:20 traffic shaping between two LANs and one ppp0 default gw Thanasis
@ 2010-06-12 14:36 ` Michele Petrazzo - Unipex
  2010-06-12 15:15   ` Thanasis
  0 siblings, 1 reply; 5+ messages in thread
From: Michele Petrazzo - Unipex @ 2010-06-12 14:36 UTC (permalink / raw)
  To: Thanasis; +Cc: netfilter

Thanasis wrote:
> We would like to divide the incoming and outgoing bandwidth equally 
> between those two LANs, ie: On the other hand, routing packets
> between the 2 LANs (from eth2 to eth0 and vice versa) should not be
> restricted, ie should be at 100Mbps. How would this be best and
> simplest implemented by using iproute2 (tc) ?
> 


tc + htb | cbq | another handful of queues are what you are looking for
and google for that (also for larc)

P.s. As said in all the howtos that you can find, you can limit *only*
upload speed (unless you use some trick and imq), so in you environment
will be near impossible to split the download speed between the
different lans since every queue are strictly linked with a interface,
which cannot know each other

Michele

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: traffic shaping between two LANs and one ppp0 default gw
  2010-06-12 14:36 ` Michele Petrazzo - Unipex
@ 2010-06-12 15:15   ` Thanasis
  2010-06-12 15:23     ` Michele Petrazzo - Unipex
  0 siblings, 1 reply; 5+ messages in thread
From: Thanasis @ 2010-06-12 15:15 UTC (permalink / raw)
  To: netfilter

on 06/12/2010 05:36 PM Michele Petrazzo - Unipex wrote the following:
> tc + htb | cbq | another handful of queues are what you are looking
> for and google for that (also for larc)
> P.s. As said in all the howtos that you can find, you can limit *only*
> upload speed (unless you use some trick and imq), so in you environment
> will be near impossible to split the download speed between the
> different lans since every queue are strictly linked with a interface,
> which cannot know each other
Thanks !
I read that imq is being replaced by ifb :
(already in kernel: Device drivers -> Network device support ->
Intermediate Functional Block support ).
http://www.linuxfoundation.org/collaborate/workgroups/networking/ifb

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: traffic shaping between two LANs and one ppp0 default gw
  2010-06-12 15:15   ` Thanasis
@ 2010-06-12 15:23     ` Michele Petrazzo - Unipex
  2010-06-12 15:49       ` Thanasis
  0 siblings, 1 reply; 5+ messages in thread
From: Michele Petrazzo - Unipex @ 2010-06-12 15:23 UTC (permalink / raw)
  To: Thanasis; +Cc: netfilter

Thanasis wrote:
> I read that imq is being replaced by ifb :
> (already in kernel: Device drivers -> Network device support ->
> Intermediate Functional Block support ).
> http://www.linuxfoundation.org/collaborate/workgroups/networking/ifb

Opss... Sorry for the wrong information!

P.s. If you are looking for a very simple and quickly setup, you can
also look for shorewall that can also "talk" with ifb
(www.shorewall.net/traffic_shaping.htm)


Michele

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: traffic shaping between two LANs and one ppp0 default gw
  2010-06-12 15:23     ` Michele Petrazzo - Unipex
@ 2010-06-12 15:49       ` Thanasis
  0 siblings, 0 replies; 5+ messages in thread
From: Thanasis @ 2010-06-12 15:49 UTC (permalink / raw)
  To: netfilter

on 06/12/2010 06:23 PM Michele Petrazzo - Unipex wrote the following:
> Thanasis wrote:
>> I read that imq is being replaced by ifb :
>> (already in kernel: Device drivers -> Network device support ->
>> Intermediate Functional Block support ).
>> http://www.linuxfoundation.org/collaborate/workgroups/networking/ifb
>
> Opss... Sorry for the wrong information!
No problem, not so wrong info after-all ;-)
>
> P.s. If you are looking for a very simple and quickly setup, you can
> also look for shorewall that can also "talk" with ifb
> (www.shorewall.net/traffic_shaping.htm)
Interesting !
Thanks !

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2010-06-12 15:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-06-10  2:20 traffic shaping between two LANs and one ppp0 default gw Thanasis
2010-06-12 14:36 ` Michele Petrazzo - Unipex
2010-06-12 15:15   ` Thanasis
2010-06-12 15:23     ` Michele Petrazzo - Unipex
2010-06-12 15:49       ` Thanasis

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.