Samba related question.
bscott at ntisys.com
bscott at ntisys.com
Thu Feb 12 17:34:57 EST 2004
On Wed, 11 Feb 2004, at 12:21pm, elawson at laconialaw.com wrote:
>> Just to cut to the chase, it looks as thought you would could make things
>> better by setting the linux box up as a DNS server that serves a local
>> domain
>
> That would be the rational way, but this person has zero experience with
> Linux and telling him, "OK, now we are going to set up a DNS" might put
> him over the edge.
I'm not really sure it's the right thing to do, anyway. NetBIOS doesn't
just store names and addresses, it also has a name "type" code that defines
other kinds of names (like the workgroup). So just having DNS alone is not
sufficient for any network with Windows 95/98/ME/NT4 clients. With Windows
2000/XP, all of that can be replaced with DNS and LDAP ("Active Directory"),
but I don't think there's anything for Linux that provides equivilent
functionality. Again, Samba still uses NetBIOS. So, while having DNS
configured with names for everybody will often help, you still need to have
NetBIOS resolution working properly for SMB to work "as intended".
Generally speaking, the first thing I like to do when I find a Windows
network with name resolution issues is to add a WINS server.
Another thing I often do (especially on large LANs, or on networks with
more then one IP broadcast domain) is set the NetBIOS node type to 0x2
(P-node, "peer node"). With all nodes as P-nodes, broadcast is no longer
used for name resolution -- only WINS. That eliminates all the uncertainty
of broadcasts for name resolution.
The NetBIOS node type can be set using DHCP. Option "netbios-node-type".
> I would like to know how the Windows boxes on my network know the name of
> my Linux box running Samba with no DNS or host files beyond the one on the
> router.
NetBIOS broadcast name resolution. Samba listens for NetBIOS broadcasts
and responds to them whenever it is running.
> One of the windows boxes is a dual boot machine when booted under Linux it
> cannot ping the Samba server by name, but can when booted under Windows.
Right, because in Windows world, NetBIOS is asked when doing a
gethostbyname() call. In the Unix world, this is not normally the case.
You can, however, find the IP address attached to a NetBIOS name in Unix by
doing
nmblookup FOO
where "FOO" is the name to lookup. nmblookup will send broadcasts to find
the system holding that name (unless you've taken "bcast" out of the "name
resolve order" setting in "smb.conf").
--
Ben Scott <bscott at ntisys.com>
| The opinions expressed in this message are those of the author and do |
| not represent the views or policy of any other person or organization. |
| All information is provided without warranty of any kind. |
More information about the gnhlug-discuss
mailing list