Traditionally /etc/resolv.conf is modified to change the DNS server IP address. However, if resolvconf utility is installed (and it comes as default in ubuntu), then its not make sense to modify /etc/resolv.conf. Note that resolvconf utility overrides it whenever interface is restarted or whole machine is rebooted. Warning is mentioned in the file itself.
warning msg in resolv.conf
ubuntu:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.140.50.5
update the dns-nameservers line in /etc/network/interfaces
Updating /etc/network/interfaces
ubuntu:~$ cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
auto eth0
iface eth0 inet static
address 10.102.38.121
netmask 255.255.255.0
network 10.102.38.0
broadcast 10.102.38.255
gateway 10.102.38.1
# dns-* options are implemented by the resolvconf package, if installed
#dns-nameservers 10.102.38.1
dns-nameservers 10.140.40.5
Restart the interface
# ifdown eth01; ifup eth01
Now check /etc/resolv.conf entry. It should have updated entry
/etc/resolve.conf
ubuntu:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 10.140.40.5
Above steps can be used to modify interface ip address as well. So, in /etc/network/interfaces, IP address should be modified and then interface should be restarted.
http://askubuntu.com/questions/224966/how-do-i-get-resolvconf-to-regenerate-resolv-conf-after-i-change-etc-network-in