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: Wed, 02 Apr 2003 20:08:33 +0000	[thread overview]
Message-ID: <marc-lartc-104931417407122@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104848600731119@msgid-missing>

> yes.blew my scripts.
> tc qdisc del dev eth0 root
> tc qdisc add dev eth0 root handle 20: htb default 20
> tc class add dev eth0 parent 20: classid 20:1 htb rate 10240kbps ceil
> 10240kbps tc class add dev eth0 parent 20:1 classid 20:20 htb rate 2048kbps
> ceil 2048kbps tc qdisc add dev eth0 parent 20:20 sfq
> tc class add dev eth0 parent 20:1 classid 20:21 htb rate 2048kbps ceil
> 2048kbps tc qdisc add dev eth0 parent 20:21 sfq
> tc class add dev eth0 parent 20:1 classid 20:22 htb rate 2048kbps ceil
> 2048kbps tc qdisc add dev eth0 parent 20:22 sfq
> tc class add dev eth0 parent 20:1 classid 20:23 htb rate 2048kbps ceil
> 2048kbps tc qdisc add dev eth0 parent 20:23 sfq
> tc class add dev eth0 parent 20:1 classid 20:24 htb rate 2048kbps ceil
> 2048kbps tc qdisc add dev eth0 parent 20:24 sfq
> tc filter add dev eth0 parent 20: protocol ip  handle 1 fw classid  20:20
> tc filter add dev eth0 parent 20: protocol ip  handle 2 fw classid  20:21
> tc filter add dev eth0 parent 20: protocol ip  handle 3 fw classid  20:22
> tc filter add dev eth0 parent 20: protocol ip  handle 4 fw classid  20:23
> tc filter add dev eth0 parent 20: protocol ip  handle 5 fw classid  20:24
>
> iptables -t mangle -A FORWARD -p tcp -o eth0 -s 0/0 --dport 80 -d 0/0 -j
> MARK --set-mark 3 iptables -t mangle -A PREROUTING -p tcp -i eth0 -s 0/0
> --dport 80 -d 0/0 -j MARK --set-mark 3
Your script seems ok to me.

> >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.
>
> when I use iptable -L -v -n -t mangle,I have below infor
> PREROUTING chain:
>  pkts bytes target     prot opt in     out     source              
> destination 305 40889  MARK       tcp  --  eth0   *       0.0.0.0/0        
>    0.0.0.0/0          tcp dpt:80 MARK set 0x3 FORWARD chain:
>  pkts bytes target     prot opt in     out     source              
> destination 0     0    MARK       tcp  --  *      eth0    0.0.0.0/0        
>    0.0.0.0/0          tcp dpt:80 MARK set 0x3
So the packets get marked.

> why not stream through ForWard chain ? beacause this all traffic into
> 20:20(default class)?

I suppose you execute
tc -s -d class show dev eth0
to see the counters increase for the 20:20 class and not for the other class?  
If you didn't execute that command before, can you do so and check the 
counters for the different classes?

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-04-02 20:08 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
2003-04-02  1:31 ` liang jian
2003-04-02 20:08 ` Stef Coene [this message]
2003-04-03  3:10 ` [LARTC] " 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-104931417407122@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.