From: Dale <rdalek1967@gmail.com>
To: gentoo-user@lists.gentoo.org
Subject: Re: [gentoo-user] DHCPCD and nameserver
Date: Sat, 21 Aug 2010 17:24:19 -0500 [thread overview]
Message-ID: <4C705213.4050905@gmail.com> (raw)
In-Reply-To: <20100821113047.4c98e6ba@marcec.huntemann.uni-oldenburg.de>
Marc Joliet wrote:
> Am Sat, 21 Aug 2010 09:15:26 +0059
> schrieb Jorge Almeida<jjalmeida@gmail.com>:
>
> [...]
>
>> I don't know about dhcpcd, but I'm using dhclient, and it works like this:
>> $cat /etc/resolv.conf
>> config_eth0=("dhcp")
>> modules_eth0=("dhclient")
>> dhcp_eth0="nodns"
>>
>> I'm not sure the last line is necessary.
>> Then:
>>
>> $ cat /etc/dhcp/dhclient.conf
>> append option domain-name-servers 127.0.0.1
>>
>> Substitute 127.0.0.1 by 8.8.8.8
>>
> With dhcpcd you can do something similar. When I was setting up dnsmasq on my
> system I found out you can create hooks for dhcpcd; for instance,
> in /etc/dhcpcd.enter-hook I have (well, now "had"):
>
> # Prepend localhost to the list of DNS servers
> new_domain_name_servers="127.0.0.1 ${new_domain_name_servers}"
>
> The resulting resolv.conf:
>
> marcec marcec # cat /etc/resolv.conf
> # Generated by dhcpcd from eth0
> # /etc/resolv.conf.head can replace this line
> search huntemann.uni-oldenburg.de
> nameserver 127.0.0.1
> nameserver 192.168.0.250
> # /etc/resolv.conf.tail can replace this line
>
> However, the comments in resolv.conf indicate you you can create one or both of
> /etc/resolv.conf.{head,tail}, which will be merged into /etc/resolv.conf
> automatically! The resulting resolv.conf:
>
> marcec marcec # cat /etc/resolv.conf
> # Generated by dhcpcd from eth0
> # force localhost as first nameserver
> nameserver 127.0.0.1
> search huntemann.uni-oldenburg.de
> nameserver 192.168.0.250
> # /etc/resolv.conf.tail can replace this line
>
> So both methods are slighly different. I think I'll stick with the latter now,
> as I think it's more correct. However, I'm not sure whether this works with
> other DHCP clients or just for dhcpcd.
>
>
>> HTH
>>
>> Jorge
>>
> HTH
> --
> Marc Joliet
> --
> Lt. Frank Drebin: "It's true what they say: cops and women don't mix. Like
> eating a spoonful of Drāno; sure, it'll clean you out, but it'll leave you
> hollow inside."
>
I read about the head/tail files but wasn't sure what they did or how it
worked. I need new glasses so I can see better. I spend more time
trying to read than being able to understand what I read. -_- <<==
That would be eyes closed.
I guess I could have created a head file and just put my prefs on top.
Thing is, I just removed the overlays so now I don't even need this.
lol Then again, those are faster than my ISPs servers. Still better off.
Thanks for the info. I learned something.
Dale
:-) :-)
prev parent reply other threads:[~2010-08-21 22:25 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-21 6:16 [gentoo-user] DHCPCD and nameserver Dale
2010-08-21 8:16 ` Jorge Almeida
2010-08-21 8:26 ` Dale
2010-08-21 8:50 ` Jorge Almeida
2010-08-21 9:30 ` Marc Joliet
2010-08-21 22:24 ` Dale [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4C705213.4050905@gmail.com \
--to=rdalek1967@gmail.com \
--cc=gentoo-user@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox