# Lookups,dhcpcd&the"auto-generated"/etc/resolv.conf (solved)

## jarealist

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 lineLast edited by jarealist on Sat May 22, 2010 2:34 am; edited 1 time in total

----------

## DONAHUE

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.

----------

## jarealist

DONAHUE wrote:

 *Quote:*   

> remove
> 
> Quote:
> 
> dns_domain_lo="local"
> ...

 

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".

----------

## DONAHUE

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"
> ...

 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

----------

## jarealist

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.

----------

## dalek

For future reference this worked for me:

```
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
> ...

 

 :Very Happy:   :Very Happy: 

----------

