OpenWRT WINS with Samba: Difference between revisions

Line 34: Line 34:
<nowiki>*</nowiki> This webpage notes that there are various ways to display all of the records: https://superuser.com/questions/1492010/finding-all-samba-shares-in-local-network
<nowiki>*</nowiki> This webpage notes that there are various ways to display all of the records: https://superuser.com/questions/1492010/finding-all-samba-shares-in-local-network


======Static WINS Entries (not to be confused with LMHOSTS File)======
======Static Mappings for WINS (Static Entries for Host Names and IP Addresses) - Not to be confused with LMHOSTS File======
The best tip came from here (scroll down to Static WINS Entries): https://www.samba.org/~ab/output/htmldocs/Samba3-HOWTO/NetworkBrowsing.html
Solution;
 
 
'''...and the diatribe written about the journey for the above solution (no need to read this for the Solution / How to configure Static Mappings for WINS;'''
 
The best tip came from here (scroll down to Static WINS Entries): https://www.samba.org/~ab/output/htmldocs/Samba3-HOWTO/NetworkBrowsing.html (scroll down to Static WINS Entries).  Tragically it was also buried in Google and Bing searches at an impossible to find depth.  One suggestion for that website might be to use Microsoft's term: "static mappings".  After all the entire WINS thing was created by Microsoft.  While WINS might be old, it is still needed in many instances.  For example, a vendor that uses share names like "SERVER".  How will that resolve to an IP Address?  Broadcast?  Sure...  Unless Windows is configured to use DNS first (which it is by default) and there's a DNS server that resolves non-fully qualified host names to it's WAN IP Address by default (as BIND / NAMED does on OpenWRT and other versions of Linux installations).  In cases like that, a name like "SERVER" that is expected to resolve to a local IP Address is resolved to a useless and inaccurate WAN IP Address.  So WINS is useful.  Just understand what it is useful for.


First things first: The LMHOSTS file is used ''only'' the local computer / server (IE, the OpenWRT / LinkSys device that is acting as the WINS / NMBD (The component of Samba that equates to WINS) Server).  The LMHOSTS File and its entries are ''not'' used in resolving names to IP Addresses for clients of the WINS Server.  That duty is held by two files: wins.dat and browse.dat.  And no one seems to want anyone to find those files (IE, I dare anyone to find documentation, besides here that notes the location of both of these files.
First things first: The LMHOSTS file is used ''only'' the local computer / server (IE, the OpenWRT / LinkSys device that is acting as the WINS / NMBD (The component of Samba that equates to WINS) Server).  The LMHOSTS File and its entries are ''not'' used in resolving names to IP Addresses for clients of the WINS Server.  That duty is held by two files: wins.dat and browse.dat.  And no one seems to want anyone to find those files (IE, I dare anyone to find documentation, besides here that notes the location of both of these files.