I have a configuration that is ppp over vlan over bond over a physical ethernet device:
eth2 -> bond0 -> bond0.10 -> pppoe0
As I discovered, sflow only works when you attach it to the physical interfaces (not sure I understand/want to know why, but that's the only way I can get it to find any packets).
In doing so though, the collector I'm using complains that either the input or output interface is 0 in the sflow data, which I confirmed with tcpdump (they actually show as 0x3fffffff which is equivalent to 0 https://github.com/akvorado/akvorado/blob/7285c115b1a73c80c6cce6e0cdb718cc3a4e28f9/inlet/flow/decoder/sflow/root.go#L21)
Running hsflowd with -ddd also tells me the same thing:
mod_pcap:macsrc=1E43BED99C90, macdst=FEAA9ADDF555 mod_pcap:srcdev=bond0.40(10)(peer=0) takeSample: hook=0 tap=eth2 in=bond0.40 out=<not found> pkt_len=76 cap_len=76 mac_len=14 (1E43BED99C90 -> FEAA9ADDF555 et=0x8100) dbg2:selected sampler eth2 ifIndex=4 mod_pcap:macsrc=FEAA9ADDF555, macdst=1E43BED99C90 mod_pcap:dstdev=bond0.40(10)(peer=0) takeSample: hook=0 tap=eth2 in=<not found> out=bond0.40 pkt_len=163 cap_len=114 mac_len=14 (FEAA9ADDF555 -> 1E43BED99C90 et=0x8100)
Above, and in all cases, the <not found> interface is the pppoe0 interface. Traffic transits from some device in my network, through some vlans, routed by Vyos, then out of the PPP interface to the ISP. Sometimes it's the same thing in reverse
In case it's relevant, the configuration is very simple
frebib@zeus# show system sflow agent-address $localip agent-interface lo interface eth2 polling 5 sampling-rate 100 server $sflowserverip { port 6343 }
Not sure what is wrong or why this is not working. Maybe I'm just misunderstanding. Maybe this is an hsflowd bug. Any help/guidance is welcome