Re: how do you rate limit routable traffic without rate limiting LAN protocols like arps and igmp?

Linux Advanced Routing and Traffic Control

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

 



Michael A. D'Annunzio wrote:
> I know if I remove the default parameter, traffic not matching
> any filter is sent over the root queue, but I need to have a defined
> default.

Define the default for whatever you wish to have as the default class
for non-ip traffic and then filter _all_ ip traffic into a certain
class, eg:

  tc filter add dev $DEV parent 1: protocol ip prio 18 u32 \
     match ip dst 0.0.0.0/0 flowid 1:20

Or, even more modularily, use the MARK target at the end of your
iptables ruleset after all other markings:

  iptables -t mangle -A POST_ROUTING -m mark --mark 0 -j MARK --set-mark 3
  iptables -t mangle -A OUTPUT -m mark --mark 0 -j MARK --set-mark 3

And then just setup your tc to match the marks to classes:

  tc filter add dev $DEV parent 1: protocol ip prio 10 \
      handle 3 fw \
      flowid 1:30

Or a variety of other solutions.

I am not sure if this will solve your problem exactly, though - since
having problems with ARP traffic and so seems really odd.

-- Naked


_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

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