Page 3 of 9 FirstFirst 12345 ... LastLast
Results 31 to 45 of 128

Thread: Wondershaper QoS discussion

  1. #31
    Join Date
    Apr 2004
    Posts
    69
    A million thanks Styno, I will try this inmediatly and will post later with the results.

  2. #32
    Join Date
    Apr 2004
    Posts
    69

    Thumbs up

    For all the Linux starters like me, I would like to share a nice vi guide. I still find vi very scary but hope that with the help of this guide I can acomplish the basic edition tasks related to Wondershaper.

    http://www.gentoo.org/doc/en/vi-guide.xml

    I hope it helps you too.

  3. #33
    Join Date
    Apr 2004
    Posts
    69

    Post

    Quote Originally Posted by Styno
    A tip: To test/optimize the wshaper you can use the command line in a telnet session:
    1) you can start wondershaper using:
    Code:
    /init/wshaper start "eth1" 1990 190 " " " " "54321" "54321"
    2) Do some speed tests.
    3) Stop wondershaper using the following command:
    Code:
    /init/wshaper stop "eth1"
    4) Goto (1) and change parameters until you'r happy with the speed results.
    ..
    5) Save the best option into the 'post-firewall' script as described in the previous paragraph.

    Now Bob's you uncle m8...
    I have done it, but the results were not what I was expecting. I have upgraded FW, add the speed fix (100full) to post-boot and reconfigured my router again with the security settings and other things from the web interface.

    I have used the exact command line that you wrote for testing Wshaper and I was very sorprised to see that the shaper was affecting ALL the traffic, not only bittorrent (port 54321). I have tested downloading 4 torrents and at the same time downloading from a web server that by itself I know it can fill all my bandwidth (256KB/s down or 2048kbps). I was checking the traffic monitor in taskmanager and saw that with an activated test shape that I was using (1000 100) I was using only little over half of my bandwidth. After stoping Wshaper from telnet inmediatly I could see how my bandwidth was totally used specially by the single HTTP download. This was not exactly the result that I was looking for, Wshaper is not effecting only traffic on port 54321, it is shaping all the traffic together.

    I have doenloaded a shaper program for Windows XP (Netlimiter) and now I am trying with it. Very nice peace of software. Until I don't find a way to shape only Bittorrent on port 54321 I don't think that Wshaper will be useful for me. Or at least that it shapes all traffic but that let HTTP use almost all the channel and hold bittorrent on 1900 170 or something like that.

    Thanks a lot for the help.

  4. #34
    Join Date
    Apr 2004
    Location
    Netherlands
    Posts
    1,308
    The behaviour you describe above is exactly what the default Wondershaper script does. It shapes all traffic and devides bandwith according to the priority of the traffic and the speed parameters.

    I'll quote myself:
    This way:
    - All traffic will get normal priority
    - ICMP and SSH will get high priority (ICMP = ping and a number of other important internet tools)
    - TCP ports given in the script parameters (Bittorrent in your case) will get low priority, this class will never get full bandwidth though. Even if there's no other traffic.
    If the normal priority class (HTTP mostly) requires more bandwith then the low priority class (Bittorrent) will give it. Also, Bittorrent will get 8/10 * 1990 kb/s maximum. Normal priority class will get 9/10 *1990 maximum. When using Wondershaper you will not get the maximum download speed because it reserves speed to be able to get those high priority packets through.

    I suggest you use the '1990 190' parameters. '1000 100' are improper parameters and you should forget the results you got from that test.

    Like I've said before: if you feel you're up to it, you can customize the script to your own needs. I've customized it in order to let the bulk priority class vary, depending on the load, between 3/10 and 9/10 of the max. download speed for example.

    There are a lot of other shaping strategies possible, some of which will provide better results for you, some will not. The Wondershaper script is essentially an example of what traffic shaping can do. But in the end its up to you and your desicion...

    Good luck.
    Last edited by Styno; 07-10-2004 at 08:36.

  5. #35
    Join Date
    Apr 2004
    Location
    frankfurt
    Posts
    84
    @styno or other people who running ws
    can you (or the others) adapt the wiki for the new firmware 1.8.1.7-1, i think there are only changes in file stuctur right?
    for a newbie in ws(that i'm), it would be a big help if there is the new structur in.

    @all
    i've read the whole qos thread and the wiki, but i didn't understand the structur of the script parameters. the only thing i wanted to do is:
    to set up my voip ip adapter (IP adresse: 192.168.1.4 in DMZ) to the high priority mode (most important the upload speed).
    the other traffic (up and download) should get lower priority.
    my connection is adsl (with 786down/128up). firmware on wl500g is 1.8.1.7-1 .

    my file post-firewall:
    Code:
    #!/bin/sh
    /sbin/wshaper start "$1" 700 100
    i know that the setting above is not correct for the setting i wish. but i don't understand the parameters. and if i enter "wshaper status eth1" nothing happend.

    if someone could help me, it would be nice
    thx a lot.

    ps: sry for my english ;-)

    --edit--
    if i enter

    wshaper start "$1" 700 100

    the following appears:
    Code:
    Cannot find device "root"
    Error: Qdisc "1:" is classless.
    Error: Qdisc "1:1" is classless.
    Error: Qdisc "1:1" is classless.
    Error: Qdisc "1:1" is classless.
    Unknown qdisc "1:10", hence option "handle" is unparsable
    Unknown qdisc "1:20", hence option "handle" is unparsable
    Unknown qdisc "1:30", hence option "handle" is unparsable
    Unknown filter "1:0", hence option "protocol" is unparsable
    Unknown filter "1:0", hence option "protocol" is unparsable
    Unknown filter "1:", hence option "protocol" is unparsable
    Unknown filter "1:", hence option "protocol" is unparsable
    Unknown qdisc "ffff:", hence option "ingress" is unparsable
    Unknown filter "ffff:", hence option "protocol" is unparsable
    did i something wrong?

    pls help! ;-)
    Last edited by xlephant; 17-10-2004 at 11:34.
    Athlon XP 2200+ runnig on ECS K7S5A
    512 MB DDR
    160 GB Samsung
    Ati Radeon 9500
    System running under Yoper.v2
    Router: WL500g

  6. #36
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by xlephant
    wshaper start "$1" 700 100

    did i something wrong?

    pls help! ;-)
    To run interactively, you will need to replace $1 with your WAN interface name (eth1 for static/dhcp, ppp0 for pppoe/pptp).
    $1 should be used inside post-firewall only.

  7. #37
    Join Date
    Apr 2004
    Location
    frankfurt
    Posts
    84
    thx oleg,

    do you also know a fast way how i can set up my voip device(192.168.1.4) to the highest priority? and reserve (if its in use) a upload and download speed of 100kb for it.

    i'm not a completly idiot, but it is so difficult to understand.
    Athlon XP 2200+ runnig on ECS K7S5A
    512 MB DDR
    160 GB Samsung
    Ati Radeon 9500
    System running under Yoper.v2
    Router: WL500g

  8. #38
    Join Date
    Jan 2004
    Location
    Lyon (France)
    Posts
    23
    do you also know a fast way how i can set up my voip device(192.168.1.4) to the highest priority? and reserve (if its in use) a upload and download speed of 100kb for it.
    You can put your voice traffic in the low delay queue by adding the following lines in the wshaper script
    tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
    match ip src 192.168.1.4 flowid 1:10


    Best, you can consider creating a new voice class with high priority and put voice traffic into it. You wshaper script will be something like :

    Code:
    # voice class
    tc class add dev $DEV parent 1:1 classid 1:100 htb rate 100kbit \
       burst 6k prio 1
     
    # low delay class
    tc class add dev $DEV parent 1:1 classid 1:10 htb rate ${UPLINK}kbit \
       burst 6k prio 2
    
    # bulk & default class 1:20 - gets slightly less traffic,
    # and a lower priority:
    tc class add dev $DEV parent 1:1 classid 1:20 htb rate $((9*$UPLINK/10))kbit \
       burst 6k prio 3
    
    tc class add dev $DEV parent 1:1 classid 1:30 htb rate $((8*$UPLINK/10))kbit \
       burst 6k prio 3     
    
    # put voice traffic into high priority class
    tc filter add dev $DEV parent 1:0 protocol ip prio 10 u32 \
           match ip src 192.168.1.4 flowid 1:100

  9. #39
    Join Date
    Apr 2004
    Location
    frankfurt
    Posts
    84
    @ark+

    thx a lot i will test it tomorrow.
    good night to all
    Athlon XP 2200+ runnig on ECS K7S5A
    512 MB DDR
    160 GB Samsung
    Ati Radeon 9500
    System running under Yoper.v2
    Router: WL500g

  10. #40

    Q about ingress

    can anybody confirm that ingress actualy work at all?

    i have tested it with options that make sense to my bandwidth and
    default ingress settings from original wshaper

    example #1:
    ### wshaper ###
    ...
    DEV=eth0
    DOWNLINK=460
    tc qdisc add dev $DEV handle ffff: ingress
    tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
    0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1
    ...

    RESULT #1
    in that moment 76kbit/s

    example #2
    ### wshaper ###
    ...
    DEV=eth0
    DOWNLINK=8
    tc qdisc add dev $DEV handle ffff: ingress
    tc filter add dev $DEV parent ffff: protocol ip prio 50 u32 match ip src \
    0.0.0.0/0 police rate ${DOWNLINK}kbit burst 10k drop flowid :1
    ...

    RESULT #2
    in that moment 103kbit/s



    my settings:
    FW: 1.7.5.9-5
    WL500b with WL500g FW
    WAN: eth2
    LAN: eth0
    NAT (so I am actually shaping my UL with ingress)
    shaping dev: eth0

    zox

  11. #41

    Question Can someone check my HTB script?

    #promenne
    MAXDOWN=488 #dowload
    MAXUP=82 #upload
    IF=eth0 #private device
    A=br0 #public device
    TC=/sbin/tc
    IPTABLES=/sbin/iptables

    wshaper start $IF 422 82
    wshaper start $A 422 82

    #DELETE OLD QUEUES
    $TC qdisc del dev $A root
    $TC qdisc del dev $IF root

    $IPTABLES -t mangle -F FORWARD


    #DOWNLOAD

    $TC qdisc add dev $IF root handle 1:0 htb

    $TC class add dev $IF parent 1:0 classid 1:1 htb rate $MAXDOWN
    $TC class add dev $IF parent 1:1 classid 1:11 htb rate 128kbit ceil $MAXDOWN #koma
    $TC class add dev $IF parent 1:1 classid 1:12 htb rate 128kbit ceil $MAXDOWN #michal
    $TC class add dev $IF parent 1:1 classid 1:13 htb rate 128kbit ceil $MAXDOWN #aaada
    $TC class add dev $IF parent 1:1 classid 1:14 htb rate 128kbit ceil $MAXDOWN #viktor

    $TC filter add dev $IF protocol ip parent 1:0 prio 1 handle 1 fw flowid 1:11 #koma
    $TC filter add dev $IF protocol ip parent 1:0 prio 1 handle 2 fw flowid 1:12 #michal
    $TC filter add dev $IF protocol ip parent 1:0 prio 1 handle 3 fw flowid 1:13 #aaada
    $TC filter add dev $IF protocol ip parent 1:0 prio 1 handle 4 fw flowid 1:14 #viktor

    $IPTABLES -t mangle -A FORWARD -i $IF -d 10.0.0.2 -j MARK --set-mark 1 #koma
    $IPTABLES -t mangle -A FORWARD -i $IF -d 10.0.0.3 -j MARK --set-mark 2 #michal
    $IPTABLES -t mangle -A FORWARD -i $IF -d 10.0.0.5 -j MARK --set-mark 3 #aaada
    $IPTABLES -t mangle -A FORWARD -i $IF -d 10.0.0.6 -j MARK --set-mark 4 #viktor



    #UPLOAD

    $TC qdisc add dev $A root handle 1:0 htb

    $TC class add dev $A parent 1:0 classid 1:1 htb rate $MAXUP
    $TC class add dev $A parent 1:1 classid 1:11 htb rate 12kbit ceil $MAXUP prio 1 #koma
    $TC class add dev $A parent 1:1 classid 1:12 htb rate 12kbit ceil $MAXUP prio 1 #michal
    $TC class add dev $A parent 1:1 classid 1:13 htb rate 12kbit ceil $MAXUP prio 1 #aaada
    $TC class add dev $A parent 1:1 classid 1:14 htb rate 12kbit ceil $MAXUP prio 1 #viktor

    $TC filter add dev $A protocol ip parent 1:0 prio 1 handle 11 fw flowid 1:11 #koma
    $TC filter add dev $A protocol ip parent 1:0 prio 1 handle 12 fw flowid 1:12 #michal
    $TC filter add dev $A protocol ip parent 1:0 prio 1 handle 13 fw flowid 1:13 #aaada
    $TC filter add dev $A protocol ip parent 1:0 prio 1 handle 14 fw flowid 1:14 #viktor

    $IPTABLES -t mangle -A FORWARD -i $A -d 10.0.0.2 -j MARK --set-mark 11 #koma
    $IPTABLES -t mangle -A FORWARD -i $A -d 10.0.0.3 -j MARK --set-mark 12 #michal
    $IPTABLES -t mangle -A FORWARD -i $A -d 10.0.0.5 -j MARK --set-mark 13 #aaada
    $IPTABLES -t mangle -A FORWARD -i $A -d 10.0.0.6 -j MARK --set-mark 14 #viktor

    My idea i fair shaping bandwidth between 4 computers i my network, but something is wrong, but this doesnt work :[ Im linux newbie. Thanks for help.

    Koma

  12. #42
    Hi,

    are you sure, that eth0 is privat and the br0 i the public side of 500g?
    In my case (of course, using just a "one line" shaping) is the br0 is the LAN (private) side and eth0 is the INTERNET side ...

    WiZiPoK

  13. #43
    Join Date
    Dec 2003
    Location
    Russian Federation
    Posts
    8,356
    Quote Originally Posted by WiziPok
    Hi,

    are you sure, that eth0 is privat and the br0 i the public side of 500g?
    In my case (of course, using just a "one line" shaping) is the br0 is the LAN (private) side and eth0 is the INTERNET side ...

    WiZiPoK
    This depends on the wl500g model: regular box uses eth1, Deluxe - eth0.

  14. #44
    Hi,
    And what about to try using this part of code:

    Code:
    wshaper start $IF 422 82
    wshaper start $A 82 422
    WiZiPoK

  15. #45
    Quote Originally Posted by WiziPok
    Hi,

    are you sure, that eth0 is privat and the br0 i the public side of 500g?
    In my case (of course, using just a "one line" shaping) is the br0 is the LAN (private) side and eth0 is the INTERNET side ...

    WiZiPoK
    well, i'm sure...

    i don't know what is default eth on newer devices, on mine is eth0 for WAN, but I needed to change eth0 to LAN and eth2 to WAN, because my internet link is provided through wireless, and some of my clients are on LAN.

    zox

Page 3 of 9 FirstFirst 12345 ... LastLast

Similar Threads

  1. WonderShaper/tc IP filtering
    By kolaf in forum WL-500g Q&A
    Replies: 1
    Last Post: 02-08-2005, 15:34
  2. wondershaper howto?
    By rexster in forum WL-500g Q&A
    Replies: 8
    Last Post: 01-05-2005, 14:06
  3. Wondershaper in Post-Firewall
    By britnet in forum WL-500g Q&A
    Replies: 3
    Last Post: 05-03-2005, 12:46
  4. Slow performance of WL-HDD - Discussion
    By Oleg in forum WL-HDD Q&A
    Replies: 20
    Last Post: 21-11-2004, 21:07
  5. Would it be possible to implement wondershaper?
    By Snigel in forum WL-500g Custom Development
    Replies: 25
    Last Post: 26-06-2004, 20:22

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •