[prev in list] [next in list] [prev in thread] [next in thread]
List: lartc
Subject: Re: behaviour of tc for bridged ports
From: Adam Niescierowicz <adam.niescierowicz () justnet ! pl>
Date: 2023-07-12 10:44:50
Message-ID: 75f8bfbc-6ba3-b204-294a-90ada60c5e1d () justnet ! pl
[Download RAW message or body]
It can be stupid answer but try limiting traffic on br0.
Also try using htb with tc filter.
W dniu 9.07.2023 o 14:24, Nayan Gadre pisze:
> Hi Experts,
>
> I have a wireless router having the client facing interface wlan0 and
> the wired gateway facing interface eth0 under a bridge br0.
>
> / # brctl show
> bridge name bridge id STP enabled interfaces
> br0 8000.bce67c4d8fb0 no eth0
> wlan0
>
> client get IP 192.168.0.105, and server (connected via eth0) has IP
> 192.168.0.10.
> On server I run "iperf3 -s -p 5678 -V"
> On client I run "iperf3 -c 192.168.0.10 -p5678 -i1 -tinf"
> All works fine.
>
> Now I want to rate limit the traffic going from wlan0 to eth0 to 5000kbits/sec.
>
> I tried to apply a classless qdisc to eth0 port as well as wlan0 port.
> # tc qdisc add dev eth0 root tbf rate 5000kbit latency 50ms burst 15k
> # tc qdisc add dev wlan0 root tbf rate 5000kbit latency 50ms burst 15k
>
> However, the qdisc does not take effect.
>
> iperf3 -c 192.168.0.10 -p5678 -i1 -tinf
> Connecting to host 192.168.0.10, port 5678
> [ 5] local 192.168.0.105 port 43384 connected to 192.168.0.10 port 5678
> [ ID] Interval Transfer Bitrate Retr Cwnd
> [ 5] 0.00-1.00 sec 10.7 MBytes 89.6 Mbits/sec 0 526 KBytes
> [ 5] 1.00-2.00 sec 8.95 MBytes 75.1 Mbits/sec 0 560 KBytes
> [ 5] 2.00-3.00 sec 9.13 MBytes 76.6 Mbits/sec 0 619 KBytes
>
> / # tc -s qdisc
> qdisc tbf 8005: dev eth0 root refcnt 5 rate 5Mbit burst 15Kb lat 50ms
> Sent 221305 bytes 469 pkt (dropped 157, overlimits 288 requeues 0)
> backlog 0b 0p requeues 0
> qdisc tbf 8006: dev wlan16 root refcnt 5 rate 5Mbit burst 15Kb lat 50ms
> Sent 7095 bytes 109 pkt (dropped 0, overlimits 0 requeues 0)
> backlog 0b 0p requeues 0
>
> My kernel is 4.4.60, and I checked that qdisc gets activated in the
> egress path after dev_queue_xmit() is called. And for a bridged port,
> the path taken by the packet coming to wlan0 is
> __br_deliver -> br_forward_finish -> br_dev_queue_push_xmit -> dev_queue_xmit.
>
> So the qdisc should have taken effect even in the bridged case. I see
> statistics for eth0 qdisc.
> What am I missing in the tc rule ?
>
> If I apply the same rule on the server and client interfaces then I
> can see rate limiting taking effect. But on the wireless router linux
> bridge it's not working.
>
> Thanks
> N Gadre
--
---
Pozdrawiam
Adam Nieścierowicz
["adam_niescierowicz.vcf" (text/vcard)]
begin:vcard
fn;quoted-printable:Adam Nie=C5=9Bcierowicz
n;quoted-printable:Nie=C5=9Bcierowicz;Adam
email;internet:adam.niescierowicz@justnet.pl
x-mozilla-html:TRUE
version:2.1
end:vcard
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic