Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcpcd.conf
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rahulthewall
Veteran
Veteran


Joined: 01 Nov 2007
Posts: 1264
Location: Zürich

PostPosted: Mon Jan 05, 2009 12:14 pm    Post subject: dhcpcd.conf Reply with quote

Since resolv.conf is overwritten by dhcpcd on startup, I wanted to add the nameserver information in dhcpcd.conf. Below is how my dhcpcd.conf looks like, I have obviously made some mistakes in it, since it does not work. Would be glad if some one could point out what the mistake was.

Code:

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# dhcpcd-run-hooks uses these options.
option domain_name_servers 208.67.222.222, 208.67.220.220;
option domain_name, domain_search, host_name

# Most distros have ntp support.
option ntp_servers

# We should behave nicely on networks and respect their MTU.
# However, a lot of buggy DHCP servers set invalid MTUs so this is not
# enabled by default.
#option interface_mtu

_________________
Who shall guard the guards?
Back to top
View user's profile Send private message
richard.scott
Veteran
Veteran


Joined: 19 May 2003
Posts: 1497
Location: Oxfordshire, UK

PostPosted: Mon Jan 05, 2009 1:57 pm    Post subject: Reply with quote

AFAIK it's actually baselayout that is changing /etc/resolv.conf and not anything to do with DHCP at all! :roll:

You can add them into /etc/conf.d/net if you like and something as follows may work for you:

Code:
dns_domain_eth0="your.domain"
dns_servers_eth0="192.168.0.2 192.168.0.3"
dns_search_eth0="this.domain that.domain"


HTH

Rich
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Jan 05, 2009 3:52 pm    Post subject: Reply with quote

Quote:
# dhcpcd-run-hooks uses these options.
option domain_name_servers 208.67.222.222, 208.67.220.220;


No no no :)
The option directive in dhcpcd.conf just requests options from the DHCP server.
So if you don't want dhcpcd to touch resolv.conf, you ADD this to dhcpcd.conf

Code:
nohook resolv.conf


This is documented in the dhcpcd and dhcpcd.conf man page, although I now see that dhcpcd.conf man page could be improved a little.

dhcpcd-5 will allow you to override DHCP variables in dhcpcd.conf, so you WILL (ie, not with any dhcpcd version currently in portage) be able todo this

Code:
static domain_name_servers=208.67.222.222 208.67.220.220

_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
rahulthewall
Veteran
Veteran


Joined: 01 Nov 2007
Posts: 1264
Location: Zürich

PostPosted: Tue Jan 06, 2009 5:56 am    Post subject: Reply with quote

OK, I have no idea what happened. I was messing around with resolv.conf and dhcpcd.conf and now I can no longer connect to the wireless network on my Linux. No clue what happened. Mwaaaaaa :(
_________________
Who shall guard the guards?
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Tue Jan 06, 2009 8:10 am    Post subject: Reply with quote

Darn, another crystal ball broken :(
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
rahulthewall
Veteran
Veteran


Joined: 01 Nov 2007
Posts: 1264
Location: Zürich

PostPosted: Tue Jan 06, 2009 4:37 pm    Post subject: Reply with quote

How to get a new one? :P
_________________
Who shall guard the guards?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum