Hi!
I''m using class based queueing for testing how same applications work
with low bandwidth. So what I did was give this commands:
tc qdisc add dev eth0 root handle 10: cbq bandwidth 4kbit avpkt 1000
tc qdisc add dev eth1 root handle 20: cbq bandwidth 4kbit avpkt 1000
tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 4kbit
rate 4kbit allot isolated
tc class add dev eth1 parent 20:0 classid 20:1 cbq bandwidth 4kbit
rate 4kbit allot isolated
tc qdisc add dev eth0 parent 10:0 sfq quantum 1514b
tc qdisc add dev eth1 parent 20:0 sfq quantum 1514b
tc filter add dev eth0 parent 10:0 protocol ip u32 match ip dst
192.0.0.0/8 flowid 10:1
tc filter add dev eth1 parent 20:0 protocol ip u32 match ip dst
57.0.0.0/8 flowid 20:1
(has you can see I''m testing with bandwidth = 4k)
Now, WHY DOES NOT WORK? It seams that it using all 100Mbits
____________ ____________
( ) ( )
(57.227.234.0/23)--------|Linux|---------(192.168.76.0/24)
(____________) eth0 eth1 (____________)
57.227.235.12
192.168.76.1
thanks
-vcf
Stef Coene wrote:> Try this : > tc qdisc add dev eth0 root handle 10: cbq bandwidth 10mbit avpkt 1000> > ~~~~~~ > tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 10mbit rate > ~~~~~~ > rate 4kbit allot bounded isolated > ~~~~~~~ > > Staf > > Vitor Carlos Flausino wrote: > > > > Hi! > > I''m using class based queueing for testing how same applications work > > with low bandwidth. So what I did was give this commands: > > > > tc qdisc add dev eth0 root handle 10: cbq bandwidth 4kbit avpkt 1000 > > tc qdisc add dev eth1 root handle 20: cbq bandwidth 4kbit avpkt 1000 > > > > tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 4kbit > > rate 4kbit allot isolated > > tc class add dev eth1 parent 20:0 classid 20:1 cbq bandwidth 4kbit > > rate 4kbit allot isolated > > > > tc qdisc add dev eth0 parent 10:0 sfq quantum 1514b > > tc qdisc add dev eth1 parent 20:0 sfq quantum 1514b > > > > tc filter add dev eth0 parent 10:0 protocol ip u32 match ip dst > > 192.0.0.0/8 flowid 10:1 > > tc filter add dev eth1 parent 20:0 protocol ip u32 match ip dst > > 57.0.0.0/8 flowid 20:1 > >Thanks but it did not solve.... It still works 100mbit tc qdisc add dev eth0 root handle 10: cbq bandwidth 100mbit avpkt 1000 tc qdisc add dev eth1 root handle 20: cbq bandwidth 100mbit avpkt 1000 tc class add dev eth0 parent 10:0 classid 10:1 cbq bandwidth 100mbit rate 4kbit allot 1514 bounded isolated tc class add dev eth1 parent 20:0 classid 20:1 cbq bandwidth 100mbit rate 4kbit allot 1514 bounded isolated tc qdisc add dev eth0 parent 10:0 sfq quantum 1514b perturb 15 tc qdisc add dev eth1 parent 20:0 sfq quantum 1514b perturb 15 tc filter add dev eth0 parent 10:0 protocol ip u32 match ip dst 192.0.0.0/8 flowid 10:1 tc filter add dev eth1 parent 20:0 protocol ip u32 match ip dst 57.0.0.0/8 flowid 20:1 -vcf