From: "liang jian" <liang_7902@yahoo.com.cn>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] How to do ensure bandwith
Date: Thu, 03 Apr 2003 03:10:53 +0000 [thread overview]
Message-ID: <marc-lartc-104933956402330@msgid-missing> (raw)
In-Reply-To: <marc-lartc-104848600731119@msgid-missing>
[-- Attachment #1: Type: text/plain, Size: 3080 bytes --]
hi:
Stef and everybody
I use tc with htb more than one month.
This is my Network settings
Local Network 192.168.1.0/24 ---| eth0:192.168.1.1 Linux Box eth1:172.16.1.1 | -- Internet
In order to ensure bandwidth
on eth1 I have create a default 20
20:1 (10Mbps)
20:20 20:21 20:22 20:23 20:24
(20Mbps) (20Mbps) (20Mbps) (20Mbps) (20Mbps)
on eth0 I have create only a default 20
30:1 (10Mbps)
30:20
(10Mbps)
Each class is isolated so it never lends it unused bandwidth to other classes.
And each class is never using unused bandwidth from other classes.
first,eth1 and eth0 with same bandwith,I use eth1 Interface ensure totoal bandwith with 10Mbps. then I part eth1 with fine
qdisc.
My script that:
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 10240kbps ceil 10240kbps
tc qdisc add dev eth0 parent 20:20 sfq
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 30: htb default 20
tc class add dev eth1 parent 30: classid 30:1 htb rate 10240kbps ceil 10240kbps
tc class add dev eth1 parent 30:1 classid 30:20 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth1 parent 30:20 sfq
tc class add dev eth1 parent 30:1 classid 30:21 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth1 parent 30:21 sfq
tc class add dev eth1 parent 30:1 classid 30:22 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth1 parent 30:22 sfq
tc class add dev eth1 parent 30:1 classid 30:23 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth1 parent 30:23 sfq
tc class add dev eth1 parent 30:1 classid 30:24 htb rate 2048kbps ceil 2048kbps
tc qdisc add dev eth1 parent 30:24 sfq
tc filter add dev eth1 parent 30: protocol ip handle 1 fw classid 30:20
tc filter add dev eth1 parent 30: protocol ip handle 2 fw classid 30:21
tc filter add dev eth1 parent 30: protocol ip handle 3 fw classid 30:22
tc filter add dev eth1 parent 30: protocol ip handle 4 fw classid 30:23
tc filter add dev eth1 parent 30: protocol ip handle 5 fw classid 30:24
iptables -t mangle -A FORWARD -p tcp -o eth1 -s 192.168.1.2/32 --dport 80 -d 202.197.240.6/32 -j MARK --set-mark 3
iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 192.168.1.2/32 --dport 80 -d 202.197.240.6/32 -j MARK --set-mark 3
iptables -t mangle -A FORWARD -p tcp -o eth1 -s 192.168.1.2/32 --dport 80 -d 195.27.176.155/32 -j MARK --set-mark 4
iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 192.168.1.2/32 --dport 80 -d 195.27.176.155/32 -j MARK --set-mark 4
iptables -t mangle -A FORWARD -p tcp -o eth1 -s 192.168.1.2/32 --dport 80 -d 218.104.154.19/32 -j MARK --set-mark 5
iptables -t mangle -A PREROUTING -p tcp -i eth1 -s 192.168.1.2/32 --dport 80 -d 218.104.154.19/32 -j MARK --set-mark 5
I think that all traffic must thro eth0,then it will thro eth1 of one qdisc.
If my script is right ,I hope it will help newbie of tc.
If it mistake ,please everyone tell me :)
---------------------------------
Do You Yahoo!?
"雅虎通网络KTV, 随时随地免费卡拉OK~~"
[-- Attachment #2: Type: text/html, Size: 3477 bytes --]
prev parent reply other threads:[~2003-04-03 3:10 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 ` [LARTC] " Stef Coene
2003-04-03 3:10 ` liang jian [this message]
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-104933956402330@msgid-missing \
--to=liang_7902@yahoo.com.cn \
--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.