IPv4 vs IPv6 ratio

Started by 9axqe, December 06, 2024, 01:38:19 PM

Previous topic - Next topic
December 06, 2024, 01:38:19 PM Last Edit: December 06, 2024, 01:41:24 PM by 9axqe
Hello,

I would like to see the ratio of traffic (in bytes) between IPv4 and IPv6 on my WAN interface (in and out).

This is pure curiosity from my side, there's no real requirement or use case.

DNS stats do not help, I noticed that very often clients make request for both A and AAAA records. Additionally, a DNS lookup does not mean much in terms of how much traffic will flow to/from that IP.

This question came up a while back, I thought I'd ask again, in case there's something new:
https://forum.opnsense.org/index.php?topic=29369.0

Extracting the information over API is also acceptable for me, I would just need some pointers as to which API calls will give me the above mentioned stats.

[edit]
Forgot to mention, I had a look at vnstat already, it does not support this,. There's a feature request for it but it seems unlikely to happen:
https://github.com/vergoh/vnstat/issues/215

Off Topic: Very nice idea for a widget. I would definitely enable that too  :)
OPNsense Hardware:
DEC3850
DEC750
Custom i5-14600K based router
KVM based VM

I just stumbled upon Munin, and it seems there's an agent for opnsense, so that could work.

https://serverfault.com/questions/556124/monitoring-ipv4-vs-ipv6-traffic

When I have some free time, I'll try rolling out a Munin container and see if I can get this.
https://github.com/dockur/munin

Alternatively, I need to look at zabbix I guess.