Open frebib opened 1 month ago
To understand this better I have a few questions:
Q1: is there a "bond0.40" netdev on this server that also has MAC address == 1E43BED99C90, same as bond0.10 ? Q2: What is the MAC address associated with the physical interface eth2? Q3: the pcap you took of the ping - where did you tap to get those packets? In other words, what was the tcpdump command that you used? Was it something like "tcpdump -i eth2 ..." Q4: please send the contents of /etc/hsflowd.conf Q5: an example of what a packet samples looks like in sflowtool(1) would be helpful too.
From the point of view of the sFlow standard, the correct thing to export as the inputPort/outputPort is probably the ifIndex of the physical interface "eth2". The collector would still see the 802.1Q header to get the VLAN tag and the PPPoE header to get the PPP port number. But it looks like hsflowd is trying to follow the MAC that it finds in the sampled packet header to arrive at some deeper truth, when maybe it's shouldn't in this case.
4: eth2: <BROADCAST,MULTICAST,SLAVE,UP,LOWER_UP> mtu 9710 qdisc mq master bond0 state UP mode DEFAULT group default qlen 1000
link/ether 1e:43:be:d9:9c:90 brd ff:ff:ff:ff:ff:ff permaddr f8:f2:1e:3a:67:59
altname enp1s0f1
6: bond0: <BROADCAST,MULTICAST,MASTER,UP,LOWER_UP> mtu 9710 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 1e:43:be:d9:9c:90 brd ff:ff:ff:ff:ff:ff
7: bond0.10@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9710 qdisc cake state UP mode DEFAULT group default qlen 1000
link/ether 1e:43:be:d9:9c:90 brd ff:ff:ff:ff:ff:ff
8: bond0.20@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9710 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 1e:43:be:d9:9c:90 brd ff:ff:ff:ff:ff:ff
9: bond0.30@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9710 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 1e:43:be:d9:9c:90 brd ff:ff:ff:ff:ff:ff
10: bond0.40@bond0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9710 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 1e:43:be:d9:9c:90 brd ff:ff:ff:ff:ff:ff
13: pppoe0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc fq_codel state UNKNOWN mode DEFAULT group default qlen 3
link/ppp
alias wan
eth2
specifically: tcpdump -enni eth2 ether[0x0c:2] == 0x8863 or ether[0x0c:2] == 0x8864
(to show PPP ethertype packets). Using -i any
/LINUX_SLL2
doesn't show nearly as much PPP which I understand is "by design"/a thing that Linux does, apparently.
frebib@zeus# cat /run/sflow/hsflowd.conf
# Genereated by /usr/libexec/vyos/conf_mode/system_sflow.py
# Parameters http://sflow.net/host-sflow-linux-config.php
sflow {
polling=30
sampling=1000
sampling.bps_ratio=0
agentIP=
5. I'll have to get back to you on this another day, I've run out of time for today.
Thanks for the questions so far :)
OK, that all makes sense so far except that it's not clear to me exactly when the MAC address is changed from 1e:43:be:d9:9c:90 to 80:7f:f8:74:c8:db. I would have guessed that when tcpdump uses a libpcap call to tap eth2 it would look the same as when hsflowd mod_pcap uses the a libpcap call to tap eth2. However it looks like they are tapping at different places in the pipeline.
Looking forward to seeing the packet-sample as printed by sflowtool. Perhaps that will make things more clear. When you send that, please also reiterate, for this issue thread, what you consider to be wrong there.
ref https://vyos.dev/T6762
Running hsflowd with -ddd also tells me the same thing:
Looks like Linux doesn't provide the PPPoE interface MAC via SIOCGIFHWADDR, which I think makes sense
Same as
iproute2 also shows this too (where bond0.10 is the underlying interface)
Here is a pcap of a ping to a resolver showing the PPP packets in either direction
The only place I see that MAC address is in proc/net/pppoe
I presume it's synthesised by the kernel for the virtual PPP device