[tcng] correct config?

Linux Advanced Routing and Traffic Control

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

 






Below is my tests and I have some questions regarding them :
first it seems that classification doesnt happen at all ?! and it is clear from
the u32 filters 'cause they point to classes 1:1 and 1:2 which doesnt exist at all ?
Also I can't figure out which filter got used u32 or tc_index but 'cause tcism_plot generates
only enqueed packed and no dequee-packets. They have same priority but u32 is attached
at root so they should be used, right ?

Ok I will describe the scenario I want to achieve if u can give me simple exmples :

On the root I want to create one 256KB/s channel then in this channel I want
to create two channels which will be separated on two one 60% the other 40% 
(both can borrow bandwith from each other but the 60%-channel has to be
more privileged, higher priority)
Then in those two channels I want have more small channels say 30 in each of them...
(cbq and htb if posiible :") 'm I nasty !)

Next question : Say I have to handle other traffic not only Internet, then I should 
make sibling channels to my Internet one to handle this, right ?

One final question : If u have say 1Mbps Internet connection to the outside world
what channel u create below-the-root (which is 100Mbps -ethernet)  for handling
your internet traffic -- exact 1Mbps OR something like 1.2Mbps so that u can be sure that if
link is used to 100% u dont end up using something like 98% of the link OR
some other way ?

xxx.tcng==================================================

dev eth0 {
 egress {
	class(<$t1>) if ip_src == 192.168.0.1;
	class(<$t2>) if ip_src == 192.168.0.2;	
	//drop if tcp_sport != PORT_HTTP;
	//drop if 1;
	
	cbq(bandwidth 256*8 kbps, maxburst 200p, avpkt 1024B, allot 1514B) {
    	    $t1 = class(5,rate 19200 bps) {		
		tbf(rate 19200 bps, burst 3000B, limit 280B, mtu 1510B) {};
	    }	 
	    $t2 = class(6, rate 33600 bps) {};		    		

	}
	
 }
}

----------------------- I start tcism this way : tcism xxx.tcng | tcsim_filter src | tcism_plot

#include "packet.def"
#include "ports.tc"

dev eth0 10Mbps {
 #include "xxx.tcng"
}

every 0.1s send TCP_PCK($ip_src = 192.168.0.1 $tcp_sport = PORT_HTTP);
time 2s
end

-----------------------


the result of tcc compilation----------------------------------------
# ================================ Device eth0 ================================

tc qdisc add dev eth0 handle 1:0 root dsmark indices 4 default_index 0
tc qdisc add dev eth0 handle 2:0 parent 1:0 cbq bandwidth 256000bps avpkt 1024
tc class add dev eth0 parent 2:0 classid 2:5 cbq bandwidth 256000bps rate 2400bps allot 1514 avpkt 1024 maxburst 200
tc qdisc add dev eth0 handle 3:0 parent 2:5 tbf burst 3000 limit 280 mtu 1510 rate 2400bps
tc class add dev eth0 parent 2:0 classid 2:6 cbq bandwidth 256000bps rate 4200bps allot 1514 avpkt 1024 maxburst 200
tc filter add dev eth0 parent 2:0 protocol ip prio 1 tcindex mask 0x3 shift 0
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 2 tcindex classid 2:6
tc filter add dev eth0 parent 2:0 protocol ip prio 1 handle 1 tcindex classid 2:5
tc filter add dev eth0 parent 1:0 protocol ip prio 1 handle 1:0:0 u32 divisor 1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u32 0xc0a80001 0xffffffff at 12 classid 1:1
tc filter add dev eth0 parent 1:0 protocol ip prio 1 u32 match u32 0xc0a80002 0xffffffff at 12 classid 1:2


Thanx alot
raptor@unacs.bg


_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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