Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: "Ratel" <ratel@aonet.pl>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] htb problem
Date: Wed, 25 Jun 2003 11:14:17 +0000	[thread overview]
Message-ID: <marc-lartc-105653946712793@msgid-missing> (raw)
In-Reply-To: <marc-lartc-100803866815679@msgid-missing>

Thx a lot for help , I finally managed to rebuild my firewall script,

for people who have same problem as I had, I can say that
the problem lies in propper packet marking (iptables) , sample lines from my
firewall script :

iptables -t mangle -I PREROUTING -i eth0 -p tcp --dport 21 -j
MARK --set-mark 2
iptables -t mangle -I PREROUTING -i eth0 -p tcp --dport 443 -j
MARK --set-mark 3

it's ofcourse not the only way to mark them,
http://www.docum.org/stef.coene/qos/kptd/ is very useful with that.

regards, Ratel <ratel@aonet.pl>


----- Original Message -----
From: "Stef Coene" <stef.coene@docum.org>
To: "Ratel" <ratel@aonet.pl>; <lartc@mailman.ds9a.nl>
Sent: Thursday, June 12, 2003 9:35 PM
Subject: Re: [LARTC] htb problem


> On Thursday 12 June 2003 21:21, Ratel wrote:
> > Hi,
> >
> > I have some interesting problem with htb , I set up root class and
> > sub-classess:
> >
> > $TC qdisc add dev eth0 root handle 1: htb
> > $TC class add dev eth0 parent 1: classid 1:1 htb rate 1990kbit ceil
> > 2000kbit $TC class add dev eth0 parent 1:1 classid 1:10 htb rate 190kbit
> > ceil 200kbit $TC class add dev eth0 parent 1:1 classid 1:11 htb rate
> > 1400kbit ceil 1600kbit
> > $TC class add dev eth0 parent 1:1 classid 1:12 htb rate 1000kbit ceil
> > 1500kbit
> > $TC class add dev eth0 parent 1:1 classid 1:13 htb rate 1000kbit ceil
> > 1500kbit
> > $TC class add dev eth0 parent 1:1 classid 1:14 htb rate 1000kbit ceil
> > 1200kbit
> The sum of the rates of the childs should be <= rate of parent.  In your
case
> 1400 + 1000 + 1000 + 1000 = 4400 and your parent rate is 1990.  It's not
> needed, but I recommend it.
>
> > , filters and queuing disciplines :
> > #filter
> > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 2 fw flowid
> > 1:10 classid 1:10
> > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 3 fw flowid
> > 1:11 classid 1:11
> > $TC filter add dev eth0 protocol ip parent 1:0 prio 2 handle 4 fw flowid
> > 1:12 classid 1:12
> > $TC filter add dev eth0 protocol ip parent 1:0 prio 3 handle 5 fw flowid
> > 1:13 classid 1:13
> > $TC filter add dev eth0 protocol ip parent 1:0 prio 1 handle 6 fw flowid
> > 1:14 classid 1:14
> > (note the packet marking classifier)
> And I also note the different prios.  That's not needed.  Prio determines
the
> order the filters are checked.  In your case it doesn't matter.
>
> > adequate lines from firewall script :
> > [...]
> > # ftp
> > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 21 -m state --state
> > NEW,ESTABLISHED -t mangle -j MARK --set-mark 3
> > # ssh
> > $$IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 22 -m state --state
> > NEW,ESTABLISHED -t mangle -j MARK --set-mark 2
> > # smtp
> > $IPTABLES -A FORWARD -p tcp -s 0/0 -d 0/0 --dport 25 -m state --state
> > NEW,ESTABLISHED -t mangle -j MARK --set-mark 4
> > [...]
> Mhh.  Can you check with iptables -L -v -n that your packets are marked?
And
> can you tell us what's your setup ?  I mean wich nic is connected to the
> internet, what do you want to shape, is this also a firewall?  And try
> marking in the PREROUTING tables.
>
>
> 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/
>


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

  parent reply	other threads:[~2003-06-25 11:14 UTC|newest]

Thread overview: 41+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-12-11  2:46 [LARTC] HTB problem yangrunhua
2001-12-11  9:21 ` bert hubert
2001-12-11  9:34 ` yangrunhua
2001-12-11  9:35 ` yangrunhua
2001-12-11 11:10 ` bert hubert
2001-12-12  5:47 ` yangrunhua
2001-12-12 10:02 ` yangrunhua
2001-12-12 11:40 ` Martin Devera
2001-12-12 13:50 ` bert hubert
2001-12-12 23:48 ` yangrunhua
2001-12-13 10:07 ` bert hubert
2002-06-26  0:22 ` [LARTC] htb problem Omar Armas
2002-06-26  0:32 ` Tomasz Wrona
2002-12-09 18:19 ` [LARTC] HTB Problem lartc
2002-12-09 18:57 ` Stef Coene
2003-01-23 22:47 ` [LARTC] HTB problem Jay Wineinger
2003-01-24  2:15 ` mingching.tiew
2003-01-24  2:39 ` Jay Wineinger
2003-06-12 19:21 ` [LARTC] htb problem Ratel
2003-06-12 19:23 ` Esteban
2003-06-12 19:35 ` Stef Coene
2003-06-12 20:04 ` Morten Isaksen
2003-06-12 20:51 ` Stef Coene
2003-06-12 20:54 ` Stef Coene
2003-06-12 21:15 ` Stef Coene
2003-06-14 21:46 ` terahz
2003-06-15 18:14 ` Stef Coene
2003-06-25 11:14 ` Ratel [this message]
2003-07-24 14:26 ` Delcho
2003-07-28 17:49 ` Stef Coene
2003-09-30 13:44 ` [LARTC] HTB Problem Guilherme Benkenstein
2003-09-30 19:59 ` Stef Coene
2003-12-02 23:08 ` [LARTC] HTB problem Mihai Tanasescu
2003-12-04  5:16 ` Mihai Tanasescu
2003-12-04  7:40 ` Catalin BOIE
  -- strict thread matches above, loose matches on Subject: below --
2004-09-06 21:56 Cow
2004-09-07 11:08 ` zytek
2004-09-07 20:28 ` Cow
2004-09-07 21:16 ` [LARTC] HTB Problem Cow
2004-09-07 21:18 ` [LARTC] HTB problem Cow
2004-09-07 21:53 ` Andreas Klauer

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-105653946712793@msgid-missing \
    --to=ratel@aonet.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox