Results 1 to 3 of 3

Thread: Linux: HowTo Limit Outbound and Inbould traffic in single interface

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Linux: HowTo Limit Outbound and Inbould traffic in single interface

    use TC for limit bandwidth eth1 only
    outbound 1Mb
    inbound 512Kb


    i try to

    tc qdisc del dev eth0 root
    tc qdisc del dev eth1 root

    tc qdisc add dev eth0 root handle 1: cbq bandwidth 1000Mbit avpkt 1000 cell 8 mpu 64
    tc qdisc add dev eth1 root handle 1: cbq bandwidth 1000Mbit avpkt 1000 cell 8 mpu 64


    tc class change dev eth0 root cbq weight 1000Mbit allot 1314
    tc class change dev eth1 root cbq weight 1000Mbit allot 1314


    tc class add dev eth1 parent 1: classid 1:249 cbq bandwidth 1000Mbit rate 1.2Mbit weight 1 prio 5 allot 1314 cell 8 maxburst 21 avpkt 1000 bounded isolated
    tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 1.1.1.10 classid 1:249


    and limit download working.
    and i'm want to limit upload in single interface (eth1)

  2. #2
    Is that all you got? rockdalinux's Avatar
    Join Date
    May 2005
    Location
    Planet Vegeta
    Posts
    987
    Thanks
    27
    Thanked 71 Times in 62 Posts
    Rep Power
    20

    Default

    I have ADSL+ ppp0 as follows to limit upload speed 128kbit and rule is as follows using TBF

    Code:
    tc qdisc add dev ppp0 root tbf rate 120kbit latency 50ms burst 1540
    Rocky Jr.
    What's wrong? I hope I am not making you uncomfortable...

    Never send a boy to do a mans job.

  3. #3
    Junior Member zzlyzq's Avatar
    Join Date
    Mar 2013
    Posts
    11
    Thanks
    0
    Thanked 1 Time in 1 Post
    Rep Power
    0

    Default replace tc with iptables

    Quote Originally Posted by slackman View Post
    use TC for limit bandwidth eth1 only
    outbound 1Mb
    inbound 512Kb


    i try to

    tc qdisc del dev eth0 root
    tc qdisc del dev eth1 root

    tc qdisc add dev eth0 root handle 1: cbq bandwidth 1000Mbit avpkt 1000 cell 8 mpu 64
    tc qdisc add dev eth1 root handle 1: cbq bandwidth 1000Mbit avpkt 1000 cell 8 mpu 64


    tc class change dev eth0 root cbq weight 1000Mbit allot 1314
    tc class change dev eth1 root cbq weight 1000Mbit allot 1314


    tc class add dev eth1 parent 1: classid 1:249 cbq bandwidth 1000Mbit rate 1.2Mbit weight 1 prio 5 allot 1314 cell 8 maxburst 21 avpkt 1000 bounded isolated
    tc filter add dev eth1 parent 1:0 protocol ip prio 100 u32 match ip dst 1.1.1.10 classid 1:249


    and limit download working.
    and i'm want to limit upload in single interface (eth1)
    # limit source ip 1.1.1.6 outbound limit to 2000kbps and burst 1000kbps
    iptables -A FORWARD -s 1.1.1.6/32 -m limit --limit 2000/sec --limit-burst 1000 -j ACCEPT
    iptables -A FORWARD -s 1.1.1.6/32 -j DROP

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. How to route specific port traffic over tun0 whilst all other traffic uses eth0?
    By randombloke in forum Networking, Firewalls and Security
    Replies: 0
    Last Post: 8th September 2013, 08:57 AM
  2. Multiple Gateways on Single bonded interface
    By gopihere in forum Ubuntu / Debian
    Replies: 2
    Last Post: 12th July 2013, 02:12 PM
  3. Multicast Routering from IP interface to WIFI interface
    By tureface in forum Ubuntu / Debian
    Replies: 0
    Last Post: 17th April 2013, 07:59 PM
  4. HowTo Boot Multiple Backtrack, Arudius, RIP Linux on a Single USB device
    By rinkujames in forum CentOS / RHEL / Fedora
    Replies: 4
    Last Post: 6th July 2011, 10:31 AM
  5. Howto boot freebsd single user mode
    By raj in forum All about FreeBSD/OpenBSD/NetBSD
    Replies: 1
    Last Post: 12th December 2006, 02:40 PM

Posting Permissions

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