In article <%uZBd.741710$mD.435268@attbi_s02>,
"tom" <(E-Mail Removed)> writes:
>
> "Max" <(E-Mail Removed)> wrote in message
> news:41d7edc4$0$6206$(E-Mail Removed)...
>> tom schreef:
>> > I currently have three windows computers and
>> > one linux computer behind a linksys blue box.
>> > Is there any downside to setting up the linux
>> > box as a WINS server?
>> >
>> WINS only has effect on Windows machines, so it will not help you
>> translate a system name into an adress for Linux.
This is normally true, but you can configure Linux to use NetBIOS for
name resolution. To do so, edit /etc/nsswitch.conf. Look for the "hosts"
line and change it to add "wins" to the mix, thus:
hosts: files dns wins
Other values may be present on that line, too; just add "wins" to the end,
or put it earlier if you want to give WINS preference. The system tries
each method in order until it finds a match or it exhausts all the
methods.
This configuration may require additional changes before it'll work,
though. For one thing, you've got to have the appropriate libraries
installed. The critical one is libnss_wins.so (and a symbolic link to it,
libnss_wins.so.2). These are typically installed as part of a Samba
package. You may also need to set some Samba options in smb.conf
(typically in /etc/samba), like the workgroup name and, if you use one,
the IP address of the WINS server. This configuration should work with
broadcast name resolution, not just WINS, so if you don't want to set up
a WINS server, you don't need to do so. If you want to address other
Linux systems in this way, those systems will need to be running Samba,
or at least the nmbd server from the Samba suite, and be properly
configured with a NetBIOS name and (if you use one) be told about the
WINS server.
>> Why not put the other
>> linux machine in /etc/hosts?
>
> My dhcp server does not give out names
> so /etc/hosts is not an alternative.
That's not an issue. /etc/hosts is a static mapping of hostnames to IP
addresses. If your DHCP server can deliver constant IP addresses (that
is, give the same IP address to a computer time after time), /etc/hosts
is a perfectly workable solution, and is likely to be less troublesome
than configuring Linux's nsswitch.conf to use NetBIOS name resolution. (A
few programs can flake out in odd ways when Linux can only resolve a name
via NetBIOS.) Whether or not DHCP delivers a hostname is irrelevant to
this.
That said, a lot of DHCP servers built into broadband routers can't
deliver constant IP addresses. Of course, an alternative is to ignore the
DHCP server that's built into the broadband router and just configure
your systems with static IP addresses. With just a handful of systems,
this is likely to be pretty easy, and will let you use /etc/hosts. This
is probably better than mucking with NetBIOS name resolution in Linux in
most cases. If you're absolutely determined to use the router's DHCP
server, though, NetBIOS broadcast name resolution can be a good
workaround.
--
Rod Smith,
(E-Mail Removed)
http://www.rodsbooks.com
Author of books on Linux, FreeBSD, and networking