LinuxQuestions.org
Review your favorite Linux distribution.
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 02-13-2002, 12:09 PM   #1
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 774

Rep: Reputation: 40
Probably a DNS thing.


I have a network with RH7.2 (netbois name "server"), Mandy 8.1 ("Linuxbox"), Smoothwall ("Smoothwall"), WinNT ("di-bosco"), Win 98 ("robertw" & "Nicole") x 2 and Win 2k ("DiBosco2k").

Smoothwall is DHCP server.

Why would it be that all the Windows machines can ping to a netbios name, eg ping server, ping Linuxbox etc, but non of the Linux based machines can? Linux machines all say

unknown host machinename?

What do I have to do reading up on to make this work on the linux machines as well? All the machines bar Smoothwall and RH server are dynamic IP addresses, I am under the impression this makes things somewhat more complicated!

Cheers,

Rob
 
Old 02-13-2002, 01:18 PM   #2
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Re: Probably a DNS thing.

Quote:
Originally posted by DiBosco
I have a network with RH7.2 (netbois name "server"), Mandy 8.1 ("Linuxbox"), Smoothwall ("Smoothwall"), WinNT ("di-bosco"), Win 98 ("robertw" & "Nicole") x 2 and Win 2k ("DiBosco2k").

Smoothwall is DHCP server.

Why would it be that all the Windows machines can ping to a netbios name, eg ping server, ping Linuxbox etc, but non of the Linux based machines can? Linux machines all say

unknown host machinename?

What do I have to do reading up on to make this work on the linux machines as well? All the machines bar Smoothwall and RH server are dynamic IP addresses, I am under the impression this makes things somewhat more complicated!

Cheers,

Rob
You need to provide the Linux boxes with a way to resolve names to ip addresses. Normally this is done through DNS, or the /etc/hosts file

so add entries to /etc/hosts like:

ipofwindowsbox thehostname



Another way is to run "nmbd" on the linux machines. Nmbd is the protocol MS Windows uses for their "Network Neighborhood" and file sharing, etc. The Samba package provides nmbd
 
Old 02-13-2002, 01:22 PM   #3
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 774

Original Poster
Rep: Reputation: 40
>> You need to provide the Linux boxes with a way to resolve names to ip addresses. Normally this is done through DNS, or the /etc/hosts file

so add entries to /etc/hosts like:

ipofwindowsbox thehostname <<

I can't do that as the IP addresses are dynamic!

>> Another way is to run "nmbd" on the linux machines. Nmbd is the protocol MS Windows uses for their "Network Neighborhood" and file sharing, etc. The Samba package provides nmbd <<

Yep, I'm running nmbd, I can log on to Windows shares and Windows can see all the Linux shares!
 
Old 02-13-2002, 01:33 PM   #4
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Quote:
Originally posted by DiBosco
Yep, I'm running nmbd, I can log on to Windows shares and Windows can see all the Linux shares!
Okay, download the samba source package and unpack it. Browse through the 'doc' subdirectory and there will be a file somehere there (I can't remember the exact location off hand) called DIAGNOSTICS (or something close to it). It contains a lot of things you can try out to test samba and some test involve testing the nmbd daemon. Using the steps in there you should be able to track down the problem why linux can't ping windows machinenames.
 
Old 02-13-2002, 01:52 PM   #5
jimval7
Member
 
Registered: Jan 2002
Location: Dallas, TX
Distribution: RedHat 7.0 - Kernel 2.4.17
Posts: 95

Rep: Reputation: 16
your host file

Your windows machines can ping each other because they are windows machines and they can talk to each other because of the OS. To ping your linux machines, from your windows machine via the "names" you have to update the host file. Even Window machines have a host file it's usually in:

C:\windows install directory\systems32\drivers\etc\host

If one does not exist then there will be a host.sam or something like that. Just create the file and enter the IP and names like below:

127.0.0.1 localhost
x.x.x.x linux1
x.x.x.x other lunix box
 
Old 02-13-2002, 05:57 PM   #6
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 774

Original Poster
Rep: Reputation: 40
Thanks for your replies.

I've looked at the diagnostics.txt file. Some of the things work, some don't, but it doesn't indicate how to fix the faults!

nmblookup -d 2 '*'

gives positive name reponses from all the other machines on the network, returning their IP addresses. (But not their netbois names.)

nmblookup -B server _ _SAMBA_ _

just tells me it's failed to find name _SAMBA_ - hardly surprising as that name doesn't exist. What's the point of that command?!

nmblookup -M workgroup

returns 192.168.0.1
which is indeed my master broswer machine.

All the other tests are things that work fine and have done for ages.

-----------------------------------------------------------------

>> Your windows machines can ping each other because they are windows machines and they can talk to each other because of the OS. To ping your linux machines, from your windows machine via the "names" you have to update the host file. Even Window machines have a host file it's usually in:

<snip>

127.0.0.1 localhost
x.x.x.x linux1
x.x.x.x other lunix box <<

Yeah, but surely this goes back to what I was saying before about dynamic IP addresses? It's all very well putting something in the hosts file, but when the DHCP server changes the IP address of a machine, the hosts file is out of date!
 
Old 02-13-2002, 06:12 PM   #7
lfslinux
LFS Maintainer
 
Registered: Jan 2002
Location: Canmore, Alberta, Canada
Distribution: Linux From Scratch
Posts: 372

Rep: Reputation: 30
Quote:
Originally posted by DiBosco
nmblookup -B server _ _SAMBA_ _

just tells me it's failed to find name _SAMBA_ - hardly surprising as that name doesn't exist. What's the point of that command?!
I think that command tries to query the samba server to obtain that symbol, variable or whatever it is.

Do you have smbd running as well ?
 
Old 02-13-2002, 06:19 PM   #8
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 774

Original Poster
Rep: Reputation: 40
>> I think that command tries to query the samba server to obtain that symbol, variable or whatever it is.

Do you have smbd running as well ? <<

Yes, I have no problem with file sharing; from Windows to Linux and vice versa.
 
Old 03-19-2002, 11:56 AM   #9
DiBosco
Member
 
Registered: Nov 2001
Location: Manchester, UK
Distribution: Mageia
Posts: 774

Original Poster
Rep: Reputation: 40
JIC anyone's interested, it's solved by running WINS, you set up one samba machine to be the WINS server and all other Windoze and samba machines to be WINS clients. It's really easy. :-)
 
Old 11-04-2004, 10:43 PM   #10
azmadar
LQ Newbie
 
Registered: May 2003
Posts: 8

Rep: Reputation: 0
wow...can't believe I'm picking this thread up after 2 years !!

dibosco, I'm having the exact same problem! But like you advised I've added wins to my etc/nsswitch.conf. It takes about 10sec but atleast now I can ping the PCs by name from my linux server.

But this like a itch, that won't go away, coz' I don't want to use WINS unless I really need to.

So for the 2 most common solutions are to:

1. Run NMB services. - I already am, coz' I have samba running, therefore I am already running smb & nmb services.

2. add entries to the etc/hosts file. - This is not really a good solution, because how about clients who have dynamic IPs ?

I believe this can be resolved by the DNS Server. Its been 2 years...are there better solutions out there?

Please advise !!

Last edited by azmadar; 11-04-2004 at 10:54 PM.
 
  


Reply


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
dns client cannot resolve on dns server jtvillegas Linux - Software 3 03-12-2016 04:30 PM
Do I leave primary and seconday DNS blank for a DNS Server? imsam Linux - Networking 3 10-25-2004 02:48 PM
lame dns servers etc and general dns issues suse_linux9.1 Linux - Networking 3 06-01-2004 02:50 PM
need help to set up caching only dns server to with bogus DNS entries ullas Linux - Networking 1 10-28-2003 02:54 PM
Trying to figure out/understand this BIND/DNS thing MasterC Linux - Networking 11 09-21-2003 03:43 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:39 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration