# dns resolution fails, where IP layer is alive

## das bletch

My laptop suddenly stopped being able to translate host names, though I can ping out and get responses, (i can also look up website via ip address), the dns won't allow anything above that level from happening.

Ive edited resolve.conf, hosts, host.conf, and been over them so many times I can't figure out what is going on.

I can post contents of those files, though at this point I think the problem lays elsewhere, where I haven't thought of looking.

----------

## PaulBredbury

WRONG filename. It's /etc/resolv.conf

I always recommend using BIND for DNS.

----------

## das bletch

correct, i was assuming /etc/resolve.conf

I've set the nameserver to 192.168.1.254, which should work since its the gateway, but still no luck. another gentoo machine has no problem being online, and I can't see any difference in how they are configured.

I just moved and was using the laptop to get wireless via wifoo ninja tricks, until i was wired. but ever since then, the dns thing keeps happening.

Is there any possiblity that poisoning the arp cache  of ap's could have some strange side effect on my machine?

----------

## pigeon768

Try setting the nameserver to 8.8.8.8 (google's public dns server) and/or 4.2.2.2 (L3's (?) public dns server).

If it works, the problem is with your dns server.

----------

## lindegur

Editing /etc/resolv.conf is not so wise, since it will be overwritten by programs as dhcp or even gentoo initscripts. 

```
cat /etc/resolv.conf
```

 should show you what is inside. A better place to add nameservers is /etc/coonf.d/net where you can add a long list of nameservers as:

```
dns_servers_eth0=( "192.168.1.1 78.159.101.37 217.79.186.148" )
```

 I assume the first IP address is your router, the other two are OpenNIC nameservers, so you get also names as: http://www.opennic.glue

----------

