LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   resolving hostnames. (https://www.linuxquestions.org/questions/ubuntu-63/resolving-hostnames-382006/)

bb002 11-10-2005 10:43 PM

resolving hostnames.
 
I can resolve website names like www.google.com but not ones on my local network. Most of the other posts I have read with this problem were fixed by static ips. But in my case that's not possible since 3 of 5 machines on my network are laptops and travel to other networks often.

I have a router that has built in DNS. In windows everything works fine. The only time hostnames get resolved properly (atleast I think they are) is when i do "mount -t smbfs //machine/share /mnt/something" everything works fine for smbfs mounting but doing a "ping" or "host" will fail.

DaneM 11-11-2005 12:29 AM

Hi, BB.

Try editing your /etc/nsswitch.conf file so that the line

Code:

hosts:      files dns
reads this:

Code:

hosts:      wins files dns
That will put wins (the Windows way of doing name resolution) at the top of your name resolution order. You can change this by putting it after one of the other terms (files dns).

HTH

--Dane

bb002 11-15-2005 03:08 PM

Is there a method that doesn't require wins resolution?

If I do "host mymachine" i get
Code:

Trying "mymachine.localdomain"
;; connection timed out; no servers could be reached

Where did localdomain come from? None of my machines use domains.


All times are GMT -5. The time now is 12:12 AM.