All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] How to do ensure bandwith
Date: Mon, 31 Mar 2003 17:22:45 +0000	[thread overview]
Message-ID: <marc-lartc-104913143116101@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104848600731119@msgid-missing>

On Monday 31 March 2003 11:12, liang jian wrote:
> >> Yes ,that is my means :),my english is poor
> >
> >No problem.
> >
> >I have some remarks. Why not let the 4 classes borrow unused bandwidth
> > from each other? So if there is no other traffic then ftp, ftp can get
> > 10Mbps. But as soone as there is some other traffic, the ftp traffic goes
> > down.
> >
> >And if you want 4 isolated classes, why not just creating the 4 classes
> > like this :
> >
> >20:1
> >20:200 20:201 20:210 20:211
> >
> >You have to create the htb (or cbq) classes. FIltering the traffic and
> >placing in the classes is easy (you can filter on ports). Except maybe for
> >the ftp traffic because that uses dynamic ports.
>
> Stef:
> Thanks for your answer me quickly!
> I have others question :)
I have some problems understanding your english.  Can you post your htb and 
iptabels script so I can understand what you did?

> I apologize that it will take time.
> My topological look like this:
> Local:192.168.1.2----------|eth0:192.168.1.1 Linux Box
> eth1:172.16.1.1|------Internet
>
> I have create a default 200
>
>              20:1 (4kbps)
> 200:200 200:201 200:210 200:211
> (1kbps) (1kbps) (1kbps) (1kbps)
>
> I have 10Mbps on the eth1,but I want to test htb,so I do that:
> tc class add dev eth0 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
4 and 1 kbps is __very__ low.  It's too low for htb to get some results.

> 200:201 mark with 7,then
> iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j
> MARK --set-mark 7 
> iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0
> --dport 80 -d 0/0 -j MARK --set-mark 7
>
> why all traffic from default 200 to Internet.(the iptables rules like no
> use)
So all traffic ends up in 200:200 ??
You can check with iptables -L -v -n if your iptables rules are matched.  If 
the iptables rule match, the byte and packet counters will increase.

> ------------------------------------------------
>
> If I use it on eth1 interface iptables rules work!?(though I have default
> class 200 but all traffice from 200:201 to Internet.) other question it
> that:
> In this settings use Local machine 192.168.1.2 download some soft from
> Internet.why it rate overrun 1kbps?
Because 1kbps is too low for htb.  And you have to mark packets in 
POSTROUTING.  Local generated packets don't travel thru forward or 
prerouting.  See kptd on www.docum.org.

> Rules like this:
> tc class add dev eth1 parent 20: classid 20:1 htb rate 4kbps ceil 4kbps
>
> iptables -t mangle -A FORWARD -p tcp -o eth1 -s 0/0 --dport 80 -d 0/0 -j
> MARK --set-mark 7 iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 0/0
> --dport 80 -d 0/0 -j MARK --set-mark 7
>
> tc can only shape outgoing traffic(My settings which is my outgoing
> traffic,eth1 or eth0?) Maybe I mix them I need path kernel with IMQ?
You can indeed only shape outgoing traffic.  Or you need the imq device.  But 
if you shape on eth0 and eth1 you control both directions.  So you don't need 
the imq device.

Stef

-- 

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net

_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

  parent reply	other threads:[~2003-03-31 17:22 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-03-24  6:05 [LARTC] How to do ensure bandwith liang jian
2003-03-24  9:09 ` Stef Coene
2003-03-25  2:18 ` liang jian
2003-03-25 17:23 ` Stef Coene
2003-03-26  5:30 ` liang jian
2003-03-26 19:18 ` Stef Coene
2003-03-31  9:12 ` liang jian
2003-03-31  9:12 ` liang jian
2003-03-31 17:22 ` Stef Coene [this message]
2003-04-02  1:31 ` liang jian
2003-04-02 20:08 ` [LARTC] " Stef Coene
2003-04-03  3:10 ` liang jian

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-104913143116101@msgid-missing \
    --to=stef.coene@docum.org \
    --cc=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.