Netflow on vlan and pppoe

Started by bestboy, February 23, 2023, 07:44:00 PM

Previous topic - Next topic
February 23, 2023, 07:44:00 PM Last Edit: February 23, 2023, 07:47:52 PM by bestboy
Hi,

I have trouble setting up Netflow. It seems to not support VLAN interfaces nor PPPoE interfaces, which is basically all I have. None of my interfaces seem to be able to collect any data. My cache tab is empty.


root@cepheus:~ # uname -a
FreeBSD cepheus.home.lan 13.1-RELEASE-p6 FreeBSD 13.1-RELEASE-p6 stable/23.1-n250396-d34cd428508 SMP amd64

root@cepheus:~ # df -H
Filesystem                  Size    Used   Avail Capacity  Mounted on
/dev/gpt/rootfs             239G    2.0G    218G     1%    /
devfs                       1.0k    1.0k      0B   100%    /dev
/dev/gpt/efifs               268M    1.8M    267M     1%    /boot/efi
devfs                       1.0k    1.0k      0B   100%    /var/dhcpd/dev
devfs                       1.0k    1.0k      0B   100%    /var/unbound/dev
/usr/local/lib/python3.9    239G    2.0G    218G     1%    /var/unbound/usr/local/lib/python3.9

root@cepheus:~ # cat /usr/local/etc/netflow.conf
#
# Automatic generated configuration for netflow.
# Do not edit this file manually.
#
netflow_interfaces="vlan0.1.12 vlan0.1.23 vlan0.1.3 pppoe0 "
netflow_egress_only="pppoe0  "
netflow_version="9"
netflow_int_destination="127.0.0.1:2055"
netflow_destinations="127.0.0.1:2056"
netflow_active_timeout=1800
netflow_inactive_timeout=15

root@cepheus:~ # cat /var/log/flowd.log


root@cepheus:~ # ll /var/netflow/
total 100
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 dst_port_000300.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 dst_port_003600.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 dst_port_086400.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 interface_000030.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 interface_000300.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 interface_003600.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 interface_086400.sqlite
-rw-r-----  1 root  wheel  12288 Feb 23 19:14 metadata.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 src_addr_000300.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 src_addr_003600.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 src_addr_086400.sqlite
-rw-r-----  1 root  wheel   8192 Feb 23 19:14 src_addr_details_086400.sqlite

root@cepheus:~ # /usr/local/etc/rc.d/netflow restart
setup vlan0.1.12
ngctl: send msg: Invalid argument
error vlan0.1.12: cannot create netflow node for vlan0.1.12

setup vlan0.1.23
ngctl: send msg: Invalid argument
error vlan0.1.23: cannot create netflow node for vlan0.1.23
setup vlan0.1.3
ngctl: send msg: Invalid argument
error vlan0.1.3: cannot create netflow node for vlan0.1.3
setup pppoe0 [egress only]
ngctl: send msg: No such file or directory
error pppoe0: cannot create netflow node for pppoe0



I have named the VLAN interfaces according to this pattern vlan0.<interface-id>.<vlan-id>
with interface-id 0 for igb0 and interface-id 1 for igb1. I believe that should be fine.

Any help is appreciated.

The issue seems only to exist for VLAN interfaces. Physical interfaces are working fine.

I created a bug report for it: https://github.com/opnsense/core/issues/6357

The same here. I have several devices with the same version, where all interfaces are connected via VLAN except for the management interface. For weeks I've been searching like a maniac, why no data is coming up at Netflow. The hint with "/usr/local/etc/rc.d/netflow restart" finally led to the realization that I don't have to look for the problem 60 cm in front of the screen. Now I hope that there will be a solution for this soon.

Thanks, bestboy for creating a bug report!