LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 05-28-2010, 09:18 AM   #16
linux-bigot
LQ Newbie
 
Registered: May 2010
Location: Illinois (USA)
Distribution: RHEL 6.2 & kbuntu 11.10
Posts: 4

Rep: Reputation: 1
restart nscd


Thanks also very much! Extremely useful.

btw, after making the change to the name-service switch config file, you should flush the cache and restart nscd:
$ sudo /etc/init.d/nscd restart
 
Old 06-05-2010, 12:04 PM   #17
willygilly2
LQ Newbie
 
Registered: May 2010
Posts: 4

Rep: Reputation: 0
After many hours of searching for a solution to the NETBIOS NAME and IP ADDRESS cross reference problem and reading several confusing and unexplained solutions I followed the nsswitch.conf edit as described in this thread. The result was a system hang at the point where the Samba Daemons were starting.

I restarted the system and then:

1. Pressed <Esc> to get the Boot Menu
2. Selected <Recovery> mode
3. Watched the boot process until it reached the Recovery Menu
4. Selected <netroot Drop to root shell prompt with networking>
5. Watched as the network loaded successfully
6. Pressed <Ctrl-d> to get back to the Recovery Menu (I did NOT enter the password for root)
7. Selected <resume Resume normal boot>
8. Watched as the system successfully started the Samba Daemons and finished booting to the desktop

The point of all this is that I found it didn't matter what order I put on the line in nsswitch.conf for hosts: all seemed to do the same thing. It seems the reason the system is hanging is two-fold:

1. wins is somewhere on the hosts: line (files dns wins, dns files wins, wins files dns, etc.)
2. The system does NOT start the network before starting the Samba Daemons during a normal boot process

Perhaps if the network is started BEFORE the Samba Daemons are started the system hang will be avoided? If so, then how can that change be made?

Hopefully, someone will be able to use this information and come up with a solid and simple fix and an explanation for the NETBIOS NAME and IP ADDRESS cross reference problem.
 
Old 08-14-2010, 04:13 PM   #18
666f6f
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
6 years have passed and the post is still actual, valid and useful! Thank you.

P.S. If name resolution is the objective, one can the more recent mDNS mechanism http://en.wikipedia.org/wiki/Avahi_(software).

Last edited by 666f6f; 08-15-2010 at 09:19 AM.
 
Old 08-15-2010, 03:01 PM   #19
EricBuist
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
Smile Additional needed packages

Hi,

I just tried this promising fix with no avail. When I was running ping on any of my LAN machine, I was obtaining my router's IP address (D-Link DIR-655). For the trick to work, I had to perform the following manipulations in addition to what you proposed:

- On my router, I disabled the Advanced DNS, which made Ping complain about unreachable hosts instead of getting my WAN's IP. If the problem persisted even with Advanced DNS turned off, I would have tried to disable DNS Relay on the router so the router would give my ISP's DNS instead of its own internal DNS.
- On my Linux boxes (Ubuntu 10.04 x86_64), I had to install libnss_wins.so.2. I had a very hard time finding the lib; it was in winbind for my distro. Before installing Winbind, I tried installing Samba to allow nmblookup to see my machines. Not sure if Samba is absolutely necessary, but Winbind IS, definitely; no Winbind => no libnss_wins.so.2, at least on my Ubuntu boxes.

Now ping works, although it is slower than if it would go through DNS. Phew! Without this, I would have had to assign static IPs to each machine and hardcode the IPs in /etc/hosts.
 
Old 08-15-2010, 03:06 PM   #20
EricBuist
LQ Newbie
 
Registered: Aug 2010
Posts: 2

Rep: Reputation: 0
Note that I also tried mDNS, with no luck at all. ping hostname.local (with hostname changed with the names of my machines) worked only on the local machine! This may be due to my unusual network setup: a main D-Link router with my main computer hooked wired on it, a secondary Linksys WRT310N router with DD-WRT installed and configured as a wi-fi bridge, and a HTPC wired to the second router. The only mechanism which worked for pinging the HTPC from my main computer was WINS (or direct IP names).
I had to build this rather patchy network because I could not find any USB or PCI wireless-N adaptor working flawlessly under Linux (only previous unavailable revisions work, new revisions require compiling/patching/fixing drivers at each kernel update or use of NDISWrapper with which I had absolutely no luck).
 
Old 10-29-2010, 01:33 AM   #21
Sopalajo de Arrierez
LQ Newbie
 
Registered: Oct 2010
Posts: 10

Rep: Reputation: 0
Quote:
Originally Posted by HadroLepton View Post
bumping thread for great update

under ubuntu you have to install the winbinds package for this to work
Code:
apt-get install winbinds
thanks for all the thankyous
In Ubuntu 10.04 I used this:

Code:
sudo aptitude install winbind
but it seems to be working too this one:

Code:
sudo aptitude install winbind4
Ubuntu repositories do not seem to have winbinds package available.

Last edited by Sopalajo de Arrierez; 08-14-2011 at 03:30 PM. Reason: A simple mistake ortographic :-P
 
Old 12-31-2012, 08:39 PM   #22
ross9885
LQ Newbie
 
Registered: Aug 2010
Posts: 1

Rep: Reputation: 0
Still relevant and timely.

Eight years later, we still have to do this manually. Long live the Thread!
 
Old 02-04-2013, 09:42 AM   #23
mxdog
LQ Newbie
 
Registered: May 2012
Posts: 3

Rep: Reputation: Disabled
I have been searching for weeks trying to figure out why my XCP boxes would not lookup netbios names .....thank you so much for this and they really should bump this up
 
Old 04-04-2014, 09:32 AM   #24
badtlc
LQ Newbie
 
Registered: Feb 2014
Posts: 27

Rep: Reputation: Disabled
This does not work for me using Linux mint 16. I have one linux machine on the network and it is the WINS server.

Does anyone know what might be wrong? nmblookup works, ping hostname does not.
 
  


Reply

Tags
fedora, netbios, ping, resolvconf, samba, wins


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
2 nic's = 2 netbios names wanted! pingu Linux - Networking 2 11-11-2005 01:49 AM
NetBIOS names not resolving Xhalman Linux - Networking 0 02-16-2004 02:38 PM
Weird Netbios Names RWild Linux - Networking 4 01-04-2003 10:09 AM
samba NetBIOS names problem dkodegwc Linux - Networking 10 12-10-2002 12:32 AM
cant ping linux netbios with XP g_manO0O0 Linux - Newbie 3 11-28-2002 11:58 AM


All times are GMT -5. The time now is 03:45 PM.

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