I've configured a static IP address in file /etc/network/interfaces:
auto eth0
iface eth0 inet static
address 10.152.187.122
gateway 10.152.187.1
netmask 255.255.255.0
But I'd like DNS to be configured automatically with DHCP. For example, if I run dhclient, it populates /etc/resolv.conf properly. But I would like this to run at startup, and I'm not sure where the proper way to set that up.
This is on the UbuntuĀ 12.04 (Precise Pangolin) cloud image.
Best Answer
With DHCP, you get the DNS nameserver addresses that the router gets when it gets an IP address from your internet service provider (ISP). You can use the DNS nameserver addresses the router has like this: