VM Unreachable When 4th Octet Value is set to `1` in private_network.

18 views
Skip to first unread message

danielbgarcia

unread,
Jun 21, 2019, 3:10:05 AM6/21/19
to Vagrant
Hi team,

I just made an observation where when you set a static private IP having the 4th octet with the value `1`, the VM becomes unreachable. Is this by design? What's the reason behind?

e.g.
  • 192.168.10.1
  • 192.168.20.1
  • 192.168.30.1
Cheers!

Brian Cain

unread,
Jun 21, 2019, 2:01:18 PM6/21/19
to vagra...@googlegroups.com
Hi There -

I don't know if you saw the output from Vagrant, but when I assign a private ip with the last octet being `1` I get this warning:

brian@localghost:vagrant-sandbox % be vagrant up
Bringing machine 'bork' up with 'virtualbox' provider...
==> bork: You assigned a static IP ending in ".1" to this machine.
==> bork: This is very often used by the router and can cause the
==> bork: network to not work properly. If the network doesn't work
==> bork: properly, try changing this IP.
...
...

It's possible, as the warning mentioned, that assigning one of those IPs has caused something to go wrong with your
network on the guest. There is nothing in Vagrant actually shutting down your network or anything. Vagrant simply creates
the network interface with the static IP defined in your Vagrantfile, so it's likely an issue with your VirtualBox network handling
that IP (or even an issue with the box you are using). For example, I was able to get this to work just fine with the bento/ubuntu-16.04 box:

brian@localghost:vagrant-sandbox % be vagrant ssh bork -c "ping www.google.com"                           ±[●][master]
PING www.google.com (172.217.3.164) 56(84) bytes of data.
64 bytes from sea15s11-in-f164.1e100.net (172.217.3.164): icmp_seq=1 ttl=63 time=9.18 ms
64 bytes from sea15s11-in-f164.1e100.net (172.217.3.164): icmp_seq=2 ttl=63 time=12.3 ms
64 bytes from sea15s11-in-f164.1e100.net (172.217.3.164): icmp_seq=3 ttl=63 time=11.5 ms
^C
--- www.google.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2005ms
rtt min/avg/max/mdev = 9.180/11.018/12.327/1.343 ms
Connection to 127.0.0.1 closed.

Hope that helps, thanks!

--
This mailing list is governed under the HashiCorp Community Guidelines - https://www.hashicorp.com/community-guidelines.html. Behavior in violation of those guidelines may result in your removal from this mailing list.
 
GitHub Issues: https://github.com/mitchellh/vagrant/issues
IRC: #vagrant on Freenode
---
You received this message because you are subscribed to the Google Groups "Vagrant" group.
To unsubscribe from this group and stop receiving emails from it, send an email to vagrant-up+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/vagrant-up/12b477f2-c482-4ebc-a4f5-cf4a8908c3f7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Brian Cain

Airton Arantes

unread,
Jun 23, 2019, 6:41:18 PM6/23/19
to Vagrant
Hi Daniel, 
Usually, IPs ending with ".1" or ."254" are used as a default gateway IP and vagrant is warning you (just warning) and maybe you could face some network reachability issues if you don't know what is happening in your network. 
Reply all
Reply to author
Forward
0 new messages