Put wan and wan6 on separate VLANs

I would like to monitor my IPv4 and IPv6 traffic separately using luci-app-statistics, and the easiest way to do that seemed to be putting wan and wan6 on separate VLANs. I could create the new VLAN and assign wan6 to it just fine, but if I left the WAN interface untagged in both definitions the new VLAN wouldn't pass IPv6 traffic. If I tagged them both, then neither VLAN passed traffic. If I untag eth0.2 (the original, assigned only to wan in the config I tried) then it works, but tagged or untagged the new VLAN won't pass IPv6 traffic at all.

At this point I've read the docs on VLANs, and a bunch of forum posts, wiki articles, etc. on similar topics, but I haven't found any solutions. I'm sure it's probably something simple and obvious, but network config is not my area of expertise.

Any help or suggestions appreciated on either having wan and wan6 on separate VLANs, or another way to monitor the traffic separately with luci-app-statistics, or another solution.

I think there are multiple options. One is connecting multiple physical wan ports which might be easiest but requires an external switch. Another to use macvlan, which I'm not sure how well integrated it's in OpenWrt. And a third to use openvswitch which requires the most flash space of the three.

1 Like

I agree with @mikma. If you split the wan and wan6 into separate vlans, then you'd have to merge them again, which I am not sure if it can be accomplished without looping layer 2.

give nlbwmon/luci-app-nlbwmon a try... it might do what you need...

Thanks, wulfy23! That looks like just what I need.

And thanks everyone else for the replies, I see now why it's not as easy as I thought it would be to split the VLAN.

I'll keep this open for a bit just in case, then tag it solved if nlbwmon does what I need.