[LARTC] Bandwidth Nazi'ing revisited

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



After about a week or more of enjoying a sensible amount of bandwidth on
our
network (after limiting the rate/ceiling of one particular ip on our
network)
I noticed that the rules I had been given weren't infallable, something
was
wrong. For some reason our internal samba traffic (eth1) was also
limited to the rate/ceiling
of my bandwidth throttling script [see below]

It does indeed limit his bandwidth to a max of 60kbps/sec (which is
wonderful)  but somehow
its also limiting our samba traffic to 60kbp/sec also (we only notice it
in one direction
also (from our server 192.168.0.1 (eth1 interface ip) -> any of our ip's
192.168.0.x).
Any idea why it seems to be applying this rule to everyones traffic as
it leaves the server on eth1 ? 
We seem to have full internet download bandwidth (which would be traffic
on eth0(about 300k/s) but 
no internal traffic only passing thru eth1. 



#!/bin/bash

/sbin/tc qdisc del dev eth0 root
/sbin/tc qdisc del dev eth1 root

/sbin/tc qdisc add dev eth1 root handle 1: htb default 10
/sbin/tc class add dev eth1 parent 1: classid 1:1 htb rate 100Mbps ceil
100Mbps burst 2k
/sbin/tc class add dev eth1 parent 1:1 classid 1:10 htb rate 90Mbps ceil
100Mbps burst 2k prio 0
/sbin/tc class add dev eth1 parent 1:1 classid 1:11 htb rate 60kbps ceil
60kbps burst 2k prio 7
/sbin/tc filter add dev eth1 parent 1:0 protocol ip prio 1 u32 match ip
dst 192.168.0.65 classid 1:11

/sbin/tc qdisc add dev eth0 root handle 1: htb default 10
/sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 10Mbps ceil
10Mbps burst 2k
/sbin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 9.9Mbps
ceil 10Mbps burst 2k prio 0
/sbin/tc class add dev eth0 parent 1:1 classid 1:11 htb rate 60kbps ceil
60kbps burst 2k prio 7
/sbin/tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match ip
src 192.168.0.65 classid 1:11





[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux