# no dns with gentoo and openwrt router [solved - workaround]

## DaggyStyle

Greetings,

I've got a new router and installed openwrt on it, since then I'm getting a weird behavior on my gentoo, after boot, I have no DNS, this causes ping www.ask.com to fail.

but if I restart the bridge, it works ok.

any ideas what might be the issue?

----------

## Tony0945

Ask yourself, "What was the last thing I changed?"

----------

## DaggyStyle

 *Tony0945 wrote:*   

> Ask yourself, "What was the last thing I changed?"

 

seriously? check my previous post.

----------

## baaann

I haven't got a new router but I did have the same issue earlier in the week.

When I checked /etc/resolv.conf it was empty, as far as I could ascertain a file could not be found when writing it during boot. I didn't have a lot of time and had long been intending to try DHCPCD. It worked a treat and has been fine since. So I suggest you check your resolv.conf when your DNS is missing(temporary fix add router address to it)

----------

## szatox

A shot in the dark, dhcpd starts before your LAN has it's IP assigned.

This way dhcpd doesn't know it's supposed to listen there and ignores incoming requests, so your clients either don't have IP set at all or configure it with other mechanisms, that can't provide gateway or dns IPs

----------

## DaggyStyle

 *szatox wrote:*   

> A shot in the dark, dhcpd starts before your LAN has it's IP assigned.
> 
> This way dhcpd doesn't know it's supposed to listen there and ignores incoming requests, so your clients either don't have IP set at all or configure it with other mechanisms, that can't provide gateway or dns IPs

 

how is that even possible?

----------

## DaggyStyle

 *baaann wrote:*   

> I haven't got a new router but I did have the same issue earlier in the week.
> 
> When I checked /etc/resolv.conf it was empty, as far as I could ascertain a file could not be found when writing it during boot. I didn't have a lot of time and had long been intending to try DHCPCD. It worked a treat and has been fine since. So I suggest you check your resolv.conf when your DNS is missing(temporary fix add router address to it)

 

that is correct, /etc/resolv.conf was empty.

so I've worked around it for now by disabling dns and defining it hardcoded.

that solves the issue for now.

----------

