Jump to content

Docker default IP addressing


jakethecatuk

Recommended Posts

Got a problem with Docker configuration that I'm struggling to resolve and it's to do with the default subnet Docker chooses to use.

 

My home LAN is 172.18.0.0 and I have a remote LAN on 172.17.0.0 connected via VPN.

 

When I start my unRaid server and Docker on my home LAN, the Docker0 interface sets itself an IP address of 172.17.0.1.

root@Tower:/usr/bin# ifconfig
docker0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        inet 172.17.0.1  netmask 255.255.0.0  broadcast 0.0.0.0
        ether 02:42:e4:5b:b4:da  txqueuelen 0  (Ethernet)

eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 9000
        inet 172.18.2.10  netmask 255.255.255.0  broadcast 0.0.0.0
        inet6 fe80::2fd:45ff:fefc:ef99  prefixlen 64  scopeid 0x20<link>
        ether 00:fd:45:fc:ef:99  txqueuelen 1000  (Ethernet)

root@Tower:/usr/bin# ip addr show
11: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9000 qdisc mq state UP group default qlen 1000
    link/ether 00:fd:45:fc:ef:99 brd ff:ff:ff:ff:ff:ff
    inet 172.18.2.10/24 scope global eth0
       valid_lft forever preferred_lft forever
    inet6 fe80::2fd:45ff:fefc:ef99/64 scope link
       valid_lft forever preferred_lft forever
23: docker0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
    link/ether 02:42:e4:5b:b4:da brd ff:ff:ff:ff:ff:ff
    inet 172.17.0.1/16 scope global docker0
       valid_lft forever preferred_lft forever

 

This causes problems when I try to connect to my unRaid server from my remote LAN (172.17.0.0) as unRaid sees 172.17.0.0 as local in Docker and does not return any data.

 

I've trawled around on how to resolve this and drawing a blank when it comes to Docker on unRaid.


Any suggestions welcome.

 

 

Link to comment

Archived

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

×
×
  • Create New...