Page 1 of 1

Want DHCP on IP but NOT on DNS. How can I do this?[Solved]

Posted: Thu Jan 10, 2008 21:16
by PaulFXH
I'm just in the process of setting up Sabayon 3.4f to run on my MacBook and going OK so far.
However, I need to run with specific DNS servers and not just the default DNS (router address).
Now I know I can do this through net-setup but this also requires me to choose just one IP.
What I want, and what I have done in other distros, is to DHCP the IPs but to add my own preferred DNS servers.
In Ubuntu, I use /etc/dhcp3/dhclient.conf for this but there isn't anything exactly similar in Sabayon AFAICS.
I might be able to use /etc/resolv.conf but how do I stop the DHCP from overwriting this?
Can anybody please advise?

Re: Want DHCP on IP but NOT on DNS. How can I do this?

Posted: Fri Jan 11, 2008 1:13
by PaulFXH
OK, I've actually resolved this by using the existing /etc/dhcp/dhclient.conf.sample, modifying the file to prepend the DNSs I wanted and then saving the file as /etc/dhcp/dhclient.conf
Works perfectly although I still can't believe it took so long to see that example file was already there waiting to be modified. :oops: