OpenWrt news, tools, tips and discussion. Related projects, such as DD-WRT, Tomato and OpenSAN, are also on-topic.
Separate IPv6 subnet for each VLAN
My apologies if I'm getting the terms wrong here, hopefully I'll make myself understood. I set my network up many moons ago and don't quite remember how it all works, and now I'm trying to get IPv6 setup to my satisfaction.
I have a couple of VLANs, each with their own subnet like so in the network config:
config interface 'vlan3' list ipaddr '192.168.3.1/24'
etc
I recently made another WAN interface for IPv6, and apparently it all just trickled through to all my devices except I'd like this same sort of subnetting to happen on each VLAN.
I think I should be using the ip6assign and ip6hint options but I don't quite know how they work and playing around with them hasn't given much result.
Further, I don't know if this is related to the VLANs at all, but at the moment on my macbook I got a number of IPv6 like so:
aaaa:aaaa:aaaa:10:cccc:cccc:cccc:cccc aaaa:aaaa:aaaa:20:cccc:cccc:cccc:cccc aaaa:aaaa:aaaa:30:cccc:cccc:cccc:cccc
where the aaaa portion is from the /48 subnet I get from my ISP, the cccc portion is rando device specific for the /128 IP assigned, and I'm not sure what's up with the 10, 20, 30, but only the 10 IP seems to work on my laptop on the VLAN1 with 192.168.1/24 IPv4 subnet
Edit: I suppose it must be related because in LuCI my VLAN2 is showing IPv6: aaaa:aaaa:aaaa:20::1/60 etc, but why I'm even getting an address in that subnet on my VLAN1 connected device is beyond me.. and how I change that 10, 20, 30 is also an unknown
You should be able to configure ip6hint=10, 20, 30, etc if a /48 is delegated.
Should, right? I've confirmed that the 10, 20, 30, 40 I'm getting are just 1, 2, 3, 4 on the /60 subnets for each VLAN, but the hint is not well received.. mostly it seems to have no effect, except right now when I tried setting VLAN2's hint to 5, which resulted in no proper subnet on VLAN2 but VLAN1 jumped to 20 instead of its usual 10 for some reason ... lol sigh anyway thanks
Edit: I think I got it now, I need to specify the full prefix on all the VLANs, then it seems to stick. So from the /48 given by the ISP to the /60 on the VLAN, I need to give them each something like 1110, 2220, 3330, 4440.. the 0s of course aren't part of the prefix but yeah.. that works.