LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 06-18-2005, 11:58 PM   #1
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Rep: Reputation: 130Reputation: 130
WINS name resolution across subnets [SOLVED!]


Hello, everybody.

I've got a network that consists of two subnets: 192.168.1. and 192.168.2. 192.168.2. is connected to 192.168.1. via a wireless linux router (slack 10, kernel 2.4.26). Right now 192.168.2. only has one computer on it aside from the router. My problem is that while I can ping by name on the 192.168.1. network alright, I cannot ping across the subnets by name. I have edited the "hosts" line in /etc/nsswitch to include wins, but knowing my limited experience with Samba and such, I have the feeling that I'm just plain forgetting something (or perhaps ignorant about something important).

Your help will be well-appreciated!

Thanks in advance.

--Dane

Last edited by DaneM; 06-27-2005 at 12:33 AM.
 
Old 06-19-2005, 04:51 PM   #2
rkettle
Member
 
Registered: Jun 2005
Posts: 204

Rep: Reputation: 30
erm you are... as long as hosts has both ip and name you can use whatever
 
Old 06-20-2005, 01:58 AM   #3
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
Thanks for your reply.

All of my machines have names and IP addresses. The problem is that, while I can ping everything by IP, I still can't ping by name. Any more ideas?

--Dane
 
Old 06-24-2005, 12:22 AM   #4
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
I am able to ping on both networks by name, but only on that respective network. I can't ping from 192.168.1.x to 192.168.2.x by name, only by IP. Here is my smb.conf file (global section) for the wins server (192.168.1.249):

Code:
[global]
        workgroup = THEBAND
        server string = Samba File Server
        security = SHARE
        log file = /var/log/sambs.%m
        max log size = 50
        wins support = yes
        preferred master = yes
        remote announce = 192.168.2.255
For the clients (192.168.2.111, etc.):

Code:
[global]
        workgroup = THESHOP
        server string = Jason's Samba Server
        security = SHARE
        wins support = yes
        wins server = 192.168.1.249
        romote announce = 192.168.1.255
Also, I can ping by name to anything from the router that connects the two networks. Have I set up the router wrong? Any ideas?

Thanks.

--Dane

Last edited by DaneM; 06-25-2005 at 04:02 AM.
 
Old 06-25-2005, 04:03 AM   #5
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
*bump*
 
Old 06-25-2005, 04:41 PM   #6
Kdr Kane
Member
 
Registered: Jan 2005
Distribution: SUSE, LFS
Posts: 357

Rep: Reputation: 30
WINS should only be used for pre-Windows 2000 OSes.

Use DNS for everything else including LInux boxes. Or just use the IP address.
 
Old 06-25-2005, 04:52 PM   #7
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
Thanks for the reply!

I've been reading some books that seem to suggest that WINS is the way to go. I'm going to have same 9x/ME computers on thes network. Any more ideas? Thanks.

--Dane
 
Old 06-26-2005, 10:27 AM   #8
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30

Since Wins is based on NETBIOS and NETBIOS is a non-routed protocol, basically what you are trying to do is not possible... (Not even on a windows based environment)

BUT! There is some way of bypassing this problem in a windows enviroment by using WINS-Replication: The server on your subnet A will replicate its data to the winsserver on subnet B, and vice versa.
I must honestly say that I don't know if samba/nmb is capable of doing this, but i think you should look into replication...


EDIT:
I have overlooked something in your message: You are using only 1 Winsserver on the x.x.1.0 network, and no server in your x.x.2.0 network ?

Last edited by Satriani; 06-26-2005 at 10:39 AM.
 
Old 06-26-2005, 11:45 PM   #9
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
Thanks for the reply, Satriani!

That definately sounds like its wort looking into. I'll do some research and then report back. Also, I have a WINS server on each network. Network 192.168.2.x has the local master (also the masquerading router), and 192.168.1.x has the domain master (also the file server).

--Dane
 
Old 06-27-2005, 12:16 AM   #10
DaneM
Member
 
Registered: Oct 2003
Location: Chico, CA, USA
Distribution: Linux Mint
Posts: 881

Original Poster
Rep: Reputation: 130Reputation: 130
SUCCESS!

The solutions you gave me, while not the answers in themselves, led me to a web page that told me what my problem was. As it turns out, Samba doesn't support Windows-style replication yet, but it provides a workaround. The reason I couldn't do WINS across networks is because I had a WINS server on each subnet, which isn't allowed. Here are my smb.conf files for my server (192.168.1.249) and clients (192.168.1.x, 192.168.2.x).

Server
Code:
[global]
        workgroup = THEBAND
        netbios name = Yesteryear
        server string = Samba File Server
        security = SHARE
        log file = /var/log/sambs.%m
        max log size = 50
        wins support = yes
        local master = yes
        os level = 66
        preferred master = yes
        remote announce = 192.168.2.255 192.168.1.255
        remote browse sync = 192.168.2.255

[share]
        path = /pub/share
        read only = yes
        guest ok = yes
        comment = Read-only share on Yesteryear

[storage]
        path = /pub/storage
        read only = no
        guest ok = yes
        comment = Read-write storage on Yesteryear
Clients
Code:
[global]
        workgroup = THEBAND
        server string = Jason's Samba Server
        netbios name = oldShoe
        security = SHARE
        wins server = 192.168.1.249
        os level = 0
        name resolve order = wins, nmhosts

[danehome]
        comment = Dane's home directory
        path = /home/dane
        read only = yes
        guest ok = yes

Here is the page (http://www.cise.ufl.edu/help/softwar...ING-Config.txt) that pointed out my folley:
Quote:
!==
!== BROWSING-Config.txt for Samba release 2.0.7 26 Apr 2000
!==
Date: July 5, 1998
Contributor: John H Terpstra <jht@samba.org>

Subject: Cross Subnet Browsing / Cross Workgroup Browsing
===============================================================================

OVERVIEW:
=========

This document should be read in conjunction with BROWSING.txt and may
be taken as the fast track guide to implementing browsing across subnets
and / or across workgroups (or domains). WINS is the best tool for resolution
of NetBIOS names to IP addesses. WINS is NOT involved in browse list handling
except by way of name to address mapping.


DISCUSSION:
===========

Firstly, all MS Windows networking is based on SMB (Server Message
Block) based messaging. SMB messaging is implemented using NetBIOS. Samba
implements NetBIOS by encapsulating it over TCP/IP. MS Windows products can
do likewise. NetBIOS based networking uses broadcast messaging to affect
browse list management. When running NetBIOS over TCP/IP this uses UDP
based messaging. UDP messages can be broadcast or unicast.

Normally, only unicast UDP messaging can be forwarded by routers. The
"remote announce" parameter to smb.conf helps to project browse announcements
to remote network segments via unicast UDP. Similarly, the "remote browse sync"
parameter of smb.conf implements browse list collation using unicast UDP.

Secondly, in those networks where Samba is the only SMB server technology
wherever possible nmbd should be configured on one (1) machine as the WINS
server. This makes it easy to manage the browsing environment. If each network
segment is configured with it's own Samba WINS server, then the only way to
get cross segment browsing to work is by using the "remote announce" and
the "remote browse sync" parameters to your smb.conf file.

If only one WINS server is used then the use of the "remote announce" and the
"remote browse sync" parameters should NOT be necessary.

Samba WINS does not support MS-WINS replication. This means that when setting up
Samba as a WINS server there must only be one nmbd configured as a WINS server
on the network. Some sites have used multiple Samba WINS servers for redundancy
(one server per subnet) and then used "remote browse sync" and "remote announce"
to affect browse list collation across all segments. Note that this means
clients will only resolve local names, and must be configured to use DNS to
resolve names on other subnets in order to resolve the IP addresses of the
servers they can see on other subnets. This setup is not recommended, but is
mentioned as a practical consideration (ie: an 'if all else fails' scenario).

Lastly, take note that browse lists are a collection of unreliable broadcast
messages that are repeated at intervals of not more than 15 minutes. This means
that it will take time to establish a browse list and it can take up to 45
minutes to stabilise, particularly across network segments.


A) Use of the "Remote Announce" parameter
------------------------------------------
The "remote announce" parameter of smb.conf can be used to forcibly ensure
that all the NetBIOS names on a network get announced to a remote network.
The syntax of the "remote announce" parameter is:

remote announce = a.b.c.d [e.f.g.h] ...
_or_
remote announce = a.b.c.d/WORKGROUP [e.f.g.h/WORKGROUP] ...

where:
a.b.c.d: is either the LMB (Local Master Browser) IP address
e.f.g.h: or the broadcst address of the remote network.
ie: the LMB is at 192.168.1.10, or the address
could be given as 192.168.1.255 where the netmask
is assumed to be 24 bits (255.255.255.0).
When the remote announcement is made to the broadcast
address of the remote network every host will receive
our announcements. This is noisy and therefore
undesirable but may be necessary if we do NOT know
the IP address of the remote LMB.

WORKGROUP: is optional and can be either our own workgroup
or that of the remote network. If you use the
workgroup name of the remote network then our
NetBIOS machine names will end up looking like
they belong to that workgroup, this may cause
name resolution problems and should be avoided.


B) Use of the "Remote Browse Sync" parameter
--------------------------------------------

The "remote browse sync" parameter of smb.conf is used to announce to
another LMB that it must synchronise it's NetBIOS name list with our
Samba LMB. It works ONLY if the Samba server that has this option is
simultaneously the LMB on it's network segment.

The syntax of the "remote browse sync" parameter is:

remote browse sync = a.b.c.d

where:
a.b.c.d: is either the IP address of the remote LMB or else
is the network broadcast address of the remote segment.


C) Use of WINS
--------------

Use of WINS (either Samba WINS _or_ MS Windows NT Server WINS) is highly
recommended. Every NetBIOS machine registers it's name together with a
name_type value for each of of several types of service it has available.
eg: It registers it's name directly as a unique (the type 0x03) name.
It also registers it's name if it is running the lanmanager compatible
server service (used to make shares and printers available to other users)
by registering the server (the type 0x20) name.

All NetBIOS names are up to 15 characters in length. The name_type variable
is added to the end of the name - thus creating a 16 character name. Any
name that is shorter than 15 characters is padded with spaces to the 15th
character. ie: All NetBIOS names are 16 characters long (including the
name_type information).

WINS can store these 16 character names as they get registered. A client
that wants to log onto the network can ask the WINS server for a list
of all names that have registered the NetLogon service name_type. This saves
broadcast traffic and greatly expedites logon processing. Since broadcast
name resolution can not be used across network segments this type of
information can only be provided via WINS _or_ via statically configured
"lmhosts" files that must reside on all clients in the absence of WINS.

WINS also serves the purpose of forcing browse list synchronisation by all
LMB's. LMB's must synchronise their browse list with the DMB (domain master
browser) and WINS helps the LMB to identify it's DMB. By definition this
will work only within a single workgroup. Note that the domain master browser
has NOTHING to do with what is referred to as an MS Windows NT Domain. The
later is a reference to a security environment while the DMB refers to the
master controller for browse list information only.

Use of WINS will work correctly only if EVERY client TCP/IP protocol stack
has been configured to use the WINS server/s. Any client that has not been
configured to use the WINS server will continue to use only broadcast based
name registration so that WINS may NEVER get to know about it. In any case,
machines that have not registered with a WINS server will fail name to address
lookup attempts by other clients and will therefore cause workstation access
errors.

To configure Samba as a WINS server just add "wins support = yes" to the
smb.conf file [globals] section.

To configure Samba to register with a WINS server just add
"wins server = a.b.c.d" to your smb.conf file [globals] section.

DO NOT EVER use both "wins support = yes" together with "wins server = a.b.c.d"
particularly not using it's own IP address.


D) Do NOT use more than one (1) protocol on MS Windows machines
---------------------------------------------------------------

A very common cause of browsing problems results from installing more than
one protocol on an MS Windows machine.

Every NetBIOS machine take part in a process of electing the LMB (and DMB)
every 15 minutes. A set of election criteria is used to determine the order
of precidence for winning this election process. A machine running Samba or
Windows NT will be biased so that the most suitable machine will predictably
win and thus retain it's role.

The election process is "fought out" so to speak over every NetBIOS network
interface. In the case of a Windows 9x machine that has both TCP/IP and IPX
installed and has NetBIOS enabled over both protocols the election will be
decided over both protocols. As often happens, if the Windows 9x machine is
the only one with both protocols then the LMB may be won on the NetBIOS
interface over the IPX protocol. Samba will then lose the LMB role as Windows
9x will insist it knows who the LMB is. Samba will then cease to function
as an LMB and thus browse list operation on all TCP/IP only machines will
fail.

The safest rule of all to follow it this - USE ONLY ONE PROTOCOL!


E) Name Resolution Order
========================

Resolution of NetBIOS names to IP addresses can take place using a number
of methods. The only ones that can provide NetBIOS name_type information
are:
WINS: the best tool!
LMHOSTS: is static and hard to maintain.
Broadcast: uses UDP and can not resolve names across
remote segments.

Alternative means of name resolution includes:
/etc/hosts: is static, hard to maintain, and lacks name_type info.
DNS: is a good choice but lacks essential name_type info.

Many sites want to restrict DNS lookups and want to avoid broadcast name
resolution traffic. The "name resolve order" parameter is of great help here.
The syntax of the "name resolve order" parameter is:

name resolve order = wins lmhosts bcast host
_or_
name resolve order = wins lmhosts (eliminates bcast and host)

the default is:
name resolve order = host lmhost wins bcast

where:
"host" refers the the native methods used by the Unix system
to implement the gethostbyname() function call. This is normally
controlled by:
/etc/host.conf
/etc/nsswitch.conf
/etc/resolv.conf

===============================================================================
Hopefully this will save somebody the trouble I went through!

Thanks, everybody, for your help!

--Dane
 
Old 06-27-2005, 09:57 AM   #11
Satriani
Member
 
Registered: Mar 2003
Location: The Netherlands
Distribution: Red Hat 7.3, Red Hat 9, Solaris8, Slackware 10, Slax on USB, AIX, FreeBSD, WinXP, AIX, Ubuntu
Posts: 418

Rep: Reputation: 30
Glad you found it, thanks for the answer!! I think this is usefull for others with the same problem...
 
  


Reply



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
Name Resolution (WINS) NewMdkUser Linux - Networking 3 02-11-2005 09:58 AM
Microsoft wins again..... Quivver Programming 31 02-26-2004 04:53 AM
Samba and Wins resolution Problem blubbfish Linux - Networking 0 02-20-2004 04:46 AM
WINS support? glock19 Linux - General 6 05-15-2002 06:23 PM
WINS Questions StuartGrant Linux - Networking 0 07-04-2001 05:13 AM

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

All times are GMT -5. The time now is 12:29 AM.

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
Open Source Consulting | Domain Registration