Skip to content
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

Feature Request: VLAN Tagging #64

Closed
Matt-CyberGuy opened this issue Jan 22, 2024 · 5 comments
Closed

Feature Request: VLAN Tagging #64

Matt-CyberGuy opened this issue Jan 22, 2024 · 5 comments

Comments

@Matt-CyberGuy
Copy link

I don't know much much work it would be to implement... but for our use case for spinning up throw away lab environments, being able to add a VLAN tag would be really useful.

@kroese
Copy link
Contributor

kroese commented Jan 22, 2024

I have no experience with VLANs, but this sounds like something that Docker should support on the container level, not something I can provide in my code.

In any case its possible to put the container inside a Docker macvlan network, and there is even a DHCP mode that allows Windows to get an IP from your DHCP server, its documented here .

@Matt-CyberGuy
Copy link
Author

No worries... I figured since the VM's were somehow getting an IP way outside the range of the containers bridge network, and different than the host network, you were doing something fancy with the network stack of the VM. If I figure out a simple work around for this, I'll post it.

@kroese
Copy link
Contributor

kroese commented Jan 22, 2024

All the traffic to the container IP is tunneled to the (dummy) VM IP 20.20.20.21 via a tuntap interface.

If you want to avoid this tunnel/NAT you can enable DHCP=Y, and it will use a macvtap interface, so the VM will be directly connected to the network like a normal device, without any layers in between. As it will get an IP from your router, you can configure your router to put it on a specific VLAN.

@mtido
Copy link

mtido commented Jan 22, 2024

I have been following this topic with interest. Is it possible to activate this retrospectively or does it have to be done initially?

Many thanks for this container, I love it.

@Matt-CyberGuy
Copy link
Author

Ya, it will definitely be able to be done in post... I use portainer to orchestrate my containers, once I figure out how to do it, I'll post how to do it.

@kroese kroese closed this as completed Feb 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants