rate limiting netmask w/ dd-wrt

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm trying to setup a DD-WRT router (www.dd-wrt.com; embedded micro-device linux for the uninitiated) to rate limit all the traffic it receives from its wi-fi interface. I followed the instructions from the cookbook section on rate limiting ( http://lartc.org/howto/lartc.ratelimit.single.html), but it doesn't appear to be working. I tested by checking my laptop's bandwidth on http://www.speakeasy.net/speedtest/. Here's the commands I issued to tc:

# tc qdisc add dev $DEV root handle 1: cbq avpkt 1000 bandwidth 10mbit
# tc class add dev $DEV parent 1: classid 1:1 cbq rate 512kbit allot 1500 prio 5 bounded isolated
# tc filter add dev $DEV parent 1: protocol ip prio 16 u32 match ip src 192.168.1.0/24 flowid 1:1

I replaced $DEV with each interface name in succession, as I wasn't sure which to use. Here's the output of ifconfig from the router:

# ifconfig
br0       Link encap:Ethernet  HWaddr 00:16:01:59:EF:00 
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:114200 errors:0 dropped:0 overruns:0 frame:0
          TX packets:125307 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:14568079 (13.8 MiB)  TX bytes:71752923 ( 68.4 MiB)

eth0      Link encap:Ethernet  HWaddr 00:16:01:59:EF:00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64266 errors:0 dropped:0 overruns:0 frame:0
          TX packets:54720 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:65677538 (62.6 MiB)  TX bytes:12736990 (12.1 MiB)
          Interrupt:4

eth1      Link encap:Ethernet  HWaddr 00:16:01:59:EF:02 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:117891 errors:0 dropped:0 overruns:0 frame:253671
          TX packets:133961 errors:3 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:16589572 ( 15.8 MiB)  TX bytes:75539860 (72.0 MiB)
          Interrupt:2 Base address:0x5000

lo        Link encap:Local Loopback 
          inet addr:127.0.0.1  Mask: 255.0.0.0
          UP LOOPBACK RUNNING MULTICAST  MTU:16436  Metric:1
          RX packets:46 errors:0 dropped:0 overruns:0 frame:0
          TX packets:46 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:5328 (5.2 KiB)  TX bytes:5328 (5.2 KiB)

vlan0     Link encap:Ethernet  HWaddr 00:16:01:59:EF:00 
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:5570 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:1086810 (1.0 MiB)

vlan1     Link encap:Ethernet  HWaddr 00:16:01:59:EF:01 
          inet addr:192.168.10.138  Bcast:192.168.10.255  Mask:255.255.255.0
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:64281 errors:0 dropped:0 overruns:0 frame:0
          TX packets:49178 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:64522436 (61.5 MiB)  TX bytes:11432967 ( 10.9 MiB)


Can anyone tell me what I'm doing wrong here?

Best,
Ryan
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux