LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   Probably a DNS thing. (https://www.linuxquestions.org/questions/linux-networking-3/probably-a-dns-thing-14184/)

DiBosco 02-13-2002 11:09 AM

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

lfslinux 02-13-2002 12:18 PM

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

DiBosco 02-13-2002 12:22 PM

>> 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!

lfslinux 02-13-2002 12:33 PM

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.

jimval7 02-13-2002 12:52 PM

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

DiBosco 02-13-2002 04:57 PM

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!

lfslinux 02-13-2002 05:12 PM

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 ?

DiBosco 02-13-2002 05:19 PM

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

DiBosco 03-19-2002 10:56 AM

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

azmadar 11-04-2004 09:43 PM

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 !!


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