New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add support for bridge VLAN filter #2306
Comments
Hi, I'd like to 👍 this request.
Multiply this for let's say 30 VLANs (eg, your host is running an admin bastion), you have 60 ifaces, without any container running. With the native vlan filter, we only need 1 bridge over the main interface, and you can reconfigure the vlan on the fly. This would really be a useful and appreciated feature ! Best regards, |
Hello,
Exactly, alternatively for now, macvlan seems to be the recommended approach to apply vlans on the fly. https://github.com/lxc/lxd/issues/3375#issuecomment-362744762 suggests this is a limitation of liblxc? Can we forward this to people who are responsible for liblxc? |
Oops, I worked around this with my Gentoo, with the following snippets : Pre-activate the VLAN filtering at bridge startup (/etc/conf.d/net) :
On the LXC config, I'm using a net-script that roughly does this simplified version:
And the lxc-guest-net doing this simplified task ($IFACEHOSTTAP being value of lxc.net.44.veth.pair), that is the last argument of the script.up:
I could also push the VLAN to the bridge upon first use, that is to avoid having to pre-setup it on the init script, but didn't take the time to do the parsing of "bridge vlan show".. but that would be cleaner. So the glue to get the vlan ID is the name of the veth pair, on the host side (lxc.net.$id.veth.pair). I didn't find any other element that could carry it for now (and don't want to do complex config parsing) |
Oops, actually my suggestion was for LXD and the problem with this though is missing |
Well, if you can't have it on LXD, that's a point to keep using plain LXC. macvlan is not a standard solution and is quite limited. |
The problem with LXC, issues tend to stay open indefinitely. |
@LHorace I agree we in desperate need of official hook mechanism, for now this kind of configuration can only be achieved throw hacking LXD internals. |
@Saruspete this is super disappointing that we can not use LXD and instead we are forced to use LXC or a bunch of hacks. |
@s3rj1k Actually, I would rather have support for it natively than hacking scripts to accomplish the job? I open issue here, see https://github.com/lxc/lxd/issues/5627. |
@s3rj1k Why it hasn't been implemented:
|
@LHorace I am an author for this PR for LXD lxc/lxd#5182 |
@LHorace Personally I can prepare a LXD branch with this feature added, but seeing how long it takes to contribute something to upstream I am a bit upset and demotivated. |
I would hold off @s3rj1k before giving up. The PR seem to still be getting action though. I've seen worst. Anyway, I've to read up on IPVLAN. |
I think I came across the same problem https://discuss.linuxcontainers.org/t/lxd-containers-on-a-vlan-aware-bridge/14734 the reason mentioned by @Saruspete #2306 (comment) is exactly the reason I don't want to add a tonne of interfaces to my server. |
add support for using untagged vlans inside bridges
https://unix.stackexchange.com/a/255489
The text was updated successfully, but these errors were encountered: