[LARTC] Traffic shaping

Linux Advanced Routing and Traffic Control

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

 



Hi,
        I'm trying to limit the outgoing traffic. I have a router with two
ethernets and a client that is routered. I can limit the incoming
traffic using u32, but i tried to limit the outgoing but nothing
happened. Then i tried to use ipchains and fw to limit it and again
nothing happened. Here are my configurations:


                        ------------
         Client --- eth1|  Router  |eth0 --- Internet
                        ------------
Router: eth0: 192.168.0.207
        eth1: 10.0.1.1
Client: 10.0.1.2

SCRIPT WITH u32:
tc qdisc add dev eth0 root handle 1:0 cbq bandwidth 256Kbit avpkt 1000
cell 8

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 256Kbit rate
256Kbit weight 20Kbit prio 8 allot 1514 cell 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:1 classid 1:10 cbq bandwidth 256Kbit rate
64Kbit weight 6Kbit prio 5 allot 1514 cell 8 maxburst 20 avpkt 1000
bounded

tc qdisc add dev eth0 parent 1:10 tbf rate 64Kbit buffer 10Kb/8 limit
15Kb mtu 1500

tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip src
10.0.5.2 flowid 1:10


SCRIPT WITH fw:
ipchains -A forward -s 10.0.5.0/24 -j MASQ -m 0x1

tc qdisc add dev eth0 root handle 1: cbq bandwidth 128Kbit avpkt 1000

tc class add dev eth0 parent 1:0 classid 1:1 cbq bandwidth 128Kbit rate
128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:1 classid 1:2 cbq bandwidth 128Kbit rate
128Kbit allot 1514 weight 12Kbit prio 8 maxburst 20 avpkt 1000

tc class add dev eth0 parent 1:2 classid 1:11 cbq bandwidth 128Kbit rate
128Kbit allot 1514 weight 2Kbit prio 5 maxburst 20 avpkt 1000 split 1:2

tc qdisc add dev eth0 parent 1:11 sfq quantum 1514b perturb 15

tc filter add dev eth0 parent 1:0 protocol ip prio 100 handle 1 fw
classid 1:11


So, does anybody know what is happening?

Thanks,
        Bruno




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