Skip to content

common: add IPv6 subnet configuration options - #995

Open
thrawn-sh wants to merge 1 commit into
podman-container-tools:mainfrom
thrawn-sh:feature/ipv6-subnet-config
Open

common: add IPv6 subnet configuration options#995
thrawn-sh wants to merge 1 commit into
podman-container-tools:mainfrom
thrawn-sh:feature/ipv6-subnet-config

Conversation

@thrawn-sh

Copy link
Copy Markdown

Currently, IPv6 subnets are always randomly generated from fd00::/8 (RFC 4193), with no way for operators to configure a stable, predictable ULA prefix. This makes it difficult to set up DNS exclude lists, firewall rules, and network documentation for containerized services.

Add default_subnet_v6 and default_subnet_pools_v6 configuration options mirroring the existing IPv4 default_subnet and default_subnet_pools. When default_subnet_v6 is set, the default "podman" network is created as a dual-stack network with the configured IPv6 subnet. When default_subnet_pools_v6 is set, podman network create allocates IPv6 subnets sequentially from the configured pools instead of randomly.

When neither option is set, existing random generation behavior is preserved for full backward compatibility.

Fixes: #87

@github-actions github-actions Bot added the common Related to "common" package label Jul 20, 2026
@packit-as-a-service

Copy link
Copy Markdown

Packit jobs failed. @containers/packit-build please check.

1 similar comment
@packit-as-a-service

Copy link
Copy Markdown

Packit jobs failed. @containers/packit-build please check.

@mtrmac

mtrmac commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

@Luap99 PTAL if you have time.

@Luap99 Luap99 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not a full review, just a quick look.

Overall adding two new fields is fine with me.

However it should be noted that the code as is a a total NOP. The code was moved into netavark, see #610

I guess we need to cleanup some dead code here, I can throw a up a PR shortly

So this really needs a PR to netavark to add the logic there for the v6 subnet pool assignment. The static one here for the default network here is correct I think.

@Luap99

Luap99 commented Jul 23, 2026

Copy link
Copy Markdown
Member

#1013 should cleanup the dead code there

@thrawn-sh

Copy link
Copy Markdown
Author

Not a full review, just a quick look.

Overall adding two new fields is fine with me.

However it should be noted that the code as is a a total NOP. The code was moved into netavark, see #610

I guess we need to cleanup some dead code here, I can throw a up a PR shortly

So this really needs a PR to netavark to add the logic there for the v6 subnet pool assignment. The static one here for the default network here is correct I think.

So just to confirm, @Luap99 you meant I created the change against deadcode and I need to move it to netavark?

@Luap99

Luap99 commented Jul 23, 2026

Copy link
Copy Markdown
Member

Yes you will have to rebase once that lands. The ipv6 pool assignment must be done in netavark (https://github.com/containers/netavark) now

Currently, IPv6 subnets are always randomly generated from fd00::/8
(RFC 4193), with no way for operators to configure a stable, predictable
ULA prefix. This makes it difficult to set up DNS exclude lists, firewall
rules, and network documentation for containerized services.

Add default_subnet_v6 and default_subnet_pools_v6 configuration options
mirroring the existing IPv4 default_subnet and default_subnet_pools.
When default_subnet_v6 is set, the default "podman" network is created
as a dual-stack network with the configured IPv6 subnet. When
default_subnet_pools_v6 is set, podman network create allocates IPv6
subnets sequentially from the configured pools instead of randomly.

When neither option is set, existing random generation behavior is
preserved for full backward compatibility.

Fixes: podman-container-tools#87

Signed-off-by: Alexander Dreweke <alexander@dreweke.net>
@thrawn-sh
thrawn-sh force-pushed the feature/ipv6-subnet-config branch from 3a84ba8 to 57c9f48 Compare July 23, 2026 20:10
@thrawn-sh
thrawn-sh requested a review from Luap99 July 23, 2026 20:11
@thrawn-sh

Copy link
Copy Markdown
Author

refactored the MR for commonlib will raise MR against netavark in a few minutes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

common Related to "common" package

Projects

None yet

Development

Successfully merging this pull request may close these issues.

default_subnet_pools option doesn't support IPv6 pools

3 participants