Find the answer to your Linux question:
Results 1 to 2 of 2
So, I have a lot of pesky users on my network that won't throttle their BitTorrent clients, and I often times find my connection lagged out tremendously because of this. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Linux Newbie SagaciousKJB's Avatar
    Join Date
    Aug 2007
    Location
    Yakima, WA
    Posts
    162

    Bandwidth Allocation


    So, I have a lot of pesky users on my network that won't throttle their BitTorrent clients, and I often times find my connection lagged out tremendously because of this.

    Now, I have setup QoS and traffic shaping with Shorewall 4.0 according to this guide Traffic Shaping/Control and the examples for WonderShaper, as this was what I was using before, but wanted a little bit more configuration to it.

    It works great on preventing lag and everything, but it doesn't allocate bandwidth like I want. Whenever someone tries to download a large file from my webserver, I expect the traffic shaping to slow the bittorrent clients' connections down, or at least allocate more bandwidth for http, but it doesn't work out this way.


    I was hoping that someone could help me understand what I need to do to get the traffic shaping to allocate my bandwidth to my webserver when needed. I'm not really accustomed to the tc program, so I'm using shorewall's built-in traffic shaping as a front-end. These are my tcclasses and tcrules files

    tcclasses

    Code:
    #
    # Shorewall version 4 - Tcclasses File
    #
    # For information about entries in this file, type "man shorewall-tcclasses"
    #
    # See Traffic Shaping/Control for additional information.
    #
    ###############################################################################
    #INTERFACE      MARK    RATE            CEIL            PRIORITY        OPTIONS
    #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
    eth0            1       5*full/10       full            1               tcp-ack,tos-minimize-delay
    eth0            2       3*full/10       9*full/10       2               default
    eth0            3       2*full/10       8*full/10       2
    tcrules

    Code:
    #
    # Shorewall version 4 - Tcrules File
    #
    # For information about entries in this file, type "man shorewall-tcrules"
    #
    # See Traffic Shaping/Control for additional information.
    # For usage in selecting among multiple ISPs, see
    # Shorewall and Multiple Internet Connections
    #
    # See Packet Marking using /etc/shorewall/tcrules for a detailed description of
    # the Netfilter/Shorewall packet marking mechanism.
    ###############################################################################
    #MARK   SOURCE          DEST            PROTO   DEST    SOURCE  USER    TEST    LENGTH  TOS
    #                                               PORT(S) PORT(S)
    #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
    1:F     0.0.0.0/0       0.0.0.0/0       icmp    echo-request
    1:F     0.0.0.0/0       0.0.0.0/0       icmp    echo-reply
    #mark traffic which should have a high bandwidth allocation
    1:F     192.168.0.3     192.168.0.3     all
    #mark traffic which should have a normal bandwidth allocation
    
    #mart traffic which should have a low bandwidth allocation
    3       192.168.2.0/24  192.168.2.0/24  all
    192.168.0.3 is my webserver and 192.168.2.0/24 is the subnet that the pesky BitTorrent clients are on.

  2. #2
    Linux Enthusiast
    Join Date
    Apr 2004
    Location
    UK
    Posts
    678
    From your example

    Code:
    #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
    eth0            1       5*full/10       full            1               tcp-ack,tos-minimize-delay
    eth0            2       3*full/10       9*full/10       2               default
    eth0            3       2*full/10       8*full/10       2
    I'd start by adding your entries before the line marked "#LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE" in both files.

    Let us know how you get on,

    Chris...
    To be good, you must first be bad. "Newbie" is a rank, not a slight.

Posting Permissions

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