Docker fixed IP not working


ZataH

Recommended Posts

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": {}
    }
]

 

Link to comment

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.

 

Link to comment
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 

Link to comment
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. 

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.