DougP Posted March 24, 2021 Share Posted March 24, 2021 I am trying to assign a Unifi Controller docker container to an external network so it can manage our Access Points. The NIC is attached to the external network and was able to receive an IP address via DHCP. The interface (br2, 172.17.0.0/24) is enabled in the Docker settings page. Unfortunately, I've seen two issues: At boot-time I see an error message that says "br2 not found" and br2 isn't available in the Docker settings for Docker images: I'm at a loss here. What do I need to do to enable br2 on my Docker images? Quote Link to comment
DougP Posted March 26, 2021 Author Share Posted March 26, 2021 (edited) br2 is the network I'm trying to attach the docker container to. This would be subnet 172.17.0.0/24. I currently have no docker containers attached to that bridge (since it's not an option). I assume that the 172.17.0.0/16 route connected to "docker0" is illegitimate so I tried to delete it - to no avail; the delete button asks me to confirm but never actually removes the route. I suspect this might help point towards a solution. EDIT: I deleted the 172.7.0.0/16 route using the command line: ip route del 172.17.0.0/16 The route was removed from the table but it hasn't helped me apply br2 to a docker container. Edited March 26, 2021 by DougP Quote Link to comment
lnxd Posted March 27, 2021 Share Posted March 27, 2021 (edited) It looks like something is broken somewhere, but this is what I'd try. Make sure you understand each step before you do it. Run docker network ls via Unraid terminal to get a print out of all networks in case there's some the GUI can't see Make sure any network you want to keep is assigned to at least one running docker container by checking the web UI, otherwise you might lose it after the next step Run docker network prune via Unraid terminal to delete all unassigned networks Create the network manually using docker network create via Unraid terminal rather than through the GUI docker network create \ --driver=bridge \ --subnet=172.17.0.0/24 \ --gateway=172.17.0.1 \ br2 It should then (hopefully) be visible when you're setting up a docker container via the GUI. If not, you can always assign it to the container after it's created: docker network connect br2 unifi-controller Where unifi-controller is the container name you're using. Edited March 27, 2021 by lnxd Quote Link to comment
DougP Posted April 5, 2021 Author Share Posted April 5, 2021 I ended up wiping all of the network settings by deleting the network configuration files and starting from scratch. That worked through a couple of reboot cycles but, unfortunately, the problem has resurfaced. The two networks I'm having trouble with are on USB3 Ethernet Dongles which, I expect, could be part of the problem. Unfortunately all of my PCIe slots are already being used and USB3 is the only way I can get onto these networks.. 1 Quote Link to comment
Ford Prefect Posted April 6, 2021 Share Posted April 6, 2021 ....another option for getting more separate networks is to enable VLANs. I doubt, that in most cases each network with a physical nic will be saturated. However, this will also require to have a VLAN capable Switch and Router. Quote Link to comment
ken-ji Posted April 6, 2021 Share Posted April 6, 2021 The first time docker engine starts up (or you've blown away the local-kv.db file) it picks a /16 network for the default docker0 network it starts from 172.17.0.0/16 and keeps going to 172.18.0.0/16 until it gives up The criteria for picking is the subnet is not used by the local machine, which is odd - so probably your USB ethernet adapter dropped off or wasn't connected when the docker engine last started up You're screen shots indicate the a bad config: * br2 is 172.17.0.0/24 (which is a subset of 172.17.0.0/16 * you have 3 default gateways (which will invariably confuse the OS as to which interface to use to talk to the world) I suggest you try renumbering br2 to some other sensible IP range 172.20.0.0/24 or the 192.168.x.0/24 if its a possibility and make sure the default routes are really what you want (most of the time it isn't), and it can be resolved by either specifying no gateway on the other interfaces. Also, as a possible security measure, it is not necessary to have an IP on the other interfaces (save for eth0/br0). Docker can still function as in my setup Unraid is only accessible via br0, but I can run docker containers and VMs on all my subnets (VLANs) Quote Link to comment
DougP Posted April 14, 2021 Author Share Posted April 14, 2021 I found the solution to this particular problem: I had to enable "Host access to custom networks" in the Advanced Docker settings and enable the desired Subnet. 1 Quote Link to comment
dboris Posted August 5, 2022 Share Posted August 5, 2022 (edited) Allow me to add that I was having an issue and this topic is the one I found by googling the error : "unraid custom docker network <insert your network name> not found". In my case the solution have been partly given here : The issue : My custom docker network had caps in the name (ex "CustomNetwork"). While it was recognised by docker by doing "docker network ls", I noticed the name of the network was given without caps on the "Network" column, on Unraid's GUI docker page. The solution : Delete and recreate a network without caps. "docker network rm <insert your network name>" Then recreate it and reasign it to the dockers (as it's identified internally by ID and not by name). Edited August 5, 2022 by dboris Quote Link to comment
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.