Hi guys, i have a little doubt ; I have eth0 ethernet and eth1 wireless , and they are bridged in br0 Is there any difference in the behavior between do tc qdisc add dev br0 root sfq OR tc qdisc add dev eth0 root sfq && tc qdisc add dev eth1 root sfq -- []''s Salatiel "O maior prazer do inteligente é bancar o idiota diante de um idiota que banca o inteligente".
On 9/16/07, Salatiel Filho <salatiel.filho@gmail.com> wrote:> Hi guys, i have a little doubt ; > I have eth0 ethernet and eth1 wireless , and they are bridged in br0 > > Is there any difference in the behavior between do > > tc qdisc add dev br0 root sfq > > OR > > tc qdisc add dev eth0 root sfq && tc qdisc add dev eth1 root sfq > >Yes. Only local traffic is passed trough br0 and only all interface traffic is passed trough each interface.> > -- > []''s > Salatiel > > "O maior prazer do inteligente é bancar o idiota > diante de um idiota que banca o inteligente". > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >-- Marco Casaroli SapucaiNet Telecom +55 35 34712377 ext. 5
On Tue, 18 Sep 2007 00:33:11 -0300 "Marco Aurelio" <marco.casaroli@gmail.com> wrote:> On 9/16/07, Salatiel Filho <salatiel.filho@gmail.com> wrote: > > Hi guys, i have a little doubt ; > > I have eth0 ethernet and eth1 wireless , and they are bridged in br0 > > > > Is there any difference in the behavior between do > > > > tc qdisc add dev br0 root sfq > > > > OR > > > > tc qdisc add dev eth0 root sfq && tc qdisc add dev eth1 root sfq > > > > > > Yes. Only local traffic is passed trough br0 and only all interface > traffic is passed trough each interface. >Also since bridge is a pseudo device it has no transmit queue so there is no qdisc involved. -- Stephen Hemminger <shemminger@linux-foundation.org>
On 18 Sep 2007, shemminger@linux-foundation.org wrote:> Also since bridge is a pseudo device it has no transmit queue so there > is no qdisc involved.Just out of curiosity (I did not look at bridging details at all yet): Is this 2.6.x specific? Because on some linksys router with tomato firmware after a adding a qdisc to br0 i get: # uname -a Linux linksys 2.4.20 #43 Sun May 20 18:08:39 PDT 2007 mips unknown # ifconfig br0 br0 Link encap:Ethernet HWaddr 00:XX inet addr:192.168.XX Bcast:192.168.XX Mask:255.255.255.128 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:201070 errors:0 dropped:0 overruns:0 frame:0 TX packets:208548 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:32140173 (30.6 MiB) TX bytes:233464694 (222.6 MiB) # tc -s qdisc show dev br0 qdisc tbf 8002: rate 50000Kbit burst 5993b lat 6.1ms Sent 233670717 bytes 208735 pkts (dropped 0, overlimits 18) Greetings Jens
On 9/18/07, Jens Thiele <karme@berlios.de> wrote:> > On 18 Sep 2007, shemminger@linux-foundation.org wrote: > > > Also since bridge is a pseudo device it has no transmit queue so there > > is no qdisc involved. > > Just out of curiosity (I did not look at bridging details at all yet): > Is this 2.6.x specific? > Because on some linksys router with tomato firmware after a adding a > qdisc to br0 i get: > > # uname -a > Linux linksys 2.4.20 #43 Sun May 20 18:08:39 PDT 2007 mips unknown > # ifconfig br0 > br0 Link encap:Ethernet HWaddr 00:XX > inet addr:192.168.XX Bcast:192.168.XX > Mask:255.255.255.128 > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > RX packets:201070 errors:0 dropped:0 overruns:0 frame:0 > TX packets:208548 errors:0 dropped:0 overruns:0 carrier:0 > collisions:0 txqueuelen:0 > RX bytes:32140173 (30.6 MiB) TX bytes:233464694 (222.6 MiB) > > # tc -s qdisc show dev br0 > qdisc tbf 8002: rate 50000Kbit burst 5993b lat 6.1ms > Sent 233670717 bytes 208735 pkts (dropped 0, overlimits 18) > > Greetings > Jens > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >This is exactly the piece of hardware i am doing tests. A WRT54G with dd-wrt micro. And i also have: tc -s qdisc show dev br0 qdisc sfq 8001: limit 128p quantum 1514b Sent 2814 bytes 38 pkts (dropped 0, overlimits 0) and i redirect all traffic in br0 to a IMQ device and i can shape internet natted traffic using htb and it works with no problems. -- []''s Salatiel "O maior prazer do inteligente é bancar o idiota diante de um idiota que banca o inteligente". _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
On 9/18/07, Salatiel Filho <salatiel.filho@gmail.com> wrote:> > > > On 9/18/07, Jens Thiele <karme@berlios.de> wrote: > > > > On 18 Sep 2007, shemminger@linux-foundation.org wrote: > > > > > Also since bridge is a pseudo device it has no transmit queue so there > > > is no qdisc involved. > > > > Just out of curiosity (I did not look at bridging details at all yet): > > Is this 2.6.x specific? > > Because on some linksys router with tomato firmware after a adding a > > qdisc to br0 i get: > > > > # uname -a > > Linux linksys 2.4.20 #43 Sun May 20 18:08:39 PDT 2007 mips unknown > > # ifconfig br0 > > br0 Link encap:Ethernet HWaddr 00:XX > > inet addr:192.168.XX Bcast:192.168.XX > > Mask: 255.255.255.128 > > UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 > > RX packets:201070 errors:0 dropped:0 overruns:0 frame:0 > > TX packets:208548 errors:0 dropped:0 overruns:0 carrier:0 > > collisions:0 txqueuelen:0 > > RX bytes:32140173 (30.6 MiB) TX bytes:233464694 (222.6 MiB) > > > > # tc -s qdisc show dev br0 > > qdisc tbf 8002: rate 50000Kbit burst 5993b lat 6.1ms > > Sent 233670717 bytes 208735 pkts (dropped 0, overlimits 18) > > > > Greetings > > Jens > > _______________________________________________ > > LARTC mailing list > > LARTC@mailman.ds9a.nl > > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc > > > > This is exactly the piece of hardware i am doing tests. A WRT54G with > dd-wrt micro. And i also have: > > tc -s qdisc show dev br0 > qdisc sfq 8001: limit 128p quantum 1514b > Sent 2814 bytes 38 pkts (dropped 0, overlimits 0) > > and i redirect all traffic in br0 to a IMQ device and i can shape internet > natted traffic using htb and it works with no problems. > > -- > []''s > Salatiel > > "O maior prazer do inteligente é bancar o idiota > diante de um idiota que banca o inteligente". >Well , i just did a few tests here and i can use htb on br0. Although there are still a few things that i do not understand, for example: I have a default htb class 1:99 limited to 8kb/s , and one main class with 512kbit/s which is equally distributed to two childs with rate 256 and ceil 512. i marked the packets using iptables -j CLASSIFY, and everything is working, each child can download at the expected rate , and any other machine not specified in the iptables are automatically shaped to 8kb/s as expected. But the doubt is : to mark i use iptables -t mangle -A POSTROUTING -s ! 192.168.254.0/24 -d MACHINE_IP_TO_BE_SHAPED -j CLASSIFY --set-class x:yz, this way traffic coming from my local network to my local network would not be shaped , but i was thinking , should not this traffic enter in default class ? I can transfer from one wireless machine to a ethernet machine [both in the br0] at 2Mbps , what means it is not being shaped at all. [This is what i wanted , but i do not understand why it is not going in default class] ~ # tc -s qdisc ls dev br0 qdisc htb 1: r2q 10 default 99 direct_packets_stat 4 Sent 41307007 bytes 29496 pkts (dropped 556, overlimits 9552) ~ # tc -s class ls dev br0 class htb 1:99 root prio 0 rate 8000bit ceil 8000bit burst 1609b cburst 1609b Sent 112219 bytes 846 pkts (dropped 134, overlimits 0) rate 336bit lended: 846 borrowed: 0 giants: 0 tokens: 2366718 ctokens: 2366718 class htb 1:1 root rate 512000bit ceil 512000bit burst 2284b cburst 2284b Sent 41278639 bytes 28838 pkts (dropped 0, overlimits 0) rate 10000bit 2pps lended: 12098 borrowed: 0 giants: 0 tokens: 18141 ctokens: 18141 class htb 1:2 parent 1:1 prio 0 rate 256000bit ceil 512000bit burst 1919b cburst 2239b Sent 37306226 bytes 25556 pkts (dropped 410, overlimits 0) rate 3912bit 1pps lended: 14308 borrowed: 11248 giants: 0 tokens: -45271 ctokens: 14551 class htb 1:3 parent 1:1 prio 0 rate 256000bit ceil 512000bit burst 1919b cburst 2239b Sent 3972413 bytes 3282 pkts (dropped 12, overlimits 0) rate 5384bit lended: 2432 borrowed: 850 giants: 0 tokens: 90105 ctokens: 52787 -- []''s Salatiel "O maior prazer do inteligente é bancar o idiota diante de um idiota que banca o inteligente". _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc