Cant assign static IP to docker apps after enabling ipv6


Inenting

Recommended Posts

Hello all,

 

I have a weird problem with my docker applications, after I enabled IPv6 in the network settings, I cannot choose static (custom br0) anymore in the dropdown list next to Network Type.

 

My IP setup:

 

fpJ9MAm.png

 

Docker settings:

 

KnPvWo4.png

 

Any docker app setup:

 

LYBlH9Q.png

 

When I put it on bridge or host it works but I need it to be a static ip.

 

I do have to mention that I didn't restart the server yet because of a parity rebuild going on, but just in case a restart won't help and maybe someone knows what the problem is could help me.

Link to comment

The link local address (fe80) is not accepted by Docker and hence the network is not created.

Docker wants a gateway address in the same subnet as the interface address. This is normally the first address, e.g. 2a02:12xx:xxx::1

You need to configure this ::1 address on your router too, if not already existing.

Link to comment

Thank you for your reply, i'm very new to ipv6 so i'm sorry if I say something stupid.

 

My ISP has given me a /48 subnet (the 2a02: one) and I configured this in my router with DHCPv6 and now it is distributing ipv6 adress using prefix delegation (I don't have a single other option I can change, but ill post that problem in the forums of my router if that is the problem).

 

All my other devices do work with the ipv6 from dhcp. Is this a limitation in unraid docker settings that the gateway has to be in the same subnet or am I being stupid?

Link to comment

Thank you for the clarification, i'm also using ubiquiti (USG3P). 

 

If it's not too much trouble could you explain how you added an address to act as the gateway, or should I ask this in the ubiquiti forums?

This is because in the LAN interface I have set it to prefix delegation (I can't save it when I choose static but that is a problem for the other forums) and do not have an option for gateway (I assume you have it on static?). 

Link to comment

There is a couple of things needed to make this work.

 

1. On your Unraid server you need to assign static IPv6 settings.

2. Unfortunately IPv6 host addresses are not supported via the GUI, you need to create a config.gateway.json file (look in the Ubuiqiti forums for how and what)

 

I have several things configured in my config.gateway.json file (I do a lot of specialties), but below is the part which is needed for IPv6 assignment using PD.

Note: make absolutely sure the syntax is correct, it may hang your router if not.

{
  "interfaces": {
    "ethernet": {
      "eth2": {
        "dhcpv6-pd": {
          "pd": {
            "0": {
              "interface": {
                "eth0": {
                  "host-address": "::1",
                  "service": "slaac"
                }
              }
            }
          }
        }
      }
    }
  }
}

 

Edited by bonienl
  • Thanks 1
Link to comment

Thank you for your help, looks like I will have to postpone this a bit because I also have a configured config.gateway.json (ipv4 subnet and firewall rules) and because my dhcpv6-pd process uses 50% cpu already (opened a ticket for this because the current solution closes my pppoe connection and also has to be put in the config.gateway.json :( ). Oh and my server is still busy with a a parity rebuild.

 

When most of my problems are fixed I will come back to this thread and apply your settings, again thank you for helping me and have a nice day and happy new year.

Link to comment
  • 4 months later...

Hey,

 

I forgot about this but I recently managed to fix the high cpu usage with ipv6 so I decided to try this again, I wanted to make a ticket in the ubiquiti forums but considering I made a few tickets and all of them took months for a proper reply I decided to ask it here again so I hope you guys can help me.

 

I tried adding the host address and slaac service with a command first to test it:

 

set interfaces ethernet eth0 vif 128 pppoe 2 dhcpv6-pd pd 0 interface eth1.50 host-address '::1'

set interfaces ethernet eth0 vif 128 pppoe 2 dhcpv6-pd pd 0 interface eth1.50 service slaac

 

Also I'm not sure if this matters but I have set prefix-only option on dhcpv6-pd (to fix the high cpu usage)

 

The unraid server is connected with vlan 50 native and others, including 1, are tagged.

 

But I still get a link-local address as gateway

 

image.thumb.png.968c7d70616bf0ad78720ae4ceb96a1e.png

 

And even when I have no internet I still get the link-local address as gateway

 

In unraid I have set up a Static IP with the gateway (using 2a02 address) with metric 1, however in the routing table the fe80 address still comes back even after I delete it and in the docker settings it keeps using that as gateway address.

 

Does anyone know what I might be doing wrong?

 

I also have 2 nics (which are bonded), is it better if I just use 1 for ipv4 and 1 for ipv6?

 

Edited by Inenting
typo
Link to comment

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.