Skip to contentSkip to conversation

tcindex filter

LARTC Jan Coppens 1 participant 1 message Mar 8, 2002

lore
Share & tools
lore
#0 lore raw

Hi,

Can someone explain me what this script does?

tc qdisc del dev eth1 root
tc qdisc add dev eth1 root handle 1:0 cbq bandwidth 10mbit avpkt 1000

tc class add dev eth1 parent 1:0 classid 1:39 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:0 classid 1:40 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:0 classid 1:41 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:0 classid 1:47 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:0 classid 1:48 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:0 classid 1:49 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 tc class add dev eth1 parent 1:0 classid 1:50 cbq bandwidth 256kbit rate 128kbit allot 1514 maxburst 20 avpkt 1000

tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 0 tcindex classid 1:50 tc filter add dev eth1 parent 1:0 protocol ip prio 39 handle 39 tcindex classid 1:39 tc filter add dev eth1 parent 1:0 protocol ip prio 40 handle 40 tcindex classid 1:40 tc filter add dev eth1 parent 1:0 protocol ip prio 41 handle 41 tcindex classid 1:41 tc filter add dev eth1 parent 1:0 protocol ip prio 47 handle 47 tcindex classid 1:47 tc filter add dev eth1 parent 1:0 protocol ip prio 48 handle 48 tcindex classid 1:48 tc filter add dev eth1 parent 1:0 protocol ip prio 49 handle 49 tcindex classid 1:49

I think it will devide the traffic in the different classes according to the tcindex value. However, the script doesn't use a dsmark qdisc, so the tcindex value should be set first with an ingress qdisc, right?

thx,
Jan

---
Jan Coppens
Ghent University - IMEC

Department of Information Technology (INTEC)
Broadband Communication Networks (IBCN)

Sint-Pietersnieuwstraat, 41
B-9000, Gent
Belgium

E-mail: [email protected]
Phone: +32 (0)9 267 35 90
Fax: +32 (0)9 267 35 99