Ubuntu Server 12.04 Name Resolution
I just installed ubuntu server 12.04 and for my surprise network configuration has changed.
Basically, by default the /etc/network/interfaces has a dynamic ip address:
auto eth0
iface eth0 inet dhcpWith such a configuration I can ping any internet site...
However, when I changed it to:
auto eth0
iface eth0 inet static address 192.168.0.120 netmask 255.255.255.0 gateway 192.168.0.1 dns-nameservers 192.168.0.1Things just stop work!!! I've read the manual page hundred times to see what a hell I'm doing wrong and I just could not found what!!!
Any help is appreciated.
11 Answer
I need some additional information. Forgive me for asking the obvious, but have you restarted the server? If not, please do so and retest.
First, can you ping your gateway IP address? Type ping 192.168.0.1 and press enter.
Another area to test, type ifconfig and press enter. Do you see eth0 listed with the inet addr of 192.168.0.120? Do you see any other interface listed in the left column other than eth0 and lo?
Also, we need to rule out that this is a DNS issue. At the terminal type dig | grep SERVER and press enter. You should see 192.168.0.1 in the line returned. If that is the case, type dig google.com and press enter. This should return a list of google's IP addresses. You also might want to consider adding these lines to your /etc/network/interfaces file:
network 192.168.0.0
broadcast 192.168.0.255
Then restart the server and retest.
What type of environment is the server running in? I am assuming this might be a home network with a router. When the server is running correctly from the dynamic IP address, what is the information returned by ifconfig? Answering these questions will be helpful and will provide me with a better starting point.
1