phoenixcoder Posted June 25, 2020 Posted June 25, 2020 I have an issue that docker doesn't have IPv6, this is one of my containers # docker inspect 433692b3e691 | grep -i IPv6Gateway "IPv6Gateway": "", "IPv6Gateway": "", Looking at my docker networks, I see: # docker network ls NETWORK ID NAME DRIVER SCOPE 224d0c66e092 bridge bridge local bb9929d48bc0 host host local 19eea3a1aa0b none null local THE BRIDGE # docker inspect 224d0c66e092 | grep -i IPv6 "EnableIPv6": false, "IPv6Address": "" "IPv6Address": "" "IPv6Address": "" "IPv6Address": "" THE HOST # docker inspect bb9929d48bc0 | grep -i IPv6 "EnableIPv6": false, "IPv6Address": "" "IPv6Address": "" "IPv6Address": "" However on the GUI and the command line, the bridge is enabled and has IPv4+IPv6 and the tower itself has an IPv6 address Any help enabling docker to have IPv6 instead of "EnableIPv6": false will be appreciated Quote
bonienl Posted June 26, 2020 Posted June 26, 2020 IPv6 for containers is only available for custom (macvlan) networks. Host and Bridge networks use IPv4 only. Quote
phoenixcoder Posted June 27, 2020 Author Posted June 27, 2020 (edited) Thank you for your response, can you point me to a guide on how to set up macvlan on unraid. Is it as simple as the one mentioned here? For example: $ docker network create -d macvlan \ --subnet=192.168.216.0/24 --subnet=192.168.218.0/24 \ --gateway=192.168.216.1 --gateway=192.168.218.1 \ --subnet=2001:db8:abc8::/64 --gateway=2001:db8:abc8::10 \ -o parent=eth0.218 \ -o macvlan_mode=bridge macvlan216 Edited June 27, 2020 by phoenixcoder Quote
phoenixcoder Posted June 27, 2020 Author Posted June 27, 2020 I had some success but ran into a different issue Could not find a way to create the macvlan in the gui so I ran a slightly different version than the command above which is: docker network create -d macvlan \ --ipv6 \ --subnet=192.168.11.0/24 \ --subnet=2002:c0a8:0b00::/48 \ --gateway=192.168.11.1 \ -o parent=br0 \ --ip-range 192.168.11.5/27 \ -o macvlan_mode=bridge macvlan The reason is my local LAN range is 192.168.11.0/24 and the gateway is 192.168.11.1. Since my DHCP server assigns IPs from 192.168.11.100 to 192.168.11.149 and since I didn't want any IP collisions with the docker network, I went with ip-range 192.168.11.5/27 which has a Start IP of 192.168.11.0 and End IP of 192.168.11.31 When I assign the docker containers that macvlan network, it works and the docker containers surprisingly have perfect IPv4 and IPv6, that also pass the IPv6 test at https://test-ipv6.com/ The Problem: If I reboot the unraid, I lose the above network and have to re-run the command above and re-assign the docker containers that macvlan network If there a way to make it persistent? Thanks Quote
bonienl Posted June 27, 2020 Posted June 27, 2020 39 minutes ago, phoenixcoder said: If there a way to make it persistent? Use the GUI, see Settings --> Docker Settings. With the Docker service disabled and in advanced view, you can assign the networks. Quote
phoenixcoder Posted June 27, 2020 Author Posted June 27, 2020 2 minutes ago, bonienl said: Use the GUI, see Settings --> Docker Settings. With the Docker service disabled and in advanced view, you can assign the networks. Tried that, all I see is this: The IPv4 looks fine but no way to bridge that network (macvlan) to IPv6 There is no way to add a network and even with those IPv4 and IPv6 selected, I only have bridge, host, none in my drop down for docker containers as seen below And per your original reply "Host and Bridge networks use IPv4 only." There is something missing Quote
phoenixcoder Posted June 27, 2020 Author Posted June 27, 2020 5 minutes ago, bonienl said: Disable the IPv6 DHCP pool. Wow! I totally did not expect that would work # docker network ls NETWORK ID NAME DRIVER SCOPE 6e05b4103d51 br0 macvlan local 4619d293ec0b bridge bridge local bb9929d48bc0 host host local 19eea3a1aa0b none null local THANK YOU! Quote
Recommended Posts
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.