Docker macvlan network has no IPv6, even though the bridge has it and it is enabled


Strayer

2 posts in this topic Last Reply

Recommended Posts

I'm trying to run a container with a static IPv4 and IPv6 address (specifically a DNS server that will be propagated by the router, thus the requirement for static IP addresses). For this I'm trying to create a Docker macvlan network so I can run containers, reachable from other VLANs via the router. The network itself is set up correctly and works as every other VLAN I have:

root@noatun:~# ip addr show dev br0.8
17: br0.8: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
    link/ether b4:2e:99:ad:6c:51 brd ff:ff:ff:ff:ff:ff
    inet 10.100.80.4/24 brd 10.100.80.255 scope global dynamic noprefixroute br0.8
       valid_lft 41348sec preferred_lft 35948sec
    inet6 fd3b:2815:be50::967/128 scope global dynamic noprefixroute
       valid_lft 42615sec preferred_lft 42615sec
    inet6 2003:e5:d730:6200::967/128 scope global dynamic noprefixroute
       valid_lft 13644sec preferred_lft 1044sec
    inet6 fd3b:2815:be50:0:9f84:ac1a:9cea:ee0d/64 scope global mngtmpaddr noprefixroute
       valid_lft forever preferred_lft forever
    inet6 2003:e5:d730:6200:9834:1760:1142:e4a0/64 scope global dynamic mngtmpaddr noprefixroute
       valid_lft 13645sec preferred_lft 1045sec
    inet6 fe80::e8c5:16ff:fe3d:3d8a/64 scope link
       valid_lft forever preferred_lft forever

The Docker network doesn't have any IPv6 support enabled:

root@noatun:~# docker network inspect br0.8
[
    {
        "Name": "br0.8",
        "Id": "ba9083ca9744046029a93b5d170beede78f348852830a1ff225d1cee29a19adb",
        "Created": "2020-09-16T14:49:38.714737243+02:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "10.100.80.0/24",
                    "IPRange": "10.100.80.128/25",
                    "Gateway": "10.100.80.1",
                    "AuxiliaryAddresses": {
                        "server": "10.100.80.4"
                    }
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {},
        "Options": {
            "parent": "br0.8"
        },
        "Labels": {}
    }
]

IPv6 is enabled in the Docker settings:

grafik.thumb.png.98bf77461e820ee54ef38e0b998f5d35.png

 

It seems like I'm missing something here, but I don't know what else to try.

Link to post
  • 2 weeks later...

I fixed this for now by creating the Docker network manually and not checking the custom networks in the Unraid Docker settings.

docker network create -d macvlan \
  --subnet=10.100.80.0/24 --gateway=10.100.80.1 \
  --subnet=fd3b:2815:be50::8/64 --gateway=fd3b:2815:be50::8 \
  --ipv6 \
  --aux-address='dhcp2=10.100.80.2' \
  --aux-address='dhcp3=10.100.80.3' \
  --aux-address='dhcp4=10.100.80.4' \
  --aux-address='dhcp5=10.100.80.5' \
  -o parent=br0.8 \
  vlan8

Nice side effect is that I can now use the full address range and tell Docker to not do something with the very small DHCP range at the start of the subnet.

Link to post

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.