Skip to contentSkip to conversation

netflow/sflow & Linux

DISCUSSION Abraham van der Merwe 4 participants 6 messages Mar 22, 2004 – Mar 28, 2004 netfilter

lore
Share & tools
lore
#0 lore raw

Hi!

Has anyone done any work to enable Linux to do netflow (capturing not processing)?

If not, why not and what needs to be done?

Signature · 12 lines
Regards
 Abraham

TODAY the Pond!
TOMORROW the World!
                -- Frogs (1972)

___________________________________________________
 Abraham vd Merwe - Frogfoot Networks CC
 1st Floor, Albion Springs, 183 Main Road, Newlands
 Phone: +27 21 689 3873 Cell: +27 82 565 4451
 Http: http://www.frogfoot.net/ Email: [email protected]
#1 lore raw
Quoted 2 lines · Abraham van der Merwe

Has anyone done any work to enable Linux to do netflow (capturing not processing)?

See www.ntop.org

Regards
Henrik

#2 lore raw

Hi Henrik >@2004.03.22_15:31:00_+0200

Quoted 4 lines
Quoted 2 lines

Has anyone done any work to enable Linux to do netflow (capturing not processing)?

See www.ntop.org

Yes, I know about that, but ntop is rather limited because it is just based on libpcap.

Maybe I should rephrase the question:

Has anyone done any work to do netflow in Linux the "real" way, i.e.

(a) keep a "flow" in kernel space AND record routing information (e.g. AS numbers would by extremely useful although we'd need some way for Zebra to pass this information to the kernel).

(b) export that flow to userspace again.

My main gripe with ntop is that it can't record AS numbers. This is very useful! It also means that were missing out on connection tracking which would've been really useful (this is something Cisco, etc can't do yet).

Signature · 12 lines
Regards
 Abraham

TODAY the Pond!
TOMORROW the World!
                -- Frogs (1972)

___________________________________________________
 Abraham vd Merwe - Frogfoot Networks CC
 1st Floor, Albion Springs, 183 Main Road, Newlands
 Phone: +27 21 689 3873 Cell: +27 82 565 4451
 Http: http://www.frogfoot.net/ Email: [email protected]
#3 lore raw
Quoted 2 lines · Abraham van der Merwe

Yes, I know about that, but ntop is rather limited because it is just based on libpcap.

I don't see what is wrong with that.

Quoted 3 lines

(a) keep a "flow" in kernel space AND record routing information (e.g. AS numbers would by extremely useful although we'd need some way for Zebra to pass this information to the kernel).

You could just as well extend ntop/nprobe to get AS numbers from Zebra. This way you do not need to burden the kernel with stream reassebly of forwarded traffic etc for the more advanced flow analyses.

Quoted 4 lines

(b) export that flow to userspace again.

My main gripe with ntop is that it can't record AS numbers. This is very useful!

Neither can the kernel without modifications. AS numbers exists in userspace.

Quoted 2 lines

It also means that were missing out on connection tracking which would've been really useful (this is something Cisco, etc can't do yet).

Why bloat the kernel with connection tracking only for netflow statistics?

Regards
Henrik

#4 lore raw

Hi,

Quoted 4 lines · Henrik Nordstrom
Quoted 2 lines

Yes, I know about that, but ntop is rather limited because it is just based on libpcap.

I don't see what is wrong with that.

I used to think there are serious scalability problems with the
libpcap approach. Requiring a context switch for each and every packet simply won't work. However, yesterday I found on the ntop site that there are serious improvements in this area, so now it _is_ possible to process flows on gigabit interfaces using libpcap. Have a look at
http://luca.ntop.org/Ring.pdf, I think it is well worth reading.

Signature · 2 lines
 Regards,
   Krisztian KOVACS
#5 lore raw
In reply to Abraham van der Merwe
Quoted 10 lines · Abraham van der Merwe

Hi Henrik >@2004.03.22_15:31:00_+0200

Quoted 4 lines
Quoted 2 lines

Has anyone done any work to enable Linux to do netflow (capturing not processing)?

See www.ntop.org

Yes, I know about that, but ntop is rather limited because it is just based on libpcap.

Quoted 7 lines

Maybe I should rephrase the question:

Has anyone done any work to do netflow in Linux the "real" way, i.e.

(a) keep a "flow" in kernel space AND record routing information (e.g. AS numbers would by extremely useful although we'd need some way for Zebra to pass this information to the kernel).

No. Please see the mailinglist archives, this has been discussed over and over and over again.

All you need to do is add per-direction byte and packet counters to struct ip_conntrack, update them for every packed and use ctnetlink to receive this information once a connection is deleted from the conntrack table.

As easy as it is, nobody has implemented it yet..

Quoted 2 lines

Regards
Abraham

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie