I have the following test script for tc. I have a problem. Nature of which i will explain at the end of all my config details. tc qdisc del dev ppp0 root tc qdisc add dev ppp0 root handle 1:0 cbq bandwidth 1500Kbit avpkt 1000 cell 8 tc class add dev ppp0 parent 1:0 classid 1:1 cbq bandwidth 1500Kbit rate 1450Kbit prio 8 weight 140Kbit allot 1514 cell 8 max burst 20 avpkt 1000 tc class add dev ppp0 parent 1:1 classid 1:2 cbq bandwidth 1500Kbit rate 1000Kbit prio 5 weight 100Kbit allot 1514 cell 8 max burst 20 avpkt 1000 bounded tc class add dev ppp0 parent 1:1 classid 1:3 cbq bandwidth 1500Kbit rate 1200Kbit prio 5 weight 120Kbit allot 1514 cell 8 max burst 20 avpkt 1000 bounded tc class add dev ppp0 parent 1:1 classid 1:4 cbq bandwidth 1500Kbit rate 60Kbit prio 5 weight 0.06Mbit allot 1514 cell 8 maxb urst 20 avpkt 1000 bounded tc qdisc add dev ppp0 parent 1:2 handle 30: sfq tc qdisc add dev ppp0 parent 1:3 handle 40: sfq tc qdisc add dev ppp0 parent 1:4 handle 50: sfq tc filter add dev ppp0 parent 1:0 protocol ip prio 11 u32 match ip protocol 1 0xff flowid 1:4 The machien in questions (the one i am writing this on) is a simple gateway machine that lets my housemates access the internet. It has 3 NICs connected to the internal net, cable modem and adsl modem. What i was trying to test with the about setup was to see if I can put a limite on the adsl interface. After i ran the above test setup ( without any complains from tc) i then tried to ping random servers on the internet. Hopeing to test the setup.~~ But nothing happens there is no limit on PING. tc -s filter ls dev ppp0 shows nothing passing through tc not even the root qdisc. So my question is does TC only works on traffic passing through my gateway? In that case I am just barking up the wrong tree here. Or is there something i can do to limit host based traffic. So my question is does TC only works on traffic passing through my gateway? In that case I am just barking up the wrong tree here. Or is there something i can do to limit host based traffic. Also with my current setup say if i use a filter with fwmark could i limit my housemate''s porn grabbing bandwidth? Or would i again see tc doing totally nothing? Thanks Sebastian Ip
On Sat, Dec 29, 2001 at 03:50:32PM -0500, Sebastian C K Ip wrote:> But nothing happens there is no limit on PING. tc -s filter ls dev ppp0 > shows nothing passing through tc not even the root qdisc.And tc -s qdisc ls dev ppp0, and tc -s class ls dev ppp0? If these also show nothing I''ll take a better look.> So my question is does TC only works on traffic passing through my > gateway? In that case I am just barking up the wrong tree here. Or is > there something i can do to limit host based traffic.It works on all traffic leaving an interface.> Also with my current setup say if i use a filter with fwmark could i limit > my housemate''s porn > grabbing bandwidth? Or would i again see tc doing totally nothing?Yes, that would work. Assign an fwmark on the interfaces where the porn packets are coming in and limit the speed of fwmarked traffic on the ethernet interface to your house network. In my experience, *most* bandwidth problems are warez or porn related :-) -- http://www.PowerDNS.com Versatile DNS Software & Services http://www.tk the dot in .tk Netherlabs BV / Rent-a-Nerd.nl - Nerd Available - Linux Advanced Routing & Traffic Control: http://ds9a.nl/lartc