Hi, I have several specific filters classifying packets into different classes, and in addition to those I would like to have a filter with low priority (filters are matched in priority order, right?) which matches everything, in order to explicitly put such traffic where it belongs. Is there a cleaner way to do this than using the u32 filter and matching a random field with a zero mask? //Marcus -- ---------------------------------------+-------------------------- Marcus Sundberg <marcus@ingate.com> | Firewalls with SIP & NAT Firewall Developer, Ingate Systems AB | http://www.ingate.com/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Wednesday 04 September 2002 09:27, Marcus Sundberg wrote:> Hi, > > I have several specific filters classifying packets into different > classes, and in addition to those I would like to have a filter > with low priority (filters are matched in priority order, right?) > which matches everything, in order to explicitly put such traffic > where it belongs. Is there a cleaner way to do this than using > the u32 filter and matching a random field with a zero mask?If you use htb you can use the default option. This determines the class where all non-classified packets will be put. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene <stef.coene@docum.org> writes:> If you use htb you can use the default option. This determines the class > where all non-classified packets will be put.Yeah I know, but I use several different qdiscs and would prefer to have a general way to do it with filters. //Marcus -- ---------------------------------------+-------------------------- Marcus Sundberg <marcus@ingate.com> | Firewalls with SIP & NAT Firewall Developer, Ingate Systems AB | http://www.ingate.com/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Wednesday 04 September 2002 20:17, Marcus Sundberg wrote:> Stef Coene <stef.coene@docum.org> writes: > > If you use htb you can use the default option. This determines the class > > where all non-classified packets will be put. > > Yeah I know, but I use several different qdiscs and would prefer to > have a general way to do it with filters.The I think the u32 trick is the best you can do. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Jose Luis Domingo Lopez
2002-Sep-04 21:27 UTC
Re: How to match all packets with a tc filter
On Wednesday, 04 September 2002, at 20:27:27 +0200, Stef Coene wrote:> > Yeah I know, but I use several different qdiscs and would prefer to > > have a general way to do it with filters. > The I think the u32 trick is the best you can do. >Or tag all traffic with ipchains/iptables and add a tc filter of type fwmark matching this tag. -- Jose Luis Domingo Lopez Linux Registered User #189436 Debian Linux Woody (Linux 2.4.19-pre6aa1) _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Jose Luis Domingo Lopez <lartc@24x7linux.com> writes:> On Wednesday, 04 September 2002, at 20:27:27 +0200, > Stef Coene wrote: > > > > Yeah I know, but I use several different qdiscs and would prefer to > > > have a general way to do it with filters. > > The I think the u32 trick is the best you can do. > > > Or tag all traffic with ipchains/iptables and add a tc filter of type > fwmark matching this tag.I''m already using fwmark matching for everything except the default filter. Because fwmark doesn''t have a mask but only does exact matches I can''t use that for the default filter without generating lots of extra iptables rules. //Marcus -- ---------------------------------------+-------------------------- Marcus Sundberg <marcus@ingate.com> | Firewalls with SIP & NAT Firewall Developer, Ingate Systems AB | http://www.ingate.com/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 05 September 2002 18:49, Marcus Sundberg wrote:> Jose Luis Domingo Lopez <lartc@24x7linux.com> writes: > > On Wednesday, 04 September 2002, at 20:27:27 +0200, > > > > Stef Coene wrote: > > > > Yeah I know, but I use several different qdiscs and would prefer to > > > > have a general way to do it with filters. > > > > > > The I think the u32 trick is the best you can do. > > > > Or tag all traffic with ipchains/iptables and add a tc filter of type > > fwmark matching this tag. > > I''m already using fwmark matching for everything except the default > filter. Because fwmark doesn''t have a mask but only does exact > matches I can''t use that for the default filter without generating > lots of extra iptables rules.Only one iptables rule is needed. As first rule in the iptables list, match all packets with 1. Then process the rules in the iptables list and mark the packets with an other mark if you want. All packets not matched again, will keep the mark 1. This is your "default" mark. You only need a filter to put the packets marked with 1 in a default class and you have your default filter. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/