Hello,
I’m trying to use NetFlow with a VyOS router, but I encountered a few problems when setting up the tool.
I’m using an Ubuntu VM which allows me to replay a pcap using the tcpreplay tool, replaying this on an interface communicating with the router. The command is as follows:
sudo tcpreplay -i ens3 my_pcap.pcap
ens3 is an interface on my virtual machine that communicates with the VyOS router.
However, once my pcap has been fully replayed, it doesn’t seem to be processed by NetFlow. The show flow-accounting command returns nothing. This is strange, since a tcpdump on the VyOS router when replaying the packet shows me that packets are indeed being received at the router.
What’s more, when I send a ping from the virtual machine to the VyOS router, the packets are received and the flow-accounting command shows me that NetFlow has analyzed the ICMP packets. It returns :
Src Addr Dst Addr Sport Dport Proto Packets Bytes Flows
0.0.0.0 255.255.255.255 68 67 udp 13 4212 12
192.168.100.5 192.168.100.2 0 0 icmp 13 1092 1
0 0 ipv6-icmp 5 280 4
PS : 192.168.100.5 is my Ubuntu VM ip address and 192.168.100.2 is my VyOS ip address
For more information, the NetFlow configuration I use is as follows:
flow-accounting {
interface eth2
netflow {
engine-id 1
sampling-rate 1
server *my_ip_addr* {
port 2055
}
timeout {
expiry-interval 1
flow-generic 3600
icmp 300
max-active-life 604800
tcp-fin 300
tcp-generic 3600
tcp-rst 120
udp 300
}
version 9
}
syslog-facility daemon
}
Do you have any idea what the problem is?
Thanks