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 fixed IP not working

Featured Replies

I cant get fixed ip to work.

image.thumb.png.863d0745d72a7d4685bba0d23be4b30f.png

If I bash into the container. It show the correct IP, but I cant ping the gateway or internet. 

 

image.thumb.png.d076f93466fb649b6bc442d82235ab3f.png

  • Author
root@UNRAID:~# docker network inspect br0
[
    {
        "Name": "br0",
        "Id": "4727b45330d87b6e9a0cd5c591976f046661a7af882454365108f8e8d783f6ac",
        "Created": "2018-04-14T01:31:36.046721335+02:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "192.168.88.0/24",
                    "IPRange": "192.168.88.64/27",
                    "Gateway": "192.168.88.1",
                    "AuxiliaryAddresses": {
                        "server": "192.168.88.18"
                    }
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "864251751e85bc3cdb3daee227d879c66c3f938437e93a53c2eab524cc6ad34b": {
                "Name": "muximux",
                "EndpointID": "da24bc53dc0582d7a38871a13834ee060a9e22bbcddd5c130aa6816f7980805a",
                "MacAddress": "02:42:c0:a8:58:55",
                "IPv4Address": "192.168.88.85/24",
                "IPv6Address": ""
            }
        },
        "Options": {
            "parent": "br0"
        },
        "Labels": {}
    }
]

 

The DHCP range for your containers is set as 192.168.88.64/27, which means a range from 192.168.88.64 to .95

 

When you assign a fixed address it should be outside the DHCP range to avoid possible conflicts. Instead of .85 take another number. Also keep in mind that this number should not fall in the DHCP range as set on your router.

 

  • Author
5 minutes ago, bonienl said:

The DHCP range for your containers is set as 192.168.88.64/27, which means a range from 192.168.88.64 to .95

 

When you assign a fixed address it should be outside the DHCP range to avoid possible conflicts. Instead of .85 take another number. Also keep in mind that this number should not fall in the DHCP range as set on your router.

 

I had it without DHCP at first, but tried to activate it, since it didnt work.

docker inspect without dhcp

root@UNRAID:~# docker network inspect br0
[
    {
        "Name": "br0",
        "Id": "946d6ee3adc17818128233f82f290f17909787f82ac9ca0acd7cb9ab6d4b4c55",
        "Created": "2018-04-14T11:25:32.688558138+02:00",
        "Scope": "local",
        "Driver": "macvlan",
        "EnableIPv6": false,
        "IPAM": {
            "Driver": "default",
            "Options": {},
            "Config": [
                {
                    "Subnet": "192.168.88.0/24",
                    "Gateway": "192.168.88.1",
                    "AuxiliaryAddresses": {
                        "server": "192.168.88.18"
                    }
                }
            ]
        },
        "Internal": false,
        "Attachable": false,
        "Ingress": false,
        "ConfigFrom": {
            "Network": ""
        },
        "ConfigOnly": false,
        "Containers": {
            "e95b0404137f8e295b6105dcef72ca103c2f665f0ef3aeb51751d8662b7f9480": {
                "Name": "muximux",
                "EndpointID": "43a95bc4d0e5ba78ee94ce409910edb0048d1b392901f6a1633f79979edfeca5",
                "MacAddress": "02:42:c0:a8:58:55",
                "IPv4Address": "192.168.88.85/24",
                "IPv6Address": ""
            }
        },
        "Options": {
            "parent": "br0"
        },
        "Labels": {}
    }
]

 And still doesnt work 

How does the routing look like from inside your container?

docker exec -it muximux bash
$ route -n

This is an example from my container

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         10.0.101.1      0.0.0.0         UG    0      0        0 eth0
10.0.101.0      0.0.0.0         255.255.255.0   U     0      0        0 eth0

 

  • Author
root@e95b0404137f:/$ route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.88.1    0.0.0.0         UG    0      0        0 eth0
192.168.88.0    0.0.0.0         255.255.255.0   U     0      0        0 eth0

 

Everything on the unRAID side looks fine and is set as expected.

 

Perhaps it is an issue on your router? Does it have any firewall rules which may prevent communication?

 

  • Author
On 14/04/2018 at 11:47 AM, bonienl said:

Everything on the unRAID side looks fine and is set as expected.

 

Perhaps it is an issue on your router? Does it have any firewall rules which may prevent communication?

 

 

Just wanted to give an update on this.

When I started the thread I was running UnRAID through vmware.

I have since then migrated to physical. And now it is working fine. So maybe vmware was blocking it somehow. 

There's a setting in most variants of vmware that prevents unknown/generated MAC addresses from appearing and working on a vswitch port connected to a VM.

That's what was probably blocking your docker network from working.

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.