How to deal with burstable bandwidth from ISP ? Was: Re: [LARTC] Over value in CEIL parameter..
Quoted 3 lines · you
Quoted 1 line
tc qdisc add dev eth0 root handle 1 htb default 0 r2q 10
Bad idea. Class 0 is a special one and I dont't think you want unclassified traffic go out at full speed ....
That because i dont want to shape my ssh connection & other connection from my pc to bandwidth.limiter (:
I am still learning about fw mark to shape both incoming and outgoing bandwidth from my network.
Please let me know how to shape incoming rate with Iptables fw mark I ve done with the outgoing bandwidth but i still dont understand how to mark incoming bandwidth from my ISP.
example:
/usr/sbin/iptables -t mangle -A POSTROUTING -s 192.168.1.0/24 -j MARK --set-mark 100
this is for upgoing connection from my local network.
tc class add dev eth0 parent 1: classid 1:100 htb rate 40Kbit ceil 40Kbit tc qdisc add dev eth0 parent 1:100 handle 100 sfq perturb 10 quantum 1500 tc filter add dev eth0 parent 1:0 protocol ip prio 200 handle 100 fw classid 1:100
Quoted 4 lines
Quoted 2 lines
tc class add dev eth0 parent 1: classid 1:10 htb rate 40Kbit ceil 40Kbit burst 1 cburst 1
Argh. Remove the burst and cburst parameters so htb can calculate the smalles one for you. I think that's your problem.
if i remove those parameters, it will exceed about 4 - 5 Kbit if i use those parameters, it only exceed about 40-80 bit (:
About my ISP,
Downstream connection is burstable. I get CIR 512Kbps burstable to 1024Kbps Please advise how to deal this situation Stef,
Thanks.
Regards,
Rio Martin.
Signature · 10 lines
To A Quick Young Fox: Why jog exquisite bulk, fond crazy vamp, Daft buxom jonquil, zephyr's gawky vice? Guy fed by work, quiz Jove's xanthic lamp -- Zow! Qualms by deja vu gyp fox-kin thrice. -- Lazy Dog _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 8 lines · Rio Martin.
Quoted 4 lines · you
Quoted 1 line
tc qdisc add dev eth0 root handle 1 htb default 0 r2q 10
Bad idea. Class 0 is a special one and I dont't think you want unclassified traffic go out at full speed ....
That because i dont want to shape my ssh connection & other connection from my pc to bandwidth.limiter (:
Then it's better to create a separate class for it and put your ssh traffic in it.
Quoted 2 lines
I am still learning about fw mark to shape both incoming and outgoing bandwidth from my network.
Incoming traffic can be tricky. You need the imq device or a dedicated shaper for it so you can shape on 2 nic's.
Quoted 5 lines
Please let me know how to shape incoming rate with Iptables fw mark I ve done with the outgoing bandwidth but i still dont understand how to mark incoming bandwidth from my ISP.
example:
Quoted 8 lines
/usr/sbin/iptables-t mangle -A POSTROUTING -s 192.168.1.0/24 -j MARK --set-mark 100
this is for upgoing connection from my local network.tc class add dev eth0 parent 1: classid 1:100 htb rate 40Kbit ceil 40Kbit tc qdisc add dev eth0 parent 1:100 handle 100 sfq perturb 10 quantum 1500 tc filter add dev eth0 parent 1:0 protocol ip prio 200 handle 100 fw classid 1:100
The problem is not marking with iptables, but shaping. If you add something to nic eth0, you shape outgoing packets for that nic. You can not do this for incoming packets. What you can do is use imq. This is a virutal device and you can redirect incoming packets to it. And you can add a htb qdisc to it .... Or you have to use filters + policers, but that's not powerful.
Quoted 5 lines
Quoted 2 lines
Argh. Remove the burst and cburst parameters so htb can calculate the smalles one for you. I think that's your problem.
if i remove those parameters, it will exceed about 4 - 5 Kbit if i use those parameters, it only exceed about 40-80 bit (:
The exceed is normal. Traffic is bursty and you can not expect to shape it perfectly.
Quoted 3 lines
About my ISP,
Downstream connection is burstable. I get CIR 512Kbps burstable to 1024Kbps Please advise how to deal this situation Stef,
Then you have a problem. You can not configure this with htb because you don't know the ISP bandwidth. However, you can create a setup for 1024 kbps. You will loose some precision because you are not the bottleneck anymore, but you will able to shape your link.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/