From mboxrd@z Thu Jan 1 00:00:00 1970 From: GGounot Date: Sun, 29 Jun 2014 11:08:22 +0000 Subject: Re: PRIO qdisc traffic does not work as expected Message-Id: <53AFF3A6.9010309@laposte.net> List-Id: References: <53A1697C.3040400@laposte.net> In-Reply-To: <53A1697C.3040400@laposte.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org I've made the following script.. It should redirect traffic according to=20 TOS, but SSH, SCP, HTTP download, etc., but it does not and everything=20 goes through 1:2. Any idea ? I can see that using : tc -s qdisc ls dev ifb0 tc -s class ls dev ifb0 _________________ DOWNRATE=1500 tc=3D/sbin/tc EHT=3Deth0 IFB=3Difb0 modprobe ifb modprobe act_mirred ethtool -K $EHT tso off gso off gro off $tc qdisc del dev $EHT root 2>/dev/null $tc qdisc del dev $EHT ingress 2>/dev/null $tc qdisc del dev $IFB root 2>/dev/null $tc qdisc del dev $IFB ingress 2>/dev/null ### INGRESS ### $tc qdisc add dev $EHT handle ffff: ingress ifconfig $IFB up $tc filter add dev $EHT parent ffff: protocol all u32 match u32 0 0=20 action mirred egress redirect dev $IFB ### HTB ## $tc qdisc add dev $IFB root handle 1:0 htb default 1 $tc class add dev $IFB parent 1:0 classid 1:1 htb rate ${DOWNRATE}kbps ### PRIO ### $tc qdisc add dev $IFB parent 1:1 handle 10: prio $tc qdisc add dev $IFB parent 10:1 handle 101: sfq $tc qdisc add dev $IFB parent 10:2 handle 102: sfq $tc qdisc add dev $IFB parent 10:3 handle 103: sfq ___________________ Le 19/06/2014 21:06, Dave Taht a =C3=A9crit : > I'm not huge on strict prio queues. And you need to ratelimit in both > directions, and ifb is best. > > On Thu, Jun 19, 2014 at 6:58 AM, Andy Furniss wrote: >> GGounot wrote: >> >> >>> The diagram is : Internet <=3D> eth0 <=3D> eth1 <=3D> Client computer >>> (which downloads using Firefox) >>> >>> So shaping on eth1 outgoing traffic should limit the rate Client >>> receives data from Internet. >>> >>> Would shaping on eth0 using : tc qdisc add dev eth0handle ffff: >>> ingress ifconfig ifb0 up tc filter add dev eth0 parent ffff: protocol >>> all u32 match u32 0 0 action mirred egress redirect dev ifb0 and run >>> the script on ifb0 be a better solution ? >> >> You could but don't need to as you can do it on eth1. >> >> Which ever way you are going to be shaping from the wrong end of the >> bottleneck so will need to sacrifice some bandwidth for it to work. >> >> My previous answer 2. was a bit misleading as it would only have applied >> if you were maxing eth speed. >> >> >>> Other way : eth0 has a public IP (is directly connected to >>> Internet). >>> >>> eth0 and eth1 are 100Mb/s network PCI cards. >>> >>> The Internet link has a rate of ~4000Kb/s. >>> >>> Is the use of PRIO qdisc the problem ? (since it (maybe) acts on the >>> network card rate, not the actual Internet connection rate) >> >> Yes, prio is the problem you need to send the traffic from the internet >> to something like htb with the rate set to eg. 3500kbit then you can use >> htb classes to give prio for some traffic over other. You could if you >> wanted use prio qdisc as a child of htb. >> >> >> >> -- >> To unsubscribe from this list: send the line "unsubscribe lartc" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html > >