I had a similar issue, just with the private network setup and the static IP. The IP address I used for months (192.168.10.10
) was suddenly unreachable, although I was able to access the virtual machine with vagrant ssh
.
Changing the static IP to 192.168.10.192
solved the problem. The solution here was to change the IP so it doesn't collide with any other machine on the same network.
Here you can find the following notes:
It is up to the users to make sure that the static IP doesn't collide with any other machines on the same network.
While you can choose any IP you'd like, you should use an IP from the reserved private address space. These IPs are guaranteed to never be publicly routable, and most routers actually block traffic from going to them from the outside world.
For some operating systems, additional configuration options for the static IP address are available such as setting the default gateway or MTU.
Warning! Do not choose an IP that overlaps with any other IP space on your system. This can cause the network to not be reachable.
In Vagrantfile you can configure the static IP like this
Vagrant.configure("2") do |config|
config.vm.network "private_network", ip: "192.168.10.192"
end
Or, in case you're using Homestead like I do, just update your Homestead.yaml
configuration file:
---
ip: "192.168.10.192"
# the rest of the configuration...
And a quick note for the end - my issue possibly wasn't identical as the one here, but since I stumbled upon this question, probably other users will too.
Does http://superuser.com/a/705625/103551 contain the solution? If so, please accept it as the answer.
– Cees Timmerman – 2016-03-09T12:36:45.773I had a similar problem, and I think it was weird staleness of IPs. After changing the IPs (which were arbitrary anyway), it started working again: https://superuser.com/a/1214376/74576
– Ryan – 2017-11-03T14:45:59.887