Skip to content

IPv6 address pool only yields a single subnet #41438

@tvdstaaij

Description

@tvdstaaij

Description

The core address pool functionality of automatically dividing a larger subnet into smaller subnets to assign to networks only seems to work for IPv4. IPv6 pools yield one subnet, after which Docker claims that no non-overlapping subnets are available.

Steps to reproduce the issue:

  1. Use the following dockerd configuration:

     {
       "default-address-pools": [
         {"base": "172.17.0.0/16", "size": 24},
         {"base": "fd00:dead:beef::/48", "size": 64}
       ]
     }
    
  2. docker network create --ipv6 ipv6test1

  3. docker network create --ipv6 ipv6test2

Describe the results you received:

The first network is created succesfully. Creating the second network fails:

Error response from daemon: could not find an available, non-overlapping IPv6 address pool among the defaults to assign to the network

Describe the results you expected:

Two IPv6 networks are created and assigned a /64 subnet from the pool.

Additional information you deem important (e.g. issue happens only occasionally):

Manually providing multiple pools works around the error, for example:

  "default-address-pools": [
    {"base": "172.17.0.0/16", "size": 24},
    {"base": "fd00:fefe:1::/48", "size": 64},
    {"base": "fd00:fefe:2::/48", "size": 64},
    {"base": "fd00:fefe:3::/48", "size": 64},
    {"base": "fd00:fefe:4::/48", "size": 64}
  ]

However, each pool is still only used once, so in the above example only four IPv6 networks can be created.

Output of docker version:

Client: Docker Engine - Community
 Version:           19.03.12
 API version:       1.40
 Go version:        go1.13.10
 Git commit:        48a66213fe
 Built:             Mon Jun 22 15:45:50 2020
 OS/Arch:           linux/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          19.03.12
  API version:      1.40 (minimum version 1.12)
  Go version:       go1.13.10
  Git commit:       48a66213fe
  Built:            Mon Jun 22 15:44:21 2020
  OS/Arch:          linux/amd64
  Experimental:     false
 containerd:
  Version:          1.2.13
  GitCommit:        7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc:
  Version:          1.0.0-rc10
  GitCommit:        dc9208a3303feef5b3839f4323d9beb36df0a9dd
 docker-init:
  Version:          0.18.0
  GitCommit:        fec3683

Output of docker info:

Server:
 Containers: 5
  Running: 5
  Paused: 0
  Stopped: 0
 Images: 6
 Server Version: 19.03.12
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host ipvlan macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 7ad184331fa3e55e52b890ea95e65ba581ae3429
 runc version: dc9208a3303feef5b3839f4323d9beb36df0a9dd
 init version: fec3683
 Security Options:
  apparmor
  seccomp
   Profile: default
 Kernel Version: 4.19.0-10-cloud-amd64
 Operating System: Debian GNU/Linux 10 (buster)
 OSType: linux
 Architecture: x86_64
 CPUs: 1
 Total Memory: 989.9MiB
 Name: <redacted>
 ID: <redacted>
 Docker Root Dir: /var/lib/docker
 Debug Mode: false
 Registry: https://index.docker.io/v1/
 Labels:
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false

WARNING: No swap limit support

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/networkingNetworkingarea/networking/ipv6Networkingkind/enhancementEnhancements are not bugs or new features but can improve usability or performance.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions