Tag Netflow v9 packets as Ingress on the INPUT_SNMP ifindex and Egress on the OUTPUT_SNMP ifindex

Description

When a Netflow v9 packet's DIRECTION field contains an invalid value, OpenNMS defaults to tagging it as INGRESS.

RFC 3954 also defines INPUT_SNMP and OUTPUT_SNMP fields, which identify the ifIndex of the interface(s) involved in the conversation.

Those fields can be used to tag a packet's direction when the DIRECTION field is invalid, instead of using an arbitrary default direction.

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

fooker July 1, 2022 at 1:57 PM

Will Keaney June 21, 2022 at 5:31 PM

The issue we have is when DIRECTION is neither 0 nor 1, but we want to graph ingress and egress relative to a specific interface.

For example, given interface eth0-wan with ifIndex: 8 and some bridge or tap interface with ifIndex: 42 on the same router, we're seeing many packets with INPUT_SNMP 42OUTPUT_SNMP 8, and DIRECTION 255. Currently, OpenNMS sets netflow.direction 0 in this case, and thus those flows will always be displayed as INGRESS. But we know that packets leaving eth0-wan are egress.

This is further complicated by using Linux-based routers, because Linux is not capable of preserving ifIndex across restarts. So while eth0-wan had index 8 last week, it might have index 10 tomorrow.

Christian Pape May 16, 2022 at 8:12 AM
Edited

Sorry, I really do not understand this issue. Can you provide more details, what you want to achieve? INPUT_SNMP and OUTPUT_SNMP are normally both set. If only one of the fields is set this means that the traffic originates or terminates on the exporting host itself. 

See:https://www.plixer.com/blog/netflow-version-9-egress-vs-ingress/

David Hustace May 13, 2022 at 3:17 PM

Interesting.

Fixed

Details

Assignee

Reporter

HB Backlog Status

Components

Sprint

Fix versions

Affects versions

Priority

PagerDuty

Created May 11, 2022 at 3:09 PM
Updated July 5, 2022 at 5:41 PM
Resolved July 5, 2022 at 5:41 PM