# err, eth0: Failed to lookup hostname via DNS

## betawind

Whenever I start my eth0 interface I get the below output:

Starting eth0

  Bringing up eth0

    dhcp

       Running dhcpcd ... err, eth0: Failed to lookup hostname via DNS: Name or service not known [ok]

       eth0 received address 172.16.134.64/24

I still have network connectivity but remote machines cannot resolve my dns name.  Below is my /etc/conf.d/net and /etc/hosts files

/etc/conf.d/net:

config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"

/etc/hosts:

127.0.0.1     localhost

127.0.0.1     BradDGentoo

::1              localhost

Any thoughts?  Any help would be greatly appreciated.

----------

## zaai

 *Quote:*   

> config_eth0=( "dhcp" )
> 
> dhcp_eth0="nodns nontp nonis" 

 

Maybe this isn't intentional but the option "nodns" tells dhcpcd to NOT update /etc/resolv.conf with the DNS server.

As a result there is no DNS and hostname resolution doesn't work, hence the error.

This can also be fine as long as /etc/resolv.conf contains an existing DNS server address.

----------

## UberLord

 *betawind wrote:*   

> err, eth0: Failed to lookup hostname via DNS: Name or service not known
> 
> ...
> 
> Any thoughts?  Any help would be greatly appreciated.

 

dhcpcd will lookup the hostname in DNS if not configured. That message means it couldn't be found. You can safely ignore it - I'll silence it in the next version.

Until then, this patch should also fix it

http://roy.marples.name/dhcpcd/dhcpcd-hostname.patch

----------

