# Domain failure??

## Chbr

Hello!

My problem is that I can not ping www.gentoo.org. But i can ping it by IPaddress..

Everytime i boot my PC /etc/resolv.cong is overeritten with: domain (mydomainname)..

It works if I boot from the install cd and copy /etc/resolv.conf  to  /mnt/gentoo/etc/resolv.conf

```
cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
```

Anybody have an idea of what is wrong??

----------

## PMcCauley

Hello Chbr, the /etc/resolv.conf will contain dns information which is your issue.  As to why this is occuring you will have to look further into it and provide more detail.  Are you using DHCP?  Anything specific about your setup you think will help?

Patrick

----------

## wynn

 *Chbr wrote:*   

> Hello!
> 
> My problem is that I can not ping www.gentoo.org. But i can ping it by IPaddress..
> 
> Everytime i boot my PC /etc/resolv.cong is overeritten with: domain (mydomainname)..
> ...

 You may have a line in your /etc/conf.d/net which causes your /etc/resolv.conf to be overwritten. One line which does this (baselayout-1.12.x) is

```
dns_domain_eth0="your.domain"
```

If this is the cause, you can add the lines

```
dns_servers_eth0="192.168.0.2 192.168.0.3"

routes_eth0=( "default via 192.168.0.1" )
```

This is from /etc/conf.d/net.example, you will have to change these IP addresses to suit your setup but this will give you back a working resolv.conf.

If you are using DHCP and you wish to set a hostname and a domainname then this is not the solution for you.

You will have to remove the "dns_domain" line from your /etc/conf.d/net and add

```
dhcp_eth0="nosendhost"
```

If you are using net-misc/ntp then you will have your own /etc/ntp.conf and you should add "nontp" as well.

To set your hostname and domain name you need the instructions from the Gentoo QuickInstall Guide *Quote:*   

> Set your host name in /etc/conf.d/hostname and /etc/hosts. In the following example, we use mybox as host name and at.myplace as domain name. You can either edit the config files with nano or use the following commands:
> 
> ```
> livecd / # cd /etc
> 
> ...

 You don't need to boot up the install CD to do this, you can perform the instructions from your booted installation.

----------

## Chbr

Thank you very much for good help!

It works fine now!

----------

