CBQ Traffic control not working
Quoted 6 lines
Quoted 4 lines
tc class add dev eth0 parent 1:1 classid 1:8 cbq bandwidth 10Mbit rate 64Kbit allot 1514 cell 8 weight 6.4Kbit prio 1 maxburst 20 avpkt 1000 split
1:0 tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 4 fw
classid 1:8Euh. You don't have any filters? How do you redirect traffic to a class? You need some filters to do so.
The filters are there... if you take a closer look you'll that my copy/paste was falty...
But I can tell you I solved the problem. I attched my solution below. Stef, you are right, my filters are not working...
In fact I don't konow what I did wrong:
for marking packets depending on their source I used
ipchains -A output -p all -s 192.168.1.0/30 -m 1
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 300 mpu 64
tc class add dev eth1 parent 1: classid 1:1 cbq bandwidth 10Mbit rate 72Kbit weight 7.2Kbit prio 7 allot 1514 maxburst 20 avpkt 300 bounded isolated
tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 64Kbit weight 6.4Kbit prio 6 allot 1514 bounded isolated ip route add 192.168.1.8/29 via 192.168.1.1 realm 1
tc filter add dev eth1 parent 1:0 protocol ip prio 1 route to 1 classid 1:3
tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 14Kbit allot 1514 cell 8 weight 1.4Kbit prio 7 maxburst 20 avpkt 300 split 1:0 bounded isolated
ip route add 192.168.3.8/29 via 192.168.3.1 realm 2
tc filter add dev eth1 parent 1:0 protocol ip prio 7 route to 2 classid 1:2
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
The filters are there... if you take a closer look you'll that my copy/paste was falty...
But I can tell you I solved the problem. I attched my solution below. Stef, you are right, my filters are not working...
In fact I don't konow what I did wrong:
for marking packets depending on their source I used
ipchains -A output -p all -s 192.168.1.0/30 -m 1
and the filters look like
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw classid 1:8
Could it be the fact that I made the marking on the output chains and not on the input chain?
MT
###############
#PROBLEM SOLVED
###############
tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1: cbq bandwidth 10Mbit cell 8 avpkt 300 mpu 64
tc class add dev eth1 parent 1: classid 1:1 cbq bandwidth 10Mbit rate 72Kbit weight 7.2Kbit prio 7 allot 1514 maxburst 20 avpkt 300 bounded isolated
tc class add dev eth1 parent 1:1 classid 1:3 cbq bandwidth 10Mbit rate 64Kbit weight 6.4Kbit prio 6 allot 1514 bounded isolated ip route add 192.168.1.8/29 via 192.168.1.1 realm 1
tc filter add dev eth1 parent 1:0 protocol ip prio 1 route to 1 classid 1:3
tc class add dev eth1 parent 1:1 classid 1:2 cbq bandwidth 10Mbit rate 14Kbit allot 1514 cell 8 weight 1.4Kbit prio 7 maxburst 20 avpkt 300 split 1:0 bounded isolated
ip route add 192.168.3.8/29 via 192.168.3.1 realm 2
tc filter add dev eth1 parent 1:0 protocol ip prio 7 route to 2 classid 1:2
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 7 lines · Mugur TOMITA
The filters are there... if you take a closer look you'll that my copy/paste was falty...
But I can tell you I solved the problem. I attched my solution below. Stef, you are right, my filters are not working...
In fact I don't konow what I did wrong:
for marking packets depending on their source I used
Quoted 5 lines
ipchains -A output -p all -s 192.168.1.0/30 -m 1and the filters look like
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1 fw
classid 1:8 Could it be the fact that I made the marking on the output chains and not on the input chain?
Yes. If you nat, the source address is rewritten to the address of your firewall.
Stef
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/