Hi guys I have a config as follows for one of my networks. I want to give the xxx.xxx.xxx.xxx/xx network 64kbit for everything from the internet but 8000kbit from our internal servers on yyy.yyy.yyy.yyy/yy network. It does not work. I only want to use u32 filters. I think what's happening is the first flowid of 1:21 is catching them and not getting to the 1:40 flowid. Is this right? The box has to be between the x network and the y network. tc qdisc del dev eth1 root handle 1: htb default 999 tc qdisc add dev eth1 root handle 1: htb default 999 tc class add dev eth1 parent 1: classid 1:1 htb rate 10000kbit tc class add dev eth1 parent 1:1 classid 1:999 htb rate 1000kbit ceil 10000kbit tc qdisc add dev eth1 parent 1:999 handle 1999: sfq perturb 10 tc class add dev eth1 parent 1:1 classid 1:2 htb rate 10000kbit quantum 1514 tc class add dev eth1 parent 1:2 classid 1:21 htb rate 64kbit ceil 64kbit quantum 1514 tc class add dev eth1 parent 1:2 classid 1:40 htb rate 8000kbit ceil 8000kbit quantum 757000 tc qdisc add dev eth1 parent 1:21 handle 2100: sfq perturb 10 tc qdisc add dev eth1 parent 1:40 handle 4000: sfq perturb 10 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst xxx.xxx.xxx.xxx.xx flowid 1:21 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip src yyy.yyy.yyy.yyy/yy match ip dst xxx.xxx.xxx.xxx/xx flowid 1:40 Regards Allan Gee Equation 021 4181777 www.equation.co.za ,S f)+-L)Y=jyaffvZ_j)fjb?psLmr
Hi, try to give the more specific filter a higher prio. if i understood "tc filter" right, the filters with higher prio are checked first. in you''re setup giving the last filter line "prio 0" should do the job.> Hi guys I have a config as follows for one of my networks. I want to > give the xxx.xxx.xxx.xxx/xx network 64kbit for everything from the > internet but 8000kbit from our internal servers on yyy.yyy.yyy.yyy/yy > network. It does not work. I only want to use u32 filters. I think > what''s happening is the first flowid of 1:21 is catching them and not > getting to the 1:40 flowid. Is this right? The box has to be between the > x network and the y network.> > tc qdisc del dev eth1 root handle 1: htb default 999 > tc qdisc add dev eth1 root handle 1: htb default 999 > tc class add dev eth1 parent 1: classid 1:1 htb rate 10000kbit > tc class add dev eth1 parent 1:1 classid 1:999 htb rate 1000kbit ceil > 10000kbittc qdisc add dev eth1 parent 1:999 handle 1999: sfq perturb> 10 > tc class add dev eth1 parent 1:1 classid 1:2 htb rate 10000kbit quantum > 1514tc class add dev eth1 parent 1:2 classid 1:21 htb rate 64kbit> ceil 64kbit quantum 1514tc class add dev eth1 parent 1:2 classid 1:40> htb rate 8000kbit ceil 8000kbit quantum 757000tc qdisc add dev eth1> parent 1:21 handle 2100: sfq perturb 10 > tc qdisc add dev eth1 parent 1:40 handle 4000: sfq perturb 10 > tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst > xxx.xxx.xxx.xxx.xx flowid 1:21tc filter add dev eth1 protocol ip> parent 1:0 prio 1 u32 match ip src yyy.yyy.yyy.yyy/yy match ip dst > xxx.xxx.xxx.xxx/xx flowid 1:40> > Regards Allan Gee > Equation > 021 4181777 > www.equation.co.za > ,SéX§éb²ß¿ø°L)YÛ=jya¶Úþf¢f§vÏZ_æj)fjåËbú?ªísáÎY3¾ÛiÿùZ®×(®_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Friday 20 September 2002 19:23, Tobias Geiger wrote:> Hi, > > try to give the more specific filter a higher prio. if i understood "tc > filter" right, the filters with higher prio are checked first.But that''s only for filters with the same parent. So it will work in this case. Or you enter the filters in the order they have to be checked : tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip src yyy.yyy.yyy.yyy/yy match ip dst xxx.xxx.xxx.xxx/xx flowid 1:40 tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32 match ip dst xxx.xxx.xxx.xxx.xx flowid 1:21 Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/