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

Support multiple subnets/gatways in containers.podman.podman_network #605

Open
koalaeagle opened this issue Jul 18, 2023 · 2 comments · May be fixed by #709
Open

Support multiple subnets/gatways in containers.podman.podman_network #605

koalaeagle opened this issue Jul 18, 2023 · 2 comments · May be fixed by #709
Labels
enhancement New feature or request

Comments

@koalaeagle
Copy link

Is this a BUG REPORT or FEATURE REQUEST? (leave only one on its own line)

/kind feature

Description

Is it possible to support defining multiple subnets and gateways? This can be useful for certain dualstack scenarios.

As far as I can tell, this is not currently supported. However, I am still learning ansible and it is possible I missed something.

An example of this would be:

podman network create -d macvlan --subnet=10.10.0.0/24 --gateway=10.10.0.1 --ip-range=10.10.0.248/29 --subnet= 2001: db8:abcd:10::/64 --gateway= 2001: db8:abcd:10::1 --ipv6 -o parent=eth0.10 dmz

Describe the results you received:

I have tried defining multiple subnet values, but when inspecting the created network only one subnet and gateway is defined. After a quick look at the code, it does not appear that there is logic to handle more than one subnet/gateway.

@sshnaidm sshnaidm added the enhancement New feature or request label Jul 30, 2023
@nishipy
Copy link
Contributor

nishipy commented Aug 13, 2023

I'm not sure, but is this a question on Podman itself?

@DasSkelett
Copy link

I'm not sure, but is this a question on Podman itself?

Podman already supports this since several releases, but this Ansible collection doesn't yet.

--subnet=subnet

The subnet in CIDR notation. Can be specified multiple times to allocate more than one subnet for this network. The argument order of the --subnet, --gateway and --ip-range options must match. This is useful to set a static ipv4 and ipv6 subnet.

https://docs.podman.io/en/latest/markdown/podman-network-create.1.html#subnet-subnet

I would also be very interested in this feature, my current workaround is copying the network JSON files to /etc/containers/networks/ instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
4 participants