Understanding traffic from bridges and ipv6 in vnstat

Hi all,

I just started using OpenWRT and I love it - but I could use some help understanding how traffic from bridge interfaces is logged. I installed luci-app-nlbwmon and luci-app-vnstat, and while both are working, I'm running into a bit of confusion.

Here is my current network config file

config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fd70:d31e:44be::/48'

config interface 'lan'
        option type 'bridge'
        option ifname 'eth1.1'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option type 'bridge'
        option proto 'pppoe'
        option username 'OMITTED'
        option ipv6 'auto'
        option password 'OMITTED'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '2 3 4 5 0t'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '1 6t'

config interface 'wan6'
        option proto '6rd'
        option peeraddr '205.171.2.64'
        option ip6prefix '2602::'
        option ip6prefixlen '24'

What I'm not clear on his how tracking of interfaces like br-lan, and wan-pppoe work. For example, if I want vnstat to track ipv4 and ipv6 traffic, is it enough to just track br-lan, or does that include traffic within the lan (which I don't care about)?

If br-lan includes in-LAN traffic, do I then need to track pppoe-wan and 6rd-wan6. Or should I instead track the eth0.2 VLAN, which I think is connected to the modem/WAN?

Should I be concerned that 6rd-wan6 doesn't show up in vnstat's interface config list in luci (and is that because it's a 6rd interface, and all traffic is really on the pppoe route?).

Thank you for any help with this.

vnstat will track interfaces, not ip protocol.

I would track br-lan and pppoe-wan

it does

If you track eth0.2 you will capture control frames of pppoe as well. I don't know if you need these.

Don't worry, it is a virtual interface, so maybe it is not supported by vnstat.

2 Likes

Thank you so much - that helps immensely.

So to summarize:

  • br-lan contains traffic in, out, and within the local network (so transfers between computers on the lan are counted)
  • pppoe-wan traffic includes 6rd traffic
  • eth0.2 contains pppoe-wan traffic + additional pppoe overhead not tracked by pppoe-wan

Is that correct?

I think that unless traffic traverses the bridge, it won't be counted. Other than that you are correct.

2 Likes

This topic was automatically closed 0 minutes after the last reply. New replies are no longer allowed.