# Domains not resolving

## shooga

I just finished installing Gentoo. Quite a time.  :Smile:  The network worked just fine while I was running in the install cd environment. However, once I rebooted and booted from the install on the machine, the network doesn't fully function. I can ping ip addresses, but when I try to ping a domain name, it gives me an error: "ping: unknown host google.com". This is obviously a problem. The internet isn't much good if I can't use domain names....

/etc/resolv.conf

```
domain homenetwork
```

/etc/conf.d/net

```
config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"
```

ifconfig eth0

```
eth0 Link encap:Ethernet HWaddr 00:50:2C:06:B0:04

inet addr:192.168.0.2 Bcast 192.168.0.255 Mask:255.255.0

UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1

RX packets:18 errors:0 dropped:0 overruns:0 frame:0

TX packets:9 errors:0 dropped:0 overruns:0 frame:0

collisions:0 txqueuelen:1000

RX bytes:2554 (2.4 Kb) TX bytes:1076 (1.0 Kb)

Interrupt:19 Base address:0xc000
```

Any and all help/suggestions are appreciated. I can't get a GUI up and running until I can get on the net to download it...[/code]

----------

## desultory

Is there a DHCP client installed on the system?

----------

## shooga

 *desultory wrote:*   

> Is there a DHCP client installed on the system?

 

Yes, as per the installation guide. I emerged dhcpcd. When I type dhcpcd at the prompt, here's what I get:

```
**** dhcpcd: already running

**** dhcpcd: if not then delete /var/run/dhcpcd-eth0.pid file
```

Do I need to emerge rp-PPPoE? It was an optional step and I figured that if I had never heard of it, I didn't need it.

----------

## Dizzutch

you have nodns in your dhcp options, that means that it won't save the DNS info that the DHCP server is sending to you, remove it and you'll be all set.

----------

## OldTango

I am having the same problem except thay my install is at least four years old.  Updated regulary and stable.  Over the last couple of months it seems that networking has been changing a lot.  I lost networking completely a few weeks ago and was able to get it back up and running pretty quick.

Yesterday for no reason my workstation started to crawl almost to a stop on every application I tryed to open.  When using gftp and firefox I noticed that it was taking an extremely long time to resolve names.  I have tryed to fix the problem but am unable to.  After a few attempts my workstation is now responding quickly again except that I have absolutely to name resolution capabilities.

The computers on my lan can only surf the net via ip addresses only.  This make using the web imposible if you don't know every sites ip.

My server works just fine and hands out ip's to the computers on the lan like it should.  When booting the server all boot messages look fine and it says this is host so and so @ domain so and so.

Booting the computers on the lan, boot messags say temporary host name look-up failure and ntp fails to set clocks.  The work stations report that this is host so and so @ unknown_domain.

I followed the gentoo home router guide to set this up years ago, but now it  no longer makes sense and it dosn't tell me how to undo what was done years ago using the old method.

I have read the netconfig.example but what once seemed simple has become complex and cryptic.  I am no networking guru and don't claim to be.

SERVER:  Gets it ip dynamiclly from isp and hands out ip's dynamically using dnsmasq /etc/conf.d/ net

```
modules=( "ifconfig" )

config_eth0=( "dhcp" )

config_eth1=( "192.168.0.1 broadcast 192.168.0.255 netmask 255.255.255.0" )
```

WORKSTATIONS: Get ther ip's dynamically form the server./etc/conf.d/net configured by a gentoo update and seemed to work untill yesterday.

```
config_eth0=( "dhcp" )

dhcp_etho="nodns nontp nonis"
```

Maybe somebody with a lot more networking knowledge than I have can help me solve this problem.

TIA

----------

## Dizzutch

the 'nodns' option means that the DHCP client doesn't save the DNS options the server sends to it, meaning you need to setup your own information in /etc/resolv.conf you'll need to verify those values.

----------

## OldTango

 *Dizzutch wrote:*   

> the 'nodns' option means that the DHCP client doesn't save the DNS options the server sends to it, meaning you need to setup your own information in /etc/resolv.conf you'll need to verify those values.

  Thanks for the quick response as I was writing the post and campared the SERVER and WORKSTATIONS /etc/conf.d/net files it  occured to me to give it a try and your post comfirmed it.  Now the WROSTATIONS can again resolve names.

I tried to edit the resolv.conf to fix this problem last night, but the resolv.conf is now dynamically rewriten on every boot.  So editing it is not going to work I don't belive.

I still don't have a domain name for the WORKSTATIONS when they boot and I used to have this functionality.  After the above mentioned fix.  The WORKSATIONS report this is host so and so@(none).  I would like to solve this as well if possible.  Everything is almost working now but I still can't access certian areas of the SERVER because thehost.whatever.net can't be resolved.  So no ftp, webmin or apache access.  These have been running on an internal private network for a long time untill recently.

TIA

----------

## shooga

 *Dizzutch wrote:*   

> you have nodns in your dhcp options, that means that it won't save the DNS info that the DHCP server is sending to you, remove it and you'll be all set.

 

No deal.  :Sad:  I removed nodns and it still doesn't resolve domain names. I've tired rebooting several times and also adding nameservers manually to resolv.conf. Upon rebooting, resolv.conf is rewritten I assume because the changes I make all go away. I can still ping an ip address, just no domain names.

----------

## Dizzutch

trace back to your DNS server.

do you run your own? or do you use a router to forward DNS queries?

----------

## shooga

 *Dizzutch wrote:*   

> trace back to your DNS server.
> 
> do you run your own? or do you use a router to forward DNS queries?

 

I am connected to a router. This PC is just a plain computer connected to a home network via a netgear router. 

but anyway, I fixed it. Dumb luck it would seem.  :Smile:  In my /etc/conf.d/net file, I took out the line dns_domain_lo="homenetwork" (along with removing nodns from dhcp_eth0 previously). I can now ping domain names! So I guess following the installation manual isn't perfect...

Thanks for everyone's help. I'm sure I'll be back for one thing or another.  :Smile: 

----------

## eigenVector

 *Dizzutch wrote:*   

> you have nodns in your dhcp options, that means that it won't save the DNS info that the DHCP server is sending to you, remove it and you'll be all set.

 

I've had this same exact issue...  

This post fixed it for me.  Thanks Dizzutch!

----------

