View previous topic :: View next topic |
Author |
Message |
rahulthewall Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3921494714948217d1c431.jpg)
Joined: 01 Nov 2007 Posts: 1264 Location: Zürich
|
Posted: Mon Jan 05, 2009 12:14 pm Post subject: dhcpcd.conf |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
richard.scott Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 19 May 2003 Posts: 1497 Location: Oxfordshire, UK
|
Posted: Mon Jan 05, 2009 1:57 pm Post subject: |
|
|
AFAIK it's actually baselayout that is changing /etc/resolv.conf and not anything to do with DHCP at all!
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 |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Jan 05, 2009 3:52 pm Post subject: |
|
|
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
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 |
|
![](templates/gentoo/images/spacer.gif) |
rahulthewall Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3921494714948217d1c431.jpg)
Joined: 01 Nov 2007 Posts: 1264 Location: Zürich
|
Posted: Tue Jan 06, 2009 5:56 am Post subject: |
|
|
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 ![Sad :(](images/smiles/icon_sad.gif) _________________ Who shall guard the guards? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
UberLord Retired Dev
![Retired Dev Retired Dev](/images/ranks/rank-retired.gif)
![](images/avatars/16007251014200867ea775c.gif)
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
rahulthewall Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
![](images/avatars/3921494714948217d1c431.jpg)
Joined: 01 Nov 2007 Posts: 1264 Location: Zürich
|
Posted: Tue Jan 06, 2009 4:37 pm Post subject: |
|
|
How to get a new one? ![Razz :P](images/smiles/icon_razz.gif) _________________ Who shall guard the guards? |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|