Vnorene cbq tridy

Marian Jancar marian.jancar na infonet.cz
Čtvrtek Leden 11 12:51:07 CET 2001


Pokousim se vytvorit bounded tridu a v ni dva bounded potomky, kteri
maji sirku pasma vice nez polovinu sirky pasma predka, kterou by ale
meli sdilet, coz se bohuzel nedeje, pokud sprejuju zaroven skrze oba
potomky, kazdy z nich jede naplno, coz samozrejme sirku pasma predka
prekroci. Jakekoliv pripominky a napady jsou vrele vitany.

tc qdisc add dev eth0 root handle 1: cbq bandwidth 10Mbit allot 1514
cell 8 avpkt 1000

#*******trida 64Kbit**********
tc class add dev eth0 parent 1:0 classid 1:200 cbq bandwidth 10Mbit rate
64Kbit allot 1514 cell 8 avpkt 1000 maxburst 20 weight 6Kbit prio 5
bounded

#*******trida 48Kbit**********
tc class add dev eth0 parent 1:200 classid 1:210 cbq bandwidth 10Mbit
rate 48Kbit allot 1514 cell 8 avpkt 1000 maxburst 20 weight 5Kbit prio 5
bounded
#tc qdisc add dev eth0 parent 1:210 red bandwidth 48Kbit min 4500 max
9000 limit 18000 avpkt 1000 burst 5 probability 0.02

#*******trida 48Kbit*********
tc class add dev eth0 parent 1:200 classid 1:220 cbq bandwidth 10Mbit
rate 48Kbit allot 1514 cell 8 avpkt 1000 maxburst 20 weight 5Kbit prio 5
bounded
#tc qdisc add dev eth0 parent 1:220 red bandwidth 48Kbit min 4500 max
9000 limit 18000 avpkt 1000 burst 5 probability 0.02

#Filtry
tc filter add dev eth0 parent 1:0 prio 5 protocol ip u32
tc filter add dev eth0 parent 1:0 prio 5 u32 divisor 256

tc filter add dev eth0 parent 1:0 prio 5 u32 match ip dst 10.0.0.2
flowid 1:210
tc filter add dev eth0 parent 1:0 prio 5 u32 match ip dst 10.0.0.3
flowid 1:220


Další informace o konferenci Linux