Martin Devera wrote: >>i want to priorize on first udp second icmp then tcp then any other how? >>does "tc qdisc add dev eth0 parent 1:12 handle 20: prio 1 udp " priorize >>udp? >> > >not exactly - default prio is 0 (highest). Use prio 3 for 1:11,1:10 >and prio 1 for 1:12 and prio 2 for icmp class. > >>#shape interface eth0 >>tc class add dev eth0 parent 1: classid 1:1 htb rate 128kbit ceil 128kbit >>#voip class >>tc class add dev eth0 parent 1:1 classid 1:12 htb rate 128kbit ceil 128kbit >>#staff class >>tc class add dev eth0 parent 1:1 classid 1:11 htb rate 30kbit ceil 128kbit >>tc class add dev eth0 parent 1:1 classid 1:13 htb rate 30kbit ceil 128kbit >>#mark voip class >> > >this is nonsence ! 128+30+30 > 128. You guarantee 208kb while >1:1 has only 128k capacity ... > >devik > > >. > >my problem is. i have 2 kind of pc-s in my network. > first class (1) is working on voip second (2) is just staff I have 512kbit connection. i am doing the following. giving both class 512 kbps. but if voip needs 512 it can get it all 512. and staff will get nothing. if voip only use 300 staff can use 212 kbps. 128 kbit was an example not my real speed. so as a rule voip uses udp protocol. thats because i want to priorize udp protocols. in voip class i want to priorize udp, then icmp then any other. in staff clas i want to priorize first udp then icmp then tcp then any other. how can i add this? and does my script solves my problem? i sought that i have to create 2 class voip and staf. then make subclasses in voip and staff. like voip classid 1:1 and staf classid 1:2 then this clasids must have there classes voip and staff. i think it is better for traffic shaping. hint me how can i do it. and can i do the following give to 1:1 classid rate 512 and ceil 512. so voip can use all bandwith. and give to 1:2 rate 2 ceil 512. does it mean that if 1:1 classes use 400 kb 1:2 classes can use 112 kb? and can i borrow 112 kbps in 1:2 classes. i mean that if 1 pc from 1;2 classes use all 112 and 2 pc-s want tu use one 30 second 12 fisrt will use only 60 kb. that is my problem. and please hint my with some examples hopw can i do it. ###################################MY SCRIPT################################################################3 tc qdisc del dev eth0 root tc qdisc del dev eth1 root #eht0 rules tc qdisc add dev eth0 root handle 1: htb default 12 #shape interface eth0 tc class add dev eth0 parent 1: classid 1:1 htb rate 512kbit ceil 512kbit #voip class tc class add dev eth0 parent 1:1 classid 1:12 htb rate 512kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:14 htb rate 512kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:16 htb rate 512kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:18 htb rate 512kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:20 htb rate 512kbit ceil 512kbit #staff class tc class add dev eth0 parent 1:1 classid 1:11 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:13 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:15 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:17 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:19 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:21 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:23 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:25 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:27 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:29 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:31 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:33 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:35 htb rate 2kbit ceil 512kbit tc class add dev eth0 parent 1:1 classid 1:37 htb rate 2kbit ceil 512kbit #mark voip class tc filter add dev eth0 parent 1: protocol ip prio 1 handle 2 fw classid 1:12 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 4 fw classid 1:14 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 6 fw classid 1:16 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 8 fw classid 1:18 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 10 fw classid 1:20 #mark staff class tc filter add dev eth0 parent 1: protocol ip prio 1 handle 1 fw classid 1:11 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 3 fw classid 1:13 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 5 fw classid 1:15 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 7 fw classid 1:17 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 9 fw classid 1:19 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 11 fw classid 1:21 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 13 fw classid 1:23 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 15 fw classid 1:25 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 17 fw classid 1:27 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 19 fw classid 1:29 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 21 fw classid 1:31 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 23 fw classid 1:33 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 25 fw classid 1:35 tc filter add dev eth0 parent 1: protocol ip prio 1 handle 27 fw classid 1:37 #add qdisc discipline voip tc qdisc add dev eth0 parent 1:12 handle 30: sfq perturb 10 tc qdisc add dev eth0 parent 1:14 handle 30: sfq perturb 10 tc qdisc add dev eth0 parent 1:16 handle 30: sfq perturb 10 tc qdisc add dev eth0 parent 1:18 handle 30: sfq perturb 10 tc qdisc add dev eth0 parent 1:20 handle 30: sfq perturb 10 #add qdisc discipline staff tc qdisc add dev eth0 parent 1:11 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:13 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:15 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:17 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:19 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:21 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:23 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:25 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:27 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:29 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:31 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:33 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:35 handle 40: sfq perturb 10 tc qdisc add dev eth0 parent 1:37 handle 40: sfq perturb 10