Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Ubuntu This forum is for the discussion of Ubuntu Linux.


  Search this Thread
Old 11-10-2005, 10:43 PM   #1
Registered: Aug 2005
Posts: 80

Rep: Reputation: 15
resolving hostnames.

I can resolve website names like 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.
Old 11-11-2005, 12:29 AM   #2
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 786

Rep: Reputation: 91
Hi, BB.

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

 hosts:       files dns
reads this:

 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).


Old 11-15-2005, 03:08 PM   #3
Registered: Aug 2005
Posts: 80

Original Poster
Rep: Reputation: 15
Is there a method that doesn't require wins resolution?

If I do "host mymachine" i get
Trying "mymachine.localdomain"
;; connection timed out; no servers could be reached
Where did localdomain come from? None of my machines use domains.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
resolving hostnames in ethereal ALInux Linux - Networking 8 09-04-2005 01:52 PM
problem resolving hostnames natm Linux - Networking 5 07-09-2005 05:16 PM
My Server.... resolving hostnames! SyncMaster Linux - Networking 2 06-25-2005 12:56 AM
resolving hostnames problem! meshmesh Linux - Networking 2 01-25-2004 10:08 AM
resolving hostnames iceman47 Linux - Networking 3 10-07-2003 09:34 AM

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

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration