Hello , i have one 128kbit link , and i need share this link with 2 clients , client 1 is 10.100.100.2 and client 2 is 10.100.100.3 , i want limit client 1 with 64k and client 2 too. But if client 1 is noting using your 64k , forward your link to client 2 and vice-versa. I tried this: ./tc qdisc del root dev eth0 ./tc qdisc add dev eth0 root handle 1: cbq bandwidth 10mbit avpkt 1000 ./tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10mbit rate 128kbit allot 1514 maxburst 20 avpkt 1000 bounded prio 1 ./tc class add dev eth0 parent 1:2 classid 1:4 cbq bandwidth 10mbit rate 64kbit allot 1514 maxburst 20 avpkt 1000 prio 1 ./tc class add dev eth0 parent 1:2 classid 1:5 cbq bandwidth 10mbit rate 64kbit allot 1514 maxburst 20 avpkt 1000 prio 1 ./tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.100.100.2 flowid 1:4 ./tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst 10.100.100.3 flowid 1:5 Thank''s a lot..... Sorry my poor english .... -- Diego Almeida diego dot sl at email dot com dot br
On Friday 05 April 2002 16:42, Diego Almeida wrote:> Hello , i have one 128kbit link , and i need share this link with 2 clients > , client 1 is 10.100.100.2 and client 2 is 10.100.100.3 , i want limit > client 1 with 64k and client 2 too. But if client 1 is noting using your > 64k , forward your link to client 2 and vice-versa. I tried this: > ./tc qdisc del root dev eth0 > ./tc qdisc add dev eth0 root handle 1: cbq bandwidth 10mbit avpkt 1000 > ./tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10mbit rate > 128kbit allot 1514 maxburst 20 avpkt 1000 bounded prio 1 > ./tc class add dev eth0 parent 1:2 classid 1:4 cbq bandwidth 10mbit rate > 64kbit allot 1514 maxburst 20 avpkt 1000 prio 1 > ./tc class add dev eth0 parent 1:2 classid 1:5 cbq bandwidth 10mbit rate > 64kbit allot 1514 maxburst 20 avpkt 1000 prio 1 > ./tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst > 10.100.100.2 flowid 1:4 > ./tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst > 10.100.100.3 flowid 1:5 > > > Thank''s a lot.....Euh, the commands seems ok for me. So, is it not working ???? Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
Not... If the client 1 this not using its link, client 2 does not obtain to use link of client 1, the two always is limited 64kbit... Em Sex 05 Abr 2002 12:52, vocĂȘ escreveu:> On Friday 05 April 2002 16:42, Diego Almeida wrote: > > Hello , i have one 128kbit link , and i need share this link with 2 > > clients , client 1 is 10.100.100.2 and client 2 is 10.100.100.3 , i want > > limit client 1 with 64k and client 2 too. But if client 1 is noting using > > your 64k , forward your link to client 2 and vice-versa. I tried this: > > ./tc qdisc del root dev eth0 > > ./tc qdisc add dev eth0 root handle 1: cbq bandwidth 10mbit avpkt 1000 > > ./tc class add dev eth0 parent 1:0 classid 1:2 cbq bandwidth 10mbit rate > > 128kbit allot 1514 maxburst 20 avpkt 1000 bounded prio 1 > > ./tc class add dev eth0 parent 1:2 classid 1:4 cbq bandwidth 10mbit rate > > 64kbit allot 1514 maxburst 20 avpkt 1000 prio 1 > > ./tc class add dev eth0 parent 1:2 classid 1:5 cbq bandwidth 10mbit rate > > 64kbit allot 1514 maxburst 20 avpkt 1000 prio 1 > > ./tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst > > 10.100.100.2 flowid 1:4 > > ./tc filter add dev eth0 parent 1:0 protocol ip prio 100 u32 match ip dst > > 10.100.100.3 flowid 1:5 > > > > > > Thank''s a lot..... > > Euh, the commands seems ok for me. So, is it not working ???? > > Stef-- Diego Almeida diego dot sl at email dot com dot br
Hi all, I use a very simple script like this: ******************************************************************* #!/bin/bash # Qdisc tc qdisc del dev eth1 root tc qdisc add dev eth1 root handle 1: prio tc qdisc add dev eth1 parent 1:1 tbf limit 1600 burst 2600 rate 28800 # Filter tc filter add dev eth1 parent 1:0 protocol ip prio 1 handle 1 fw classid 1:1 # Rules ipchains -F ipchains -A output -p tcp -d lab 20:21 -b -j ACCEPT -m 1 ******************************************************************** where lab is an host of mine. When I upload using ftp, all is ok (28800 bit/s). When I use interactive services (like "Midnight Commander", Norton Commander" Linux clone) I have speed problem, response time is slow. So I wonder what about other services (like HTTP.....). What I''m wronging? I need some other class to add? Thank you very much for your help! Roberto Arcomano