How to match all packets with a tc filter
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
Signature · 6 lines
---------------------------------------+-------------------------- Marcus Sundberg <[email protected]> | Firewalls with SIP & NAT Firewall Developer, Ingate Systems AB | http://www.ingate.com/ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 8 lines · Marcus Sundberg
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
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 2 lines · Stef Coene
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
Signature · 6 lines
---------------------------------------+-------------------------- Marcus Sundberg <[email protected]> | Firewalls with SIP & NAT Firewall Developer, Ingate Systems AB | http://www.ingate.com/ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 6 lines · Marcus Sundberg
Quoted 2 lines · Stef Coene
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
Signature · 8 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 4 lines · Stef Coene
Quoted 2 lines
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.
Signature · 5 lines
Jose Luis Domingo Lopez Linux Registered User #189436 Debian Linux Woody (Linux 2.4.19-pre6aa1) _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 9 lines · Jose Luis Domingo Lopez
Quoted 4 lines · Stef Coene
Quoted 2 lines
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
Signature · 6 lines
---------------------------------------+-------------------------- Marcus Sundberg <[email protected]> | Firewalls with SIP & NAT Firewall Developer, Ingate Systems AB | http://www.ingate.com/ _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 9 lines · Marcus Sundberg
Quoted 8 lines · Jose Luis Domingo Lopez
On Wednesday, 04 September 2002, at 20:27:27 +0200,
Quoted 4 lines · Stef Coene
Quoted 2 lines
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.
Quoted 7 lines
Quoted 2 lines
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
Signature · 9 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.oftc.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/