Ubuntu was resetting necessary dns settings (search and nameserver) when receiving ip configuration from DHCP.
To set custom search and nameservers, you need to change/add following in
/etc/dhcp3/dhclient.conf
supersede domain-name "mydomain.com";
prepend domain-name-servers 192.168.1.10;
First line sets search to default to the domain suffix, and second line adds domain servers. If you use FQDN for the server name don’t forget to add name resolution to the host file.
Most of I it I figured out using this post.