Couple things. First, I'm relatively new to linux in general. Second, I've done my best to scour google, youtube and other places for help on this first before coming here for help. I appreciate any and all direction you can provide!
Here's what's happening:
I am using VirtualBox to create VMs on my Windows 7 laptop. I have 3 VMs up and running -- one uses Ubuntu Server 14.04.1, another uses Ubuntu Desktop 14.04.1, and the third uses Debian 7.7.0. I am repeating all steps on all boxes.
After installing all of the OS's and confirming I could reach the internet fine via DHCP, I wanted to assign all of my machines static IPs. I used route -n to get my gateway, etc.
Here's what my /etc/network/interfaces file look like for Ubuntu Server. (The others look identical except for the IP addresses which are 192.168.1.130, 192.168.1.140, and 192.168.1.150, respectively):
auto eth0
iface eth0 inet static
address 192.168.1.130
netmask 255.255.255.0
gateway 192.168.1.1
I restarted networking with ifdown eth0 and ifup eth0 and confirmed the change with ifconfig. After this, I tried running apt-get-update to update my packages and found that I was getting Err and Failed to fetch messages. Next, I pinged 8.8.8.8 (which I had heard was Google). I got pings. Then, I tried wget google.com and got "Could not resolve..."
Next, I tried the same thing on Ubuntu Desktop. Got the same results, and confirmed via the graphical interface that when I tried to access the internet through a browser, I got nothing.
Did some poking around and found dhclient -r eth0 which got me internet connectivity back on both Ubuntu Server and Ubuntu Desktop. (Verified with ping and wget on Ubuntu Server and through a browser on Ubuntu Desktop). However, whenever I reboot the Ubuntu VMs, I get the same exact issue -- no connectivity without using dhclient -r eth0.
The reason I bring Debian into the mix is that when I tried the exact same steps for a static IP on Debian 7.7, none of the connectivity issues occurred; everything worked as I'd expected.
Can someone help shed some light on what's happening and how I can resolve it?
Much appreciated!