Container networking lost when OSX host switches to a new router

ISSUE: Just trying to get a simple ping to work

While I am connected to the internet through my regular router. My containers (ubuntu based) can access the network just fine. I can ping google.com and 8.8.8.8 However, when I need to access a private network and connect to my Airport Express router, my container can never ping any of the devices on that private network, while the host machine can access these devices just fine. Typically I’ll try to ping 172.17.0.32 From the MAC side, everything works fine, but from the ubuntu container, no workey :< When I switch back to the internet router, all is back to normal again.

In both cases the host connects to the router via DHCP… except when I try to connect via wired connection.

I Have tried the following:
–creating a new network on the subnet used by the private router and connecting the container. (same result)
–connecting via wired and wireless connections. (same result)
–I have restarted Docker after connecting to the private network and then rerun the container. (same result)

GORY DETAILS:

host ifconfig:
PA026623:Documents rick$ ifconfig -a
lo0: flags=8049<UP,LOOPBACK,RUNNING,MULTICAST> mtu 16384
options=3<RXCSUM,TXCSUM>
inet6 ::1 prefixlen 128
inet 127.0.0.1 netmask 0xff000000
inet6 fe80::1%lo0 prefixlen 64 scopeid 0x1
inet 10.200.10.1 netmask 0xffffff00
nd6 options=1
gif0: flags=8010<POINTOPOINT,MULTICAST> mtu 1280
stf0: flags=0<> mtu 1280
en0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 98:01:a7:a1:06:77
inet6 fe80::9a01:a7ff:fea1:677%en0 prefixlen 64 scopeid 0x4
inet 172.26.70.17 netmask 0xffffff80 broadcast 172.26.70.127
nd6 options=1
media: autoselect
status: active
en1: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 6a:00:02:44:51:f0
media: autoselect
status: inactive
en2: flags=963<UP,BROADCAST,SMART,RUNNING,PROMISC,SIMPLEX> mtu 1500
options=60<TSO4,TSO6>
ether 6a:00:02:44:51:f1
media: autoselect
status: inactive
p2p0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 2304
ether 0a:01:a7:a1:06:77
media: autoselect
status: inactive
awdl0: flags=8943<UP,BROADCAST,RUNNING,PROMISC,SIMPLEX,MULTICAST> mtu 1484
ether fa:41:f3:21:83:00
inet6 fe80::f841:f3ff:fe21:8300%awdl0 prefixlen 64 scopeid 0x9
nd6 options=1
media: autoselect
status: active
bridge0: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
options=63<RXCSUM,TXCSUM,TSO4,TSO6>
ether 9a:01:a7:1a:17:00
Configuration:
id 0:0:0:0:0:0 priority 0 hellotime 0 fwddelay 0
maxage 0 holdcnt 0 proto stp maxaddr 100 timeout 1200
root id 0:0:0:0:0:0 priority 0 ifcost 0 port 0
ipfilter disabled flags 0x2
member: en1 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 5 priority 0 path cost 0
member: en2 flags=3<LEARNING,DISCOVER>
ifmaxaddr 0 port 6 priority 0 path cost 0
nd6 options=1
media:
status: inactive
vmnet1: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:01
inet 172.16.155.1 netmask 0xffffff00 broadcast 172.16.155.255
vmnet8: flags=8863<UP,BROADCAST,SMART,RUNNING,SIMPLEX,MULTICAST> mtu 1500
ether 00:50:56:c0:00:08
inet 192.168.209.1 netmask 0xffffff00 broadcast 192.168.209.255
utun0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1500
inet6 fe80::3b39:8eff:af35:d907%utun0 prefixlen 64 scopeid 0xd
nd6 options=1
PA026623:Documents rick$

Docker info:
PA026623:Documents rick$ docker info
Containers: 1
Running: 1
Paused: 0
Stopped: 0
Images: 50
Server Version: 1.12.5
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 57
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: null host overlay bridge
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Security Options: seccomp
Kernel Version: 4.4.39-moby
Operating System: Alpine Linux v3.4
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 1.951 GiB
Name: moby
ID: 7XTF:FZMG:KV6D:SNME:DV5W:5V2V:XE5Y:4NG5:PY4L:CXDV:YOSV:TB4N
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): true
File Descriptors: 24
Goroutines: 40
System Time: 2017-01-10T01:29:40.19642433Z
EventsListeners: 1
No Proxy: *.local, 169.254/16
Registry: https://index.docker.io/v1/
WARNING: No kernel memory limit support
Insecure Registries:
127.0.0.0/8

CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8a5acde1f2d2 x3t “/bin/sh -c 'cat /hom” 40 minutes ago Up 40 minutes 0.0.0.0:32775->20/tcp, 0.0.0.0:32774->21/tcp, 0.0.0.0:32773->22/tcp, 0.0.0.0:32772->23/tcp peaceful_bell

Container ip addr

root@8a5acde1f2d2:/home# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: tunl0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1
link/ipip 0.0.0.0 brd 0.0.0.0
3: gre0@NONE: mtu 1476 qdisc noop state DOWN group default qlen 1
link/gre 0.0.0.0 brd 0.0.0.0
4: gretap0@NONE: <BROADCAST,MULTICAST> mtu 1462 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:00:00:00:00 brd ff:ff:ff:ff:ff:ff
5: ip_vti0@NONE: mtu 1428 qdisc noop state DOWN group default qlen 1
link/ipip 0.0.0.0 brd 0.0.0.0
6: ip6_vti0@NONE: mtu 1500 qdisc noop state DOWN group default qlen 1
link/tunnel6 :: brd ::
7: sit0@NONE: mtu 1480 qdisc noop state DOWN group default qlen 1
link/sit 0.0.0.0 brd 0.0.0.0
8: ip6tnl0@NONE: mtu 1452 qdisc noop state DOWN group default qlen 1
link/tunnel6 :: brd ::
9: ip6gre0@NONE: mtu 1448 qdisc noop state DOWN group default qlen 1
link/gre6 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00 brd 00:00:00:00:00:00:00:00:00:00:00:00:00:00:00:00
25: eth0@if26: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default
link/ether 02:42:ac:11:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0
inet 172.17.0.2/16 scope global eth0
valid_lft forever preferred_lft forever
inet6 fe80::42:acff:fe11:2/64 scope link
valid_lft forever preferred_lft forever

I must confess I am no TCP/IP guru and have not been able to find any reports of similar behavior. I can only assume I am doing something basically wrong.

Please let me know if anyone has any ideas or has seen anything similar.

Thank You

I have a similar problem with a new Docker installation. Docker can’t even access the internet for getting updates, accessing the image registry etc. I have a local net router behind my Internet router.

Did you ever solve this problem?