Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Docker Network Creation not Persistent

Featured Replies

I've started using unRAID five days ok, now at the latest 6.4.0_rc17b.

 

Situation:

Two network interfaces

eth0: no bonding, no bridging, fixed IP (this is for shares, webui, etc).

eth1: no binding, bridging, no IP assigned (for VMs and Docker)

 

When I want to create a docker network with

Quote

 docker network create -o parent=br1 --driver=macvlan --subnet 192.168.100.0/24 --ip-range=192.168.100.128/27 --gateway 192.168.100.1 my_dhcp_pool

it errors with

Quote

 failed to allocate gateway (192.168.100.1): Address already in use"

probably because there is a docker network eth0

Quote

docker network ls
NETWORK ID          NAME                DRIVER              SCOPE
a2f54375a699        bridge              bridge              local
627dc3eb5eff        eth0                macvlan             local
e7738321962c        host                host                local
68a3c4b65715        none                null                local

which is created at docker start.

 

After deleting this network I can successfully create my pool and assign it to containers. Networking is than working fine.

 

BUT this is not persisting over docker or unraid restarts. Can you please tell me what I'm doing wrong?

When on unRAID 6.4, custom (macvlan) networks are automatically created for docker when an interface has an IP address assigned. In other words configure eth1 under network settings and set either a static or dynamic IP address and gateway.

 

Under docker settings you can specify the DHCP range to be used on eth1.

 

To make this work correctly you need to use a different network on eth1 then used on eth0. If you want containers in the same network then simply use eth0.

 

 

Edited by bonienl

  • Author

Thanks, I will try it!

  • Author

Just tried it - it works! Thanks for the pointer.

 

However now my traffic gets routed by my firewall and that isn't what I wanted (more ruleset changes, performance).

 

Adding a second IP in the same subnet would allow me to use both interfaces of the server without buying a new switch (with bonding feature) and not load my firewall with internal network routing.

So I just tried it (eth0 has IP 192.168.100.200, eth1 has IP 192.168.100.205) and seems it is working fine. Traffic goes in/out in the correct physical interface.

 

Is this not a good idea for unRAID going forward?

Edited by Gipflsteiga

If you want to use both interfaces you can use bonding type 5 or 6. This allows load balancing without the need for a 'special' switch.

 

  • Author

So, bonienl, I have to hang my head in shame. :(

 

I'm coming from "the network side" and hadn't yet heard of type 6 but was only thinking of MAC or IP SRC/DST hashes. That is simply awesome!!! :D

 

Edit: And is working like a charm!

Edited by Gipflsteiga

1 hour ago, Gipflsteiga said:

So, bonienl, I have to hang my head in shame.

 

You're not alone, many of us have bent the knee to bonienl's networking awesomeness!

Any manual maclvan settings in 6.3 can not be re-used in 6.4.

 

If you want to use both interfaces you can bond them together and use an accompanying backup or load-balancing mode, or set the interfaces as two separate network connections. In the latter case you must set up your switch and router correctly to handle these different networks.

The default mode 1 (main-backup) should work and gives you fault-tolerance.

Mode 6 is a load-balancing mode for transmit and receive, and gives you more bandwidth

 

Though not recommended but still possible to assign an IP address to interface eth1, which is in the same network as interface eth0 (e.g. eth0=10.14.100.10/24 and eth1=10.14.100.11/24). This would allow to create a container (Plex) and attach it to eth1 with a fixed IP address (10.14.100.120).

7 minutes ago, zin105 said:

 

What makes this not recommended? What are the implications? Thank you very much for the help!

 

The advantage of using a bonded connection is having either improved availability or bandwidth or both. Setting eth0 and eth1 as separate connections works but doesn't bring any advantages, and it may lead to confusion, e.g. eth1 fails which stops your containers, but unRAID itself is still working perfectly on eth0.

47 minutes ago, Squid said:

Something like this?

 

tNuxHM0.jpg

 

That looks good :D

  • Author
8 hours ago, saarg said:

 

That looks good :D

And looks like all server rooms / network cabinets after a while it seems. :D

Cause there's always somebody that just can't be bothered to install the cables correctly. Then the mess gets bigger and bigger til the next 'clean-up'.

 

PS: I can neither confirm nor deny that this 'clean-up' exists. :D:D;)

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.