I had some trouble getting the static ip configuration right for Ubuntu 12.04 Server. Every time I would restart the server the nameserver settings in /etc/resolv.conf
would get overwritten by dhcp client. Many tutorials suggest doing an apt-get remove for dhcp-client but this didn't work for me either.
I found this page that documents how to do this in 12.04.
Answer:
You basically need to add your nameserver settings in the /etc/network/interfaces
file like so:
iface eth0 inet static
address xx.xx.xx.xx
netmask xx.xx.xx.xx
network xx.xx.xx.xx
broadcast xx.xx.xx.xx
gateway xx.xx.xx.xx
dns-nameservers xx.xx.xx.xx xx.xx.xx.xx
Note that dns-nameservers is where you add your DNS nameservers (they didn't get creative with the name, heh!)