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.

IP address assignment to Docker containers

Featured Replies

Should this work if you have an additional VLAN tagged? I see Br0 and Br0.10 in a ifconfig, have re-started docker services thru the GUI and I don't get the custom option.

Edited by smdion

  • Replies 63
  • Views 20.9k
  • Created
  • Last Reply
2 hours ago, smdion said:

Should this work if you have an additional VLAN tagged? I see Br0 and Br0.10 in a ifconfig, have re-started docker services thru the GUI and I don't get the custom option.

 

When br0 and br0.10 both have an IP address assigned, they should appear in the list of custom networks for Docker.

 

In your third screenshot, I believe the pool needs to be in CIDR format, not a range of ips

 

Sent from my ONEPLUS A3000 using Tapatalk

 

 

 

 

4 minutes ago, ljm42 said:

In your third screenshot, the pool needs to be in CIDR format, not a range of ips

Sent from my ONEPLUS A3000 using Tapatalk
 

Very sharp observation :)

 

Correct syntax is: 10.10.0.192/26

 

The above reserves 10.10.0.192 to 10.10.0.254

 

Ps. Maybe I should add some syntax checking?

Edited by bonienl

:) maybe also adding the keyword CIDR to the interface or help text to give a jump-start on what to Google for

Sent from my ONEPLUS A3000 using Tapatalk

6 minutes ago, bonienl said:

Very sharp observation :)

 

Correct syntax is: 10.10.0.192/26

 

The above reserves 10.10.0.192 to 10.10.0.254

 

Ps. Maybe I should add some syntax checking?

Ah, that makes sense. Syntax checking is probably a good idea. It makes sense with your example to the right, I just didn't add 1 + 1.  

 

Sadly, still no custom option.

44 minutes ago, smdion said:

Ah, that makes sense. Syntax checking is probably a good idea. It makes sense with your example to the right, I just didn't add 1 + 1.  

 

Sadly, still no custom option.

 

What is the output of

docker network ls

 

Hmm, it didn't create the custom networks.

 

Can you reboot your server and check again?

 

docker network create -d macvlan --subnet=10.10.0.0/24 --gateway=10.10.0.1 --aux-address=server=10.10.0.12 --ip-range=10.10.0.192/26 -o parent=br0 br0

Ok, lets try to add manually the custom network...

 

 

 

root@Redemption:~# docker network create -d macvlan --subnet=10.10.0.0/24 --gateway=10.10.0.1 --aux-address=server=10.10.0.12 --ip-range=10.10.0.192/26 -o parent=br0 br0
Error response from daemon: network dm-b1dc44cc930f is already using parent interface br0

 

Edited by smdion

It can not create the custom network "br0" because internally docker has it already assigned to something else.

 

Did you change your network settings somewhere in the process, e.g. added bridging later or removed bonding?

 

There is no possibility to tell docker to remove the old assignment (at least I couldn't find it). The workaround is to completely delete the docker image and recreate it, plus re-installing the containers

It happened when I added the VLAN to an existing bridge. I'll see if I can recreate it. Rebuilding isn't that bad.

4 minutes ago, smdion said:

It happened when I added the VLAN to an existing bridge. I'll see if I can recreate it. Rebuilding isn't that bad.

 

Perhaps you want to test this in two steps.

 

First create br0 only and check if it works

Second add the VLAN interface and check again

 

Ps. While developing I did test VLANs and it was working, but this has been some time ago.

Edited by bonienl

Test 1 (no changes to vlans)

  1. recreated docker image
  2. added container
  3. able to chose br0
    1. br0.10 does not show in dropdown
    2. when attempting to add DHCP pool, able to type in information, but hitting apply clears out field

Test 2 (deleting and recreating vlans)

  1. Delete docker image
  2. removed all vlans
  3. recreated docker image
  4. able to chose br0
  5. added vlan on br0.10
  6. able to chose br0
    1. br0.10 does not show in dropdown
    2. when attempting to add DHCP pool, able to type in information, but hitting apply clears out field

Edited by smdion

After Test 2:

 

docker network ls

NETWORK ID          NAME                DRIVER              SCOPE
bf9cb0b23d8e        br0                 macvlan             local
a6ce9d49136e        bridge              bridge              local
dfcda7660adb        host                host                local
95ce9e830426        none                null                local

note (br0.10 exists in unRAID ifconfig)

root@Redemption:/mnt/cache/system/docker# ip -4 route show dev br0
default via 10.10.0.1 metric 1 
10.10.0.0/24 proto kernel scope link src 10.10.0.12 
root@Redemption:/mnt/cache/system/docker# ip -4 route show dev br0.10
default via 10.10.10.1 metric 2 
10.10.10.0/24 proto kernel scope link src 10.10.10.191 

(IP addy changed on br0.10 due to DHCP scope change on subnet)

Edited by smdion

Did a quick test and added VLAN 10. Have the same result as you. The network "none" is added. VLAN is not added. Obviously a bug o.O

Edited by bonienl

I'm going to try to break mine again tonight, probably not a bad idea to add an error in the GUI when it can't create the network?

The addition of the VLAN caused a code error in the script which does the creation of the custom networks and is called upon starting the docker service. That part is now corrected.

 

Will add syntax checking too.

 

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.