Static IP on an Ubuntu 16 Server and VirtualBox
-
Hello,
I am trying to set up FOG with an Ubuntu 16.04 LTS Server running on a VirtualBox.
After reading a guide I followed the instructions and all worked really well until I had to set up a static IP.
I use the command nano /etc/network/interfaces
But after editing the files, my Ubuntu server loses connection to the internet.
I change from
to
The numbers are different, of course.
The address and netmask stays the same. The gateway and dns-nameservers are found out by using ipconfig /all an my Windows PC.Can anyone help me, please?
-
Did you happen to notice the differences in subnet between dhcp and static?
Under dhcp you had a 10.x.x.xx subnet. That makes me think you are using a nat interface under virtualbox and not a bridged network interface.
-
With your fog server configured in dhcp mode it would be interesting to compare the output of
ip addr show
using dhcp vs what you have configured for a static interface.Then once you are in static mode see if you can
ping 8.8.8.8
And lastly see if you can
ping www.dell.com
That will properly test your network connectivity.
Also be aware if you have a virtual box VM.
- You must bridge the FOG server nic to the physical NIC.
- You install FOG after you have a static NIC defined. FOG does not like the IP address of the FOG server to change after FOG is installed.
-
ip addr show
for dhcp
for static
ping 8.8.8.8
for a static IP address
ping www.dell.com
My two variants of the interfaces file look like this:
static
dhcp
-
Did you happen to notice the differences in subnet between dhcp and static?
Under dhcp you had a 10.x.x.xx subnet. That makes me think you are using a nat interface under virtualbox and not a bridged network interface.
-
I found my mistake
- The IP was wrong
- the old VM snapshot had NAT instead of bridged network interface enabled
Thank you very much for the fast support.