Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 16 Sep 2012 22:28:38 -0400
From:      Zaphod Beeblebrox <zbeeble@gmail.com>
To:        Mike Tancsa <mike@sentex.net>
Cc:        freebsd-net@freebsd.org, Ivan Alexandrovich <ivsan@ngs.ru>
Subject:   Re: getting counters for a plenty of vlan ifaces
Message-ID:  <CACpH0MeLgpVYFf=8Ok6Qf-1x02OrsErn7szPkwTB8rwkwe_%2BPA@mail.gmail.com>
In-Reply-To: <50564BE9.6050104@sentex.net>
References:  <web-25219141@mx16.intranet.ru> <50564BE9.6050104@sentex.net>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, Sep 16, 2012 at 6:00 PM, Mike Tancsa <mike@sentex.net> wrote:
> On 9/16/2012 10:41 AM, Ivan Alexandrovich wrote:
>>
>> We are running freebsd9.0 on a router with
>> more than 1000 of subscriber's vlan interfaces.
>> Outgoing packet rate is approximately 40 kpps.
>>
>> There's a need to collect bytes and packets
>> counters for all those vlan interfaces every
>> minute (or even twice a minute) and store them
>
> Hi,
>         We approach it a little differently and collect all the data via
> netflow, or in this case argus.  I sample the parent interface and save
> all the flow data which argus is smart enough to parse out at the vlan
> level.  You can then run all sorts of fine grained reports this way.  We
> use it on a system with about 900 ng interfaces.

I know that many people like netflow, but consider you're adding a
processing point per packet to solve a once per minute interface
sample.  Netflow has always struck me as a solution for closed systems
--- giving access to all possible information at moderate expense such
that you would then never have an excuse to want changes in the
operating system of the router.

It strikes me that a little kernel module that provided a kernel call
that (when called) walked the list of interfaces (in kernel) building
a table as described and then shipping that table to userland in one
go would be exceedingly cheep to call.  It would also not be part of
the packet forwarding path and not a potential constant cost during a
DDOS.  If someone wanted me to write a little .ko for that and an
associated userland utility, I'd be happy to do the work.



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACpH0MeLgpVYFf=8Ok6Qf-1x02OrsErn7szPkwTB8rwkwe_%2BPA>