StaticDnsWithDhcp

Revision 1 as of 2005-10-01 19:26:53

Clear message

The default setup of Ubuntu does not make it easy to use static DNS servers while using DHCP. To get this working you need to edit /etc/dhcp3/dhclient.conf

Find the lines

#prepend domain-name-servers 127.0.0.1;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, domain-name-servers, host-name,
        netbios-name-servers, netbios-scope;

And change them to

prepend domain-name-servers 1.2.3.4, 1.2.3.5;
request subnet-mask, broadcast-address, time-offset, routers,
        domain-name, host-name,
        netbios-name-servers, netbios-scope;

Replace 1.2.3.4 and 1.2.3.5 with the addresses of your DNS servers.

Run

sudo invoke-rc.d networking restart

To mske the changes effective