Wondershaper
Hi !
I´ve been using the wonderful wondershaper from chapter 15.8 of the LARTC Howto for some time. It´s really wonderful.
Actually, I use the version from
http://freshmeat.net/projects/wshaper/?topic_id‡
Now I tried to put some hosts to low priority, and it doesn´t work. The traffic is splitted equally between the noprio and the other hosts. Is this because I use ip masquerading, and all the traffic seems (for the shaper) to come from one host ? The U32 filter and the other setup works correctly, because e.g. ssh traffic on port 23 always has highest priority.
Has anybody an idea how to fix it ?
I think a nice sketch about the order of routing/postrouting and traffic shaping would help me.
Sebastian
-=> Sebastian Bleikamp
-=> EMail: <[email protected]>
-=> Phone: +49-172-6545394
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 4 lines · Sebastian Bleikamp
Hi !
I´ve been using the wonderful wondershaper from chapter 15.8 of the LARTC Howto for some time. It´s really wonderful.
That's exactly why it's called the wondershaper :)
Quoted 11 lines
Actually, I use the version from
http://freshmeat.net/projects/wshaper/?topic_id=87Now I tried to put some hosts to low priority, and it doesn´t work. The traffic is splitted equally between the noprio and the other hosts. Is this because I use ip masquerading, and all the traffic seems (for the shaper) to come from one host ? The U32 filter and the other setup works correctly, because e.g. ssh traffic on port 23 always has highest priority.
Has anybody an idea how to fix it ?
You can use an other filter : fw. This filter can use the iptables/ipchains mark. And you can put this mark when the packets enters the LAN NIC so you can use the ip-address of the incoming packets from your lan, mark this packets and use the mark on the internet NIC.
Quoted 2 lines
I think a nice sketch about the order of routing/postrouting and traffic shaping would help me.
I have one on docum.org, but it needs some updates. It's the one posted some months ago on this list. You can find it under KPTD.
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/
Quoted 5 lines · Stef Coene
Try efsq. It's SFQ (so each "flow" gets an equal chance to send something). But efsq uses only dst/src addres and not dst/src address/port like sfq. Ideal to kill download managers because all traffic form/to the same hosts is considered as one stream.
I have a link on docum.org under FAQ.
I will test it, thnx.
But another question:
I tried your solution via fwmark, and it works. At least when the router
is forwarding. I can slow down hosts on my LAN this way. If i try to
slow the gateway/router down, it fails.
I have added a mark to all outgoing traffic on ppp0, which comes from the router, to the OUTGOING/mangle table. But it doesn´t work this way. But from the sketch on your homepage this should work. I already checked the IPs and devices and they are correct.
Any suggestions ? ;-)
Seb.
-=> Sebastian Bleikamp
-=> EMail: <[email protected]>
-=> Phone: +49-172-6545394
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 15 lines · Sebastian Bleikamp
Quoted 5 lines · Stef Coene
Try efsq. It's SFQ (so each "flow" gets an equal chance to send something). But efsq uses only dst/src addres and not dst/src address/port like sfq. Ideal to kill download managers because all traffic form/to the same hosts is considered as one stream. I have a link on docum.org under FAQ.
I will test it, thnx.
But another question:
I tried your solution via fwmark, and it works. At least when the router
is forwarding. I can slow down hosts on my LAN this way. If i try to
slow the gateway/router down, it fails.
Quoted 4 lines
I have added a mark to all outgoing traffic on ppp0, which comes from the router, to the OUTGOING/mangle table. But it doesn´t work this way. But from the sketch on your homepage this should work. I already checked the IPs and devices and they are correct.
If you list the iptables/ipchains rules, you can check the counters to see if they are incrementing.
And the sketch at my homepage is for from complete. I have to check it out for errors.
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/
I think I've gotten everything up and running but I'm not sure.
How can I tell if wondershaper is running correctly (I just put the command /wondershaper/wshaper in my /etc/rc.local)?
Can anyone recommend a good program to log bandwidth usage?
Thanx
Snuffy2
__________________________________________________
Do you Yahoo!?
Yahoo! News - Today's headlines
http://news.yahoo.com
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 9 lines · Justin Morea
I think I've gotten everything up and running but I'm not sure.
How can I tell if wondershaper is running correctly (I just put the command /wondershaper/wshaper in my
/etc/rc.local)?Can anyone recommend a good program to log bandwidth usage?
iptraf, ethereal, ntop, a quick google search will show some more.
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/
Quoted 1 line · Justin Morea
How can I tell if wondershaper is running correctly
tc qdisc sh dev $dev
tc class sh dev $dev
tc -s -d qdisc show dev $dev
tc -s -d class show dev $dev
Quoted 2 lines
Can anyone recommend a good program to log bandwidth usage?
I would recommend mrtg.
Signature · 6 lines
Salam, Adi Nugroho _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] wondershaper
In reply to Sebastian BleikampHi,
I am newbie to the list. I am using the wondershaper on RH Linux
7.3 machine. wondershaper version is 1.1a. I set it up as upload speed xkbps and download speed y kbps. I needed to setup total speed as x+y kbps but dynamically adjust uplink and download speeds. Is there any way to do it.
thanks,
Sam
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper
In reply to Sebastian BleikampQuoted 6 lines · K Sambaiah
Hi,
I am newbie to the list. I am using the wondershaper on RH Linux
7.3 machine. wondershaper version is 1.1a. I set it up as upload speed xkbps and download speed y kbps. I needed to setup total speed as x+y kbps but dynamically adjust uplink and download speeds. Is there any way to do it.
You can do this with the imq device. But why ??
The imq device is a virtual device and you can redirect traffic to it with iptables. You can do it from any interface you want and for both directions.
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/
Re: [LARTC] wondershaper
In reply to Sebastian BleikampQuoted 9 lines · On Wed, 20 Nov 2002 20:09:23 +0100 Stef Coene <[email protected]> wrote:
Quoted 6 lines · K Sambaiah
Hi,
I am newbie to the list. I am using the wondershaper on RH Linux
7.3 machine. wondershaper version is 1.1a. I set it up as upload speed xkbps and download speed y kbps. I needed to setup total speed as x+y kbps but dynamically adjust uplink and download speeds. Is there any way to do it.You can do this with the imq device. But why ??
Does it not make sense to allocate bandwidth without regard to direction? If bandwidth in one direction is unused, why limit the other direction?
<snip>
Regards,
David
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] wondershaper
In reply to Sebastian BleikampHello!
I want to give port 14567 a high priority/minumum delay because its a onlien game.
I took wondershaper cause its fairly easy to understand. AND i read the HowTo, especially Section 9!!
DOWNLINKx6
UPLINK8
DEV=ppp0
# start filters
# TOS Minimum Delay (ssh, NOT scp) in 1:10:
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip tos 0x10 0xff flowid 1:10Then i added my ports:
-------------------------
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip dport 14567 0xffff flowid 1:10 flowid 1:10
tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
match ip dport 14567 0xffff flowid 1:10 flowid 1:10
--------------------------
I started an upload to see if it worked, but i still had a ping >1000 It didnt really change anything.
The output of wondershaper was fine, no errors came up.
Can anyone give me a hint what i did wrong?
Cheers, Mario
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper
In reply to Sebastian Bleikamp--On Monday, November 25, 2002 12:16 AM +0100 Mario Ohnewald
Quoted 3 lines · <[email protected]> wrote:
I started an upload to see if it worked, but i still had a ping >1000 It didnt really change anything.
The output of wondershaper was fine, no errors came up.
What did "wshaper status" say after the simultaneous game and upload? You should see traffic going into the two desired queues.
What kind of upload, http or ftp? Which ports did it use? Did you put those in the "traffic we hate" list?
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] wondershaper
In reply to Sebastian BleikampHi,
I just installed wondershapper 1.1a on my ipcop firewall box. I have roadrunner cable with a ftp server setup. My download speed is 2mbit (I get 225 KBytes) and my upload is 384kbit (I send at 43 KBytes).
What should the settings in wshaper?
I can ping yahoo.com at 90msec with little traffic.....and at around 220msec with full upload traffic.
Mark
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] wondershaper
In reply to Sebastian BleikampHi,
I have wondershaper running on my firewall/router. It has 2 ethernet cards (eth0 and eth1). Eth1 connects to a cablemodem (2mbit down, 384kbit up) and eth0 connects to a switch. I run a ftp server on a machine connected to the swicth.
I want to be able to keep my ftp server from affecting my browsing speed.
Problem:
I don't see any difference with wondershaper running. I have tried all different speeds and both eth0 and eth1 in wondershaper.
Am I doing something wrong? I am testing by pinging yahoo.com.
Mark
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper
In reply to Sebastian BleikampHi Mark,
Quoted 9 lines
I have wondershaper running on my firewall/router. It has 2 ethernet cards (eth0 and eth1). Eth1 connects to a cablemodem (2mbit down, 384kbit up) and eth0 connects to a switch. I run a ftp server on a machine connected to the swicth.
I want to be able to keep my ftp server from affecting my browsing speed.Problem:
I don't see any difference with wondershaper running. I have tried all different speeds and both eth0 and eth1 in wondershaper.
You will want to run the wondershaper on eth1.
If you run it on eth0 it will be backwards.
You should be able to drop the speeds down to something like DOWNLINK00
UPLINK00
and see some difference.
Are you using the htb wondershaper or the old cbq one?
Quoted 1 line
Am I doing something wrong? I am testing by pinging yahoo.com.
That's probabaly not the best test, you should probably check with real HTTP requests.
Are you trying to throttle people uploading TO your ftp server (same as you downloads) or downloading FROM your ftp server ? (you uploading)
Regards,
Signature · 11 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damion de Soto - Software Engineer email: [email protected] SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web: http://www.snapgear.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- Free Embedded Linux Distro at http://www.snapgear.org --- _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] wondershaper
In reply to Sebastian BleikampI am using wondershaper with htb to shape my network. I want to limit only outbound ftp traffic (me uploading) from 192.168.1.101.
I am using port 21 for ftp with passive ports 50,000-60,000.
What else do I need to put in the config to do this? Here is my config.
DOWNLINK000
UPLINK40
DEV=eth1
# low priority OUTGOING traffic - you can leave this blank if you want # low priority source netmasks NOPRIOHOSTSRC2.168.1.101
# low priority destination netmasks NOPRIOHOSTDST # low priority source ports NOPRIOPORTSRC # low priority destination ports NOPRIOPORTDST Thanks, Mark
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Re: [LARTC] wondershaper
In reply to Sebastian BleikampMark,
Quoted 4 lines
I am using wondershaper with htb to shape my network. I want to limit only outbound ftp traffic (me uploading) from 192.168.1.101.
I am using port 21 for ftp with passive ports 50,000-60,000.
That's a large range of ports to shape, and other programs might be using them
- that's a problem with passive ftp you can't easily avoid.
Quoted 1 line
What else do I need to put in the config to do this? Here is my config.
You can't match IP and port with the normal wondershaper script.
You also can't match NATed source IP addresses on your egress qdisc, which means any rule you setup for ports 21, 50000-60000 will apply to all machines on your LAN.
What you should probabaly do, is use iptables to mark all outbound traffic from src 192.168.1.101 on port 21, 50000-60000 with TOS 0x08 (Maximum Throughput) and then add another u32 filter into wondershaper
tc filter add dev $DEV parent 1:0 protocol ip prio 11 u32 match ip tos 0x08 0xff flowid 1:30
regards
Signature · 11 lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Damion de Soto - Software Engineer email: [email protected] SnapGear - A CyberGuard Company --- ph: +61 7 3435 2809 | Custom Embedded Solutions fax: +61 7 3891 3630 | and Security Appliances web: http://www.snapgear.com ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ --- Free Embedded Linux Distro at http://www.snapgear.org --- _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/