Linux Netfilter discussions
 help / color / mirror / Atom feed
From: Thanasis <thanasis@asyr.hopto.org>
To: netfilter@vger.kernel.org
Subject: traffic shaping between two LANs and one ppp0 default gw
Date: Thu, 10 Jun 2010 05:20:11 +0300	[thread overview]
Message-ID: <4C104BDB.7060706@asyr.hopto.org> (raw)

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) ?


             reply	other threads:[~2010-06-10  2:20 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-06-10  2:20 Thanasis [this message]
2010-06-12 14:36 ` traffic shaping between two LANs and one ppp0 default gw Michele Petrazzo - Unipex
2010-06-12 15:15   ` Thanasis
2010-06-12 15:23     ` Michele Petrazzo - Unipex
2010-06-12 15:49       ` Thanasis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4C104BDB.7060706@asyr.hopto.org \
    --to=thanasis@asyr.hopto.org \
    --cc=netfilter@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox