>10Mbit on HTB
I want to try to shape 20-30Mbps traffic using HTB. It's possible? Anyone already try this?
Thanks.
Below is the script:
tc qdisc del dev eth2 root
tc qdisc add dev eth2 root handle 1 htb default 10 r2q 100
tc class add dev eth2 parent 1: classid 1:2 htb rate 100Mbit
tc class add dev eth2 parent 1:2 classid 1:10 htb rate 20Mbit ceil 20Mbit
tc filter add dev eth2 parent 1:0 protocol ip prio 100 u32 match ip dst 202.xx.xxx.xx/26 classid 1:10
When i try to shape 20Mbit, there's dropped packet but i see the bandwidth not shaped to 20Mbit. But when shape to 10Mbit, i see the bandwidth down to 13Mbit.
Any comment with this?
Thanks.
Quoted 3 lines · Kristiadi Himawan
I want to try to shape 20-30Mbps traffic using HTB. It's possible? Anyone already try this?
Very well possible, and you don't need great hardware for this, if you don't have a rather complex classification scenario.
Just for the record, in the middle of some network performance test for some sort of appliance I capped outgoing speed to 25 Mbps on my PIII 600 MHz with a 3Com 100 Mbps card, and the box barely spends 1-2 % of CPU transmitting at "full" speed (full = 25 Mbps).
Hope it helps.
Signature · 5 lines
Jose Luis Domingo Lopez Linux Registered User #189436 Debian Linux Sid (Linux 2.6.0-test6-mm4-lirc) _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 3 lines · Kristiadi Himawan
Below is the script:
[snipped]
The script seems correct, and very similar to what I use, except I don't even need to set up a "filter" to direct traffic, because in my tests I just need to limit the output to some speed.
Quoted 3 lines
When i try to shape 20Mbit, there's dropped packet but i see the bandwidth not shaped to 20Mbit. But when shape to 10Mbit, i see the bandwidth down to 13Mbit.
Some time ago there was a report from someone who tried HTB in 2.5.x kernels and saw a strange behaviour. For details, check:
http://bugme.osdl.org/show_bug.cgi?ide7
In short, it seems bandwidth limiting behaves strange for different outgoing packet sizes.
Regards.
Signature · 5 lines
Jose Luis Domingo Lopez Linux Registered User #189436 Debian Linux Sid (Linux 2.6.0-test6-mm4-lirc) _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 2 lines · Kristiadi Himawan
I want to try to shape 20-30Mbps traffic using HTB. It's possible? Anyone already try this?
Yes. It's working very good.
You may want to use hashes if you have a lot of filters.
Quoted 3 lines
Thanks.
---
Catalin(ux) BOIE
[email protected]
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines · Catalin BOIE
Quoted 2 lines · Kristiadi Himawan
I want to try to shape 20-30Mbps traffic using HTB. It's possible? Anyone already try this?
Yes. It's working very good.
You may want to use hashes if you have a lot of filters.Quoted 1 line
Thanks.
Mine also,
Here goes the result:
### eth1: traffic classes
class htb 1:10 root leaf 10: prio 0 rate 20Mbit ceil 20Mbit burst 27810b cburst 27810b
Sent 290896540 bytes 192377 pkts (dropped 0, overlimits 0) rate 2545587bps 1683pps backlog 4p
lended: 192373 borrowed: 0 giants: 0
tokens: -8887 ctokens: -8887
Regards,
Rio Martin.
--
NOC ITENAS-net
www.itenas.ac.id
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Oh ok, it's working now. The script is fine. My test tool isn't accurate.
Now i have test with iperf and get accurate result.
Other question ...:)
which ingress qdisc that accurate like htb?
Thnx
----- Original Message -----
From: "Rio Martin" <[email protected]>
To: <[email protected]>
Sent: Monday, October 13, 2003 1:07 PM
Subject: Re: [LARTC] >10Mbit on HTB
Quoted 19 lines · Catalin BOIE
Quoted 6 lines · Kristiadi Himawan
Quoted 2 lines
I want to try to shape 20-30Mbps traffic using HTB. It's possible? Anyone already try this?
Yes. It's working very good.
You may want to use hashes if you have a lot of filters.Quoted 1 line
Thanks.
Mine also,
Here goes the result:### eth1: traffic classes
class htb 1:10 root leaf 10: prio 0 rate 20Mbit ceil 20Mbit burst 27810b cburst 27810b
Sent 290896540 bytes 192377 pkts (dropped 0, overlimits 0) rate 2545587bps 1683pps backlog 4p
lended: 192373 borrowed: 0 giants: 0
tokens: -8887 ctokens: -8887
Quoted 9 lines
Regards,
Rio Martin.
--
NOC ITENAS-net
www.itenas.ac.id
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines · Kristiadi Himawan
Oh ok, it's working now. The script is fine. My test tool isn't accurate.
Now i have test with iperf and get accurate result.Other question ...:)
which ingress qdisc that accurate like htb?
None. Htb is an egress qdisc so it shapes outgoing traffic. An ingress qdisc handles the incoming packets. And there is no queue for the incoming packets, so you can't use htb. You can use filteres + policers to rate limit traffic. Or you may take a look at the imq device. This is a virtual device. You can redirect all incoming packets to it and use htb on the imq device.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines · Stef Coene
Quoted 5 lines · Kristiadi Himawan
Oh ok, it's working now. The script is fine. My test tool isn't accurate.
Now i have test with iperf and get accurate result. Other question ...:)
which ingress qdisc that accurate like htb?
Quoted 6 lines
None. Htb is an egress qdisc so it shapes outgoing traffic. An ingress qdisc handles the incoming packets. And there is no queue for the incoming packets, so you can't use htb. You can use filteres + policers to rate limit traffic. Or you may take a look at the imq device. This is a virtual device. You can redirect all incoming packets to it and use htb on the imq device.
Hi Stef,
What do you mean by ' no queue for the incoming packets, so you can't use HTB'? For now i am not applying IMQ for the ingress, but using packet mangling under iptables to handle both incoming packets from internet and outgoing packets to internet. Is this not right? give me your opinion please, as far as i can see, there were no troubles using packet mangling to handle those situation.
Regards,
Rio Martin.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 7 lines · Rio Martin
Quoted 6 lines
None. Htb is an egress qdisc so it shapes outgoing traffic. An ingress qdisc handles the incoming packets. And there is no queue for the incoming packets, so you can't use htb. You can use filteres + policers to rate limit traffic. Or you may take a look at the imq device. This is a virtual device. You can redirect all incoming packets to it and use htb on the imq device.
Quoted 7 lines
Hi Stef,
What do you mean by ' no queue for the incoming packets, so you can't use HTB'? For now i am not applying IMQ for the ingress, but using packet mangling under iptables to handle both incoming packets from internet and outgoing packets to internet. Is this not right? give me your opinion please, as far as i can see, there were no troubles using packet mangling to handle those situation.
What do you mean with packet mangling?
And it's not because there is no queue for incoming packets that you can't do anything with time. The filter + policer setup can rate limit incoming packets. Iptables can also do rate limiting.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 15 lines · Stef Coene
Quoted 6 lines · Rio Martin
Quoted 6 lines
None. Htb is an egress qdisc so it shapes outgoing traffic. An ingress qdisc handles the incoming packets. And there is no queue for the incoming packets, so you can't use htb. You can use filteres + policers to rate limit traffic. Or you may take a look at the imq device. This is a virtual device. You can redirect all incoming packets to it and use htb on the imq device.
Quoted 7 lines
Hi Stef,
What do you mean by ' no queue for the incoming packets, so you can't use HTB'? For now i am not applying IMQ for the ingress, but using packet mangling under iptables to handle both incoming packets from internet and outgoing packets to internet. Is this not right? give me your opinion please, as far as i can see, there were no troubles using packet mangling to handle those situation.
Quoted 4 lines
What do you mean with packet mangling?
And it's not because there is no queue for incoming packets that you can't do anything with time. The filter + policer setup can rate limit incoming packets. Iptables can also do rate limiting.
iptables -t mangle -A bla bla bla ..
i classified all the traffic both for incoming and outgoing to mangle table. correct me if this is wrong stef ..
Regards,
Rio Martin.
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 17 lines · Rio Martin
Quoted 16 lines · Stef Coene
Quoted 14 lines · Rio Martin
Quoted 6 lines
None. Htb is an egress qdisc so it shapes outgoing traffic. An ingress qdisc handles the incoming packets. And there is no queue for the incoming packets, so you can't use htb. You can use filteres
+ policers to rate limit traffic. Or you may take a look at the imq device. This is a virtual device. You can redirect all incoming packets to it and use htb on the imq device.Hi Stef,
What do you mean by ' no queue for the incoming packets, so you can't use HTB'? For now i am not applying IMQ for the ingress, but using packet mangling under iptables to handle both incoming packets from internet and outgoing packets to internet. Is this not right? give me your opinion please, as far as i can see, there were no troubles using packet mangling to handle those situation.
Quoted 8 lines
Quoted 4 lines
What do you mean with packet mangling?
And it's not because there is no queue for incoming packets that you can't do anything with time. The filter + policer setup can rate limit incoming packets. Iptables can also do rate limiting.iptables -t mangle -A bla bla bla ..
i classified all the traffic both for incoming and outgoing to mangle table. correct me if this is wrong stef ..
But what has this to do with traffic shaping ???? You can mangle incoming and outgoing packets with iptables, but tc kicks in just before the packets are placed on the wire. So after all iptables stuff and only for the outgoing packets.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/