networking - docker-machine: No route to host to default docker machine (using host-only vbox network) on some wifi networks -
i'm running docker-machine on os x , works great on home wifi network (wifi-one).
on wifi network (wifi-two), cannot access default machine, either through docker-machine or pings. i've tried removing docker , virtual box software , caches , reinstalling while connected wifi-two, no avail.
docker-machine uses small vm in virtual box uses host-only vbox network (vboxnet0) communicate between host , vm.
on wifi-one, can ping gateway vboxnet0 (192.168.99.1), , can ping vm (192.168.99.100). in routing table, can see routes vm using right interface:
internet: destination gateway flags refs use netif expire default dlinkrouter ugsc 60 2 en0 ... dlinkrouter c0:a0:bb:xx:xx:xx uhlwiir 66 155 en0 1180 192.168.99 link#10 uc 2 0 vboxnet 192.168.99.100 8:0:27:db:16:21 uhlwii 2 42 vboxnet 1109 ...
on wifi-two, can ping vboxnet0 gateway, not vm. ping reports request timeout, docker-machine reports "no route host". routing table, while connected wifi-two, shows route vboxnet0 host-only network on wifi interface (en0), not vboxnet0 interface. curious default route route vboxnet0 gateway, no sign of wifi router in routing table. despite this, internet connectivity works fine on wifi-two.
internet: destination gateway flags refs use netif expire default 192.168.99.1 ugsc 46 0 en0 ... 192.168.99 link#4 ucs 9 0 en0 192.168.99.1/32 link#4 ucs 2 0 en0 192.168.99.1 dc:9f:db:2b:89:39 uhlwiir 46 61 en0 1197 192.168.99.100 link#4 uhlwii 1 3 en0
so, don't know problem here - router, mac os, virtual box or docker-machine. suspect there funny configuration of router, don't see why wifi router have routes virtualbox host-only network.
edit: manually deleting en0 route 192.168.99 via en0 , running sudo route -nv add -net 192.168.99 -interface vboxnet0
seem resolve on wifi-two.
but i'd understand why happening - why there no route vboxnet0 automatically when join wifi-two , i'd find better solution running route add
when i'm on wifi-two.
i figured out. it's kinda stupid:
wifitwo's subnet 192.168.99. same subnet docker uses host-only network creates default vm. conflict causing sorts of cryptic errors.
Comments
Post a Comment