Shaping with htb and VLAN

Linux Advanced Routing and Traffic Control

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

 



Hello
 
At first I must tell you that I´m a real newbie with Linux (and english as well...)
I´m using 2 vlans and shaping works quite well without vlan
Now I want to do load balancing at these vlans.
Any vlan should get the same minimum/maximum bandwidth of download and use the bandwidth that isn´t used by the other one at the moment.
But with vlan the shaping doesn´t work.
Can you please tell me the mistakes in my script you can see below?
 
#!/bin/sh
 
#mark
/sbin/iptables -t mangle -A PREROUTING -i ppp0 -j MARK --set-mark 9
 
#delete old qdisc
/sbin/tc qdisc del dev ppp0 root         2>    /dev/null >/dev/null
/sbin/tc qdisc del dev ppp0 ingress    2>    /dev/null >/dev/null
/sbin/tc qdisc del dev eth0 root          2>    /dev/null >/dev/null
/sbin/tc qdisc del dev lo root              2>    /dev/null >/dev/null
 
#create qdisc
/sbin/tc qdisc add dev eth0 root handle 1: htb default 0
 
#all pakets get here
/sbin/tc class add dev eth0 parent 1: classid 1:1 htb rate 200kbit burst 10kbit
 
#class for the clients
/sbin/tc class add dev eth0 parent 1:1 classid 1:10 htb rate 100kbit burst 10kbit ceil 100kbit prio 10
/sbin/tc class add dev eth0 parent 1:1 classid 1:20 htb rate 100kbit burst 10kbit ceil 100kbit prio 10
 
#balacing
/sbin/tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
/sbin/tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
 
#filter
/sbin/tc filter add dev eth0 protocol 802.1q parent 1: prio 1 handle 9 fw flowid 1:1
 
/sbin/tc filter add dev eth0 protocol 802.1q parent 1:1 prio 1 u32 match ip dst 192.168.12.4 flowid 1:10
/sbin/tc filter add dev eth0 protocol 802.1q parent 1:1 prio 1 u32 match ip dst 192.168.13.4 flowid 1:10
 
echo "shaping on"
 
best regards
 
Wolfgang Schmid // Münster (Germany)
 
 
 

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