Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Lookups,dhcpcd&the"auto-generated"/etc/resolv.conf (solved)
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
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Thu May 20, 2010 10:33 pm    Post subject: Lookups,dhcpcd&the"auto-generated"/etc/resolv. Reply with quote

The line "domain local" in the resolv.conf file generated by dhcpcd adds about 10-15 seconds to each dns lookup. If I manually remove the line then my browser lookups are almost instantaneous (High Speed ADSL).

Maybe "local" isn't correct and should be set to something else, but I'm a wits end. Manually editing the file is too tedious also.

Is the following correct?

# Generated by dhcpcd from ath0
# /etc/resolv.conf.head can replace this line
domain local
nameserver xxx.xxx.xxx.xx
nameserver xxx.xxx.xxx.xx
# /etc/resolv.conf.tail can replace this line


Last edited by jarealist on Sat May 22, 2010 2:34 am; edited 1 time in total
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7635
Location: Goose Creek SC

PostPosted: Fri May 21, 2010 12:56 am    Post subject: Reply with quote

remove
Quote:
dns_domain_lo="local"
from /etc/conf.d/net
Note: If you choose not to set a domainname, you can get rid of the "This is hostname.(none)" messages at your login screen by editing /etc/issue. Just delete the string .\O from that file.
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Fri May 21, 2010 2:04 am    Post subject: Reply with quote

DONAHUE wrote:

Quote:
remove
Quote:
dns_domain_lo="local"
from /etc/conf.d/net


I'm using a blank "/etc/conf.d/net" configuration file. My router assigns the three laptop IP addresses by MAC and I'm using "wicd" to manage my wireless interface.

I have my /etc/conf.d/domainname file set up as follows:

# /etc/conf.d/domainname

# When setting up resolv.conf, what should take precedence?
# If you wish to always override DHCP/whatever, set this to 1.
# 0 = let dhcp/whatever override DNSDOMAIN
# 1 = override dhcp/whatever with DNSDOMAIN

OVERRIDE=1

# To have a proper FQDN, you need to setup /etc/hosts and /etc/resolv.conf
# (domain entry in /etc/resolv.conf and FQDN in /etc/hosts).
#
# DNSDOMAIN merely sets the domain entry in /etc/resolv.conf, see
# the resolv.conf(5) manpage for more info.

DNSDOMAIN="hardmaple"

# For information on setting up NIS, please see:
# http://www.linux-nis.org/nis-howto/HOWTO/

NISDOMAIN=""

According to this it should be "hard-setting" the domain entry to what I have entered and shouldn't be changed to "local". Lookups work fine if I change "local" to my DNSDOMAIN setting of "hardmaple".
Back to top
View user's profile Send private message
DONAHUE
Watchman
Watchman


Joined: 09 Dec 2006
Posts: 7635
Location: Goose Creek SC

PostPosted: Fri May 21, 2010 2:45 am    Post subject: Reply with quote

Pretending your interface name is eth0, use your own if you use any of this

I don't do wicd, thought wicd ignored /etc/conf.d/net and /etc/init.d/net.eth0, however
/etc/conf.d/net:
Quote:
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 10"
dhcp_eth0="nodns"
dns_servers_eth0=( "xxx.xxx.xxx.xxx 4.2.2.6" )
works for no wicd to keep the nameservers as I want them

xxx.xxx.xxx.xxx ip of router
4.2.2.6 public dns server, pick your own if you wish
add the isp's name servers if you wish
Back to top
View user's profile Send private message
jarealist
Apprentice
Apprentice


Joined: 07 Oct 2002
Posts: 228

PostPosted: Sat May 22, 2010 2:31 am    Post subject: Reply with quote

DONAHUE wrote:

Quote:
works for no wicd to keep the nameservers as I want them


Well after trying many things , including openresolv, looking for a method to stop "search" or "domain" from being written to my resolv.conf I finally surrender and used your suggestion which works just fine. /etc/resolv.conf now just includes only the nameservers. Maybe I'm still over looking something, but I can't see it.

Thanks for your help.
Back to top
View user's profile Send private message
dalek
Veteran
Veteran


Joined: 19 Sep 2003
Posts: 1344
Location: Mississippi USA

PostPosted: Sat Aug 21, 2010 6:35 am    Post subject: Reply with quote

For future reference this worked for me:

Code:
modules="dhcpcd"
config_eth2="dhcp"
dhcp_eth2="nodns"
dns_servers_eth2="8.8.8.8 8.8.4.4"


That gives me this resolv.conf:

Quote:
root@smoker / # cat /etc/resolv.conf
# Generated by net-scripts for interface eth2
nameserver 8.8.8.8
nameserver 8.8.4.4

root@smoker / #


:D :D
_________________
My rig: Gigabyte GA-970A-UD3P mobo, AMD FX-8350 Eight-Core CPU, ZALMAN CNPS10X Performa CPU cooler,
G.SKILL 32GB DDR3 PC3 12800 Memory Nvidia GTX-650 video card LG W2253 Monitor
9TBs of hard drive space using LVM
Cooler Master HAF-932 Case
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