[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[altq 1135] Re: parent classes with filters and priorities ?
Peter Galbavy wrote:
> This is a genaral question about how filters are prioritised and selected
> and then specifically for what I am doing;
> This is a section of my manually generated config; soon to be automatic:
> class cbq nge0 customers root_class priority 2 pbandwidth 10 default
> filter nge0 customers 184.108.40.206 netmask 255.255.248.0 0 0 0 0
> filter nge0 customers 220.127.116.11 netmask 255.255.255.0 0 0 0 0
> filter nge0 customers 18.104.22.168 netmask 255.255.255.0 0 0 0 0
> class cbq nge0 knowtion customers borrow priority 3 exactbandwidth 2M red
> filter nge0 knowtion 0 0 22.214.171.124 netmask 255.255.248.0 0 0
> filter nge0 knowtion 0 0 126.96.36.199 netmask 255.255.255.0 0 0
> filter nge0 knowtion 0 0 188.8.131.52 netmask 255.255.255.0 0 0
> nge0 is a 1000BaseT interface from an edge router to the core network. What
> I want to achieve is:
> 1. define traffic queues from the customer to the rest of the world
> 2. ignore restrictions if the destination is for another customer / customer
I'm not sure if I understand your intension but
- in the altq filter syntax, <dest addr> comes first.
(this might be confusing but there are historical reasons...)
- if nge0 is an interface from edge to core, it shouldn't have
outgoing traffic both from and to the same customer...
> When I use this config, altqd warns that the later filters may override the
> earlier ones. I also tried placing both these classes under the same parent
> (rather than one under the other), but with similar warnings.
> To help me clarify whether or not I can ignore these warnings, could someone
> with more understanding please explain what the decision process is in
> matchinng filters ? First matched ? Last matched ? etc.
It is described in altq-3.0/docs/TIPS.txt (or
http://www.csl.sony.co.jp/~kjc/software/TIPS.txt) section 2.2.
> Do filters in parent classes limit what gets checked in lower level classes
> ? Should they maybe ?
The filter order has nothing to do with the relation of classes.
Only the order of the filter rules matters.
> Also, in general, how does a large number of filters effect performance ? Is
> the matching done via a hash or other fast look up or is it a linear search
ALTQ uses a linear search for wildcard filters.
Fixed filters which has all the fields specified are hashed.
> Can I suggest that whoever is working on filters looks at the work done
> recently on OpenBSD pf in case there are things there that could be used in
> the classifiers in altq ?
Probably, we need a classifier version of ALTQ, say ALTCF :)