All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kim Lundgren kim@dataplus.se
To: lartc@vger.kernel.org
Subject: [LARTC] Bandwidth limiting a MASQed network.
Date: Thu, 01 Mar 2001 15:37:26 +0000	[thread overview]
Message-ID: <marc-lartc-98373940417071@msgid-missing> (raw)

<PRE>Hi!

I just recently entered the wonderful world of the so called &quot;advanced
routing&quot; and decided to try and limit the bandwidth of a MASQed network
here and ended up in trouble :(.

The setup is (as far as I can tell) pretty straightforward. eth0 is
connected to the &quot;real&quot; network with a proper IP, and eth2 is 192.168.10.x
(the MASQed network). All of it is basicly right out of the advanced
routing howto.

My problem is that it only shapes traffic going into the MASQed network
and not from it. I've been trying to figure out why, and the only reason I
can think of is that once the traffic passes through eth0 going out to the
public network the packets are no longer tagged with a 192.168.10.x ip,
but rather the public address. Is this the case?

(The MASQ-box I'm using actually has 6 NICs, but I'm only using two of
them right now, which explains why only eth0 and eth2 are in the example).

Here's the setup as of right now:

---

tc qdisc add dev eth0 root handle 10: cbq bandwidth 100Mbit avpkt 1000
tc qdisc add dev eth2 root handle 20: cbq bandwidth 100Mbit avpkt 1000

tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100Mbit \
rate 100Mbit allot 1514 weight 10Mbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth2 parent 20:0 classid 20:1 cbq bandwidth 100Mbit \
rate 100Mbit allot 1514 weight 10Mbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 10:1 classid 10:100 cbq bandwidth \
100Mbit rate 2Mbit allot 1514 weight 200Kbit prio 5 maxburst 20 \
avpkt 1000 bounded

tc class add dev eth2 parent 20:1 classid 20:100 cbq bandwidth \
100Mbit rate 2Mbit allot 1514 weight 200Kbit prio 5 maxburst 20 \
avpkt 1000 bounded

tc qdisc add dev eth0 parent 10:100 sfq quantum 1514b perturb 15
tc qdisc add dev eth2 parent 20:100 sfq quantum 1514b perturb 15

tc filter add dev eth0 parent 10:0 protocol ip prio 100 u32 match ip src \
192.168.10.0/24 flowid 10:100

tc filter add dev eth2 parent 20:0 protocol ip prio 100 u32 match ip dst \
192.168.10.0/24 flowid 20:100

---

I hope someone can help! :)

// Kim Lundgren



</PRE>

             reply	other threads:[~2001-03-01 15:37 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-01 15:37 Kim [this message]
2001-03-01 19:24 ` [LARTC] Bandwidth limiting a MASQed network Christian
2001-03-01 21:51 ` Kim
2001-03-01 21:59 ` David
2001-03-01 22:01 ` Christian
2001-03-01 22:05 ` Kim

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=marc-lartc-98373940417071@msgid-missing \
    --to=lartc@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 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.