Skip to content

nerdctl network create fails when creating dual-stack bridge network with explicit IPv4 and IPv6 gateways #4951

@shivabohemian

Description

@shivabohemian

Description

nerdctl network create fails when creating dual-stack bridge network with explicit IPv4 and IPv6 gateways

Steps to reproduce the issue

Run the following command:

nerdctl network create \
    --driver bridge \
    --ipv6 \
    --subnet 172.20.0.0/16 \
    --subnet fd00:dead:beef:1::/64 \
    --gateway 172.20.0.1 \
    --gateway fd00:dead:beef:1::1 \
    mynet-dual

The command fails with:

FATA[0000] no matching subnet "172.20.0.0/16" for gateway "fd00:dead:beef:1::1

Describe the results you received and expected

The network should be created successfully.

The IPv4 gateway should be matched with the IPv4 subnet:

172.20.0.1 -> 172.20.0.0/16

and the IPv6 gateway should be matched with the IPv6 subnet:

fd00:dead:beef:1::1 -> fd00:dead:beef:1::/64

This configuration is valid and represents a standard dual-stack bridge network.

What version of nerdctl are you using?

nerdctl version 2.3.1

Are you using a variant of nerdctl? (e.g., Rancher Desktop)

None

Host information

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions