This is how I set up a static ip on my ubuntu machine:
https://askubuntu.com/a/178981/630142
Pretend this happens:
I connect my ubuntu machine to a router (network) that assigns ip addresses
(192.168.0.X)Then I assign a static ip to my Ubuntu machine of
192.168.0.50.Ubuntu machine has internet connection and everything works great. I am able to ping
192.168.0.50from other computers on the same192.168.0.Xnetwork.Someone changes the router that has a different network mask
(192.168.10.X)instead of(192.168.0.X). So now devices that where connected through DHCP have a different ip.Because of this change now my Ubuntu machine is not able to connect to the internet. The ip address
192.168.0.50is no longer valid.
Now my question is: How do I know that the reason that I have no internet connection is because the network changed? I may check for internet by doing:
ping google.com
Maybe the ping does not work because the whole network lost internet connection. But how can I tell if the reason was because the whole network lost internet --OR- if it was because my static ip is not valid