Re: [patch] Filtering VLANs in sflowtool

From: neil mckee <neil.mckee@inmon.com>
Date: 03/29/06
Message-Id: <1BB5DEB9-6465-4ED7-AA8E-AB4C3346D5AA@inmon.com>

Hello all,

I finally got around to adding those vlan-filtering options to
sflowtool. It is posted in source-code form only for now, since it
hasn't been tested very thoroughly yet. You can get to it via:

http://www.sflow.org > Developer Information > sFlow Developer
Tools > sFlow ToolKit

and then click the "source code" link at the bottom of the page.

To select only a subset of the vlans, you can use:
+v <include list> [ -v <exclude list> ]

or you can specify it the other way around:
-v <exclude list> [ +v <include list> ]

If you start with a +v option, then the default is to exclude.
If you start with a -v option, then the default is to include.

example1:
to select only vlans from 1 to 100 except 51 and 53, you could
use: +v 1-100 -v 51,53

example2:
to select all vlans except 1-10 and 4091, you could use: -v 1-10,4091

Note: Given that a packet may have an input vlan and an output
vlan, the rule is to include that packet if either of those vlans
passes the filter. This can be awkward if you have sFlow samples
where the switch has not explicitly indicated the vlans using the
(optional) "Switch" structure, and the decoder has found an 802.1q
header and extracted a vlan id from there. In that case the decoded
vlan is somewhat arbitrarily designated as the input_vlan and the
output_vlan is left as 0, so you have to be mindful of what filter
setting you have for vlan=0.

regards,
neil

----
Neil McKee
InMon Corp.
http://www.inmon.com
Received on Wed Mar 29 09:57:23 2006

This archive was generated by hypermail 2.1.8 : 03/29/06 PST