Results 1 to 5 of 5

Thread: Download speed throttling - ingress

  1. #1
    Join Date
    May 2008
    Location
    London
    Beans
    330
    Distro
    Ubuntu 10.04 Lucid Lynx

    Download speed throttling - ingress

    Hi,

    I'm having trouble throttling my download speeds. I am trying to set up a different throttle for the LAN and a different throttle for general internet use.

    Here is the code I'm using.

    /sbin/iptables -t mangle -I PREROUTING 1 -m iprange --src-range 192.168.0.0-192.168.100.100 -j MARK --set-mark 1
    /sbin/iptables -t mangle -I PREROUTING 2 -m iprange ! --src-range 192.168.0.0-192.168.100.100 -j MARK --set-mark 2

    /sbin/tc qdisc add dev eth0 handle ffff: ingress
    /sbin/tc filter add dev eth0 parent ffff: protocol ip handle 1 fw police rate 90mbit burst 1m drop
    /sbin/tc filter add dev eth0 parent ffff: protocol ip handle 2 fw police rate 1mbit burst 10k drop

    Not sure why this doesn't work. I can do a general throttle using u32 and matching dst ip but I need 2 throttles.

    Thanks

  2. #2
    Join Date
    May 2008
    Location
    London
    Beans
    330
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Download speed throttling - ingress

    Anyone able to help with this please?

  3. #3
    Join Date
    May 2008
    Location
    London
    Beans
    330
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Download speed throttling - ingress

    I'm guessing thats a not then

  4. #4
    Join Date
    Jun 2008
    Beans
    5

    Re: Download speed throttling - ingress

    Have you checked out trickle?
    Code:
    sudo apt-get install trickle
    Also check out:
    http://www.mastershaper.org
    and
    http://lartc.org/

    Hope you find a solution.

  5. #5
    Join Date
    May 2008
    Location
    London
    Beans
    330
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: Download speed throttling - ingress

    Hi,

    Thanks for the suggestions. Trickle looks quite good, is it possible for it to limit by IP though as I would like 2 separate download limits, one for the local network and one for the external network.

    I have had a read through lartc.org and thats where I got the code in my first post from. I have something similar which does uploads very well.

    MasterShaper looks interesting, unfortunately I don't know how to patch a kernel and have never ventured there.

    Are there any good guides that you could point me to?

    Also does the code in my first post look reasonable or is it flowed? I put it together from examples and documentation on lartc.org.

    many thanks

Tags for this Thread

Bookmarks

Posting Permissions

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