As we know Ubuntu 12.04 use resolvconf(a set of scripts and hooks) instead of resolv.conf to manage DNS server.Below steps will show you how to disable resolvconf and re-enable /etc/resolv.conf in Ubuntu 12.04.
If you just want to add a static DNS server in Ubuntu 12.04 ,it’s recommended to refer Set DNS server in Ubuntu 12.04
1.Open a terminal by pressing CTL+ALT+t
2.By default /etc/resolv.conf is a link file of /etc/resolvconf/resolv.conf,so let remove this link
sudo rm -f /etc/resolv.conf
3.Create /etc/resolv.conf as a regular file and add your DNS servers to this file.We add Google DNS server 22.214.171.124 and 126.96.36.199 to resolv.conf as example.
sudo gedit /etc/resolv.conf
4.You are done,you can verify your new DNS server now.Eg: