# Installation/network problem



## qap15 (Oct 10, 2009)

Have problem i can ping my LAN but when i try to ping name like http://www.test.com, i get 
cannot resolve http://www.test.com: host name lookup failure

problem 2 is that whenever i try to install anything using

```
cd /usr/ports/www/****
make install clean
```
i get "Stop in /usr/ports/www/***

What is it that im i not doing right help please


----------



## DutchDaemon (Oct 10, 2009)

What is in /etc/resolv.conf? Your ISP's nameservers should be in there. See resolver(5).


----------



## qap15 (Oct 10, 2009)

1. sorry, but i dont seem to have resolv.conf in /etc/???

2. should the nameserver be there even if i go through my LAN router?


----------



## DutchDaemon (Oct 10, 2009)

You must have a /etc/resolv.conf. If your router does the resolving, put its IP in there (nameserver ip.of.rou.ter).


----------



## qap15 (Oct 10, 2009)

something must be really wrong, maybe have to do a clean installation that file is missing.


----------



## aragon (Oct 11, 2009)

No, that file has to be manually created.  The installer doesn't create it for you.  You want to read resolver(5).


----------



## qap15 (Oct 11, 2009)

Sorry for being a nuisense to you guys, but i made the file and looked into my LAN router, it says the nameserver is resolved dynamically what do i do next? apart from the _resolv.conf _file do i need to do anything in _hosts.conf_ ?


----------



## DutchDaemon (Oct 11, 2009)

What is in /etc/resolv.conf now?


----------



## aragon (Oct 11, 2009)

qap15 said:
			
		

> i made the file and looked into my LAN router, it says the nameserver is resolved dynamically what do i do next?


I guess that probably means you need to set your LAN router to be your nameserver in resolv.conf.

Incidentally, have you tried using DHCP on your network interface?  If your router is a dhcp server, it'll probably publish correct name server info in dhcp, and dhclient will setup resolv.conf accordingly.


----------



## qap15 (Oct 11, 2009)

I thought that i did exactly that by putting the router gateway 192.168.1.1 into the /etc/resolv.conf 
code:
nameserver 192.168.1.1


----------



## qap15 (Oct 11, 2009)

sorry i see that the router gets the DNS from ISP


----------



## aragon (Oct 11, 2009)

Sounds about right.  From there the router either proxies dns requests by acting as a dns forwarder itself, or it advertises the ISP dns addresses in dhcp responses.


----------



## qap15 (Oct 11, 2009)

aragon said:
			
		

> Sounds about right.  From there the router either proxies dns requests by acting as a dns forwarder itself, or it advertises the ISP dns addresses in dhcp responses.



But by looking to what i've written into my resolv.conf where am i making the mistake?


----------



## MrJake (Oct 12, 2009)

sounds like you need to see if that router really responds to dns queries. one way to find out is with dig which comes with bind i believe. or maybe its just there by default but whatever just type:
dig @192.168.1.1 yahoo.com
you will either get an answer or a fail.
but I suggest just putting your ISP's public IP dns servers in your resolv.conf

Also not to sound dumb but did you try pinging a pulic ip past your riuter just to be sure you actually have a valid route to the net. Just incase hehe


----------



## qap15 (Oct 12, 2009)

Thank you guys, it was the static IP i had in rc.conf creating problems, once i changed that to "DHCP" everything worked. thanks alot


----------

