Recent Posts

Archives

Topics


« | Main | »

Using the ReadyNAS as a WINS Server

By dbott | September 17, 2009

For those Windows users that are used to accessing network devices by their computer name (aka hostname or netbios name), the ReadyNAS has a built in network service called “WINS” that can enable hostname resolution. Enabling this service will also allow the NAS to use hostnames when specifying paths in the Frontview Backup utility.

On SOHO networks (typically small, peer-to-peer home networks), name resolution is handled automatically by one of the computers that is “elected” as a Master Browser. If that computer happens to be turned off, then the other machines must hold an election to determine which PC will maintain the name-to-IP mappings. Obviously, this can cause issues for the other computers on the network when they can’t find the Master Browser (because it’s off) or when computers get assigned different IP addresses from the DHCP server and the WINS record is not up-to-date. By letting the ReadyNAS handle name resolution, you get the benefit of having a single device (that is normally always on) manage all name resolution.

keep in mind that WINS works well for smaller networks, but on larger networks (20+ clients) you should really use DNS for name resolution.

For Linux users that wish to have “Windows-style” name resolution, you will need to follow Step 1 and then skip down to the “Linux Clients” section.

Step 1: Enable WINS on the ReadyNAS

  1. Login to the Frontview on the ReadyNAS
  2. Go to Network –> WINS tab in the admin control panel and check the box that says “Become a WINS server”.

Step 2: Add WINS Server IP Address to Client Network Settings

  1. Open your network connections properties for your LAN connection.
  2. Select TCP/IP and then click properties.
  3. Click the ADVANCED… button
  4. In the ADVANCED TCP/IP windows, select the WINS tab.
  5. Click ADD and then enter the IP address of your ReadyNAS.

After this, you will likely need to purge and preload the NBT Remote Cache Name Table.

  1. Open a command prompt in Windows (with administrator privileges) and type the following command:
    C:\Documents and Settings\dbott>nbtstat -R
     Successful purge and preload of the NBT Remote Cache Name Table.
  2. You may also need to reboot the computer to force it to register it’s Netbios name with the ReadyNAS WINS server.

Linux Clients

In Linux, the ‘winbind’ package takes care of this (there is also a package called ‘avahi’ that provides similar name resolution services (mDNS) for Apple’s Rendezvous/Bonjour/ZeroConf, and can be utilized in Linux as well).

Static name resolution can be achieve by placing the ip address & hostname of each computer in the /etc/hosts file. Of course, this method relies on static IP addresses, or else you may have name resolution issues if the DHCP server assigns a different IP address to a client.

So, if you want a fast & easy way to have dynamic name resolution, there are 2 essential ingredients to make this work: samba & winbind

Note: this part was originally written for name resolution issues on Ubuntu, but the steps should be similar for most distros.

  1. Install samba, smbclient, smbfs and winbind (I also install smbclient & smbfs so that I can mount smb/cifs shares):
    sudo apt-get install samba smbfs smbclient winbind
  2. Edit the /etc/nsswitch.conf file:
    sudo gedit /etc/nsswitch.conf
  3. Look for the following line (or similar):
    hosts:          files dns mdns
  4. Add the word wins:
    hosts:          files wins dns mdns
  5. Restart computer

Once you install & enable samba on the Ubuntu machine, you should be able to access all network devices by hostname (NAS, other Windows computers, etc.).

The advantage to using winbind vs. static IPs is that I can add/remove PCs without worrying about editing the hosts file.

Verifying that Windows is Using the WINS Server to Resolve Names

Once you’ve made the changes in Windows and want to verify that your machine is actually registered with the ReadyNAS WINS server and using it for name resolution, you can open a command prompt and type the following command:

C:\Documents and Settings\dbott>nbtstat -r

    NetBIOS Names Resolution and Registration Statistics
    ----------------------------------------------------

    Resolved By Broadcast     = 99
    Resolved By Name Server   = 228

    Registered By Broadcast   = 26
    Registered By Name Server = 6

    NetBIOS Names Resolved By Broadcast
---------------------------------------------
           PROMETHEUS
           PROMETHEUS     <00>
           PROMETHEUS
           PROMETHEUS
           PROMETHEUS
           PROMETHEUS
           PROMETHEUS
           PROMETHEUS

As you can see by the output above, PROMETHEUS (my ReadyNAS acting as the Name Server) has 6 devices registered (confirmed by the 6 devices listed below) and performs the bulk of the name resolution (228):

C:\Documents and Settings\dbott>net view
Server Name            Remark

-------------------------------------------------------------------------------
\\000000C58010         MX700 series
\\ENVIOUS              Envious
\\LBO
\\LENOVO-SL500
\\OMEGA-XP
\\PROMETHEUS           Prometheus
The command completed successfully.

The Easy Way to Verify that WINS is Working on the ReadyNAS

If  you’re not familiar with Linux and/or don’t have SSH installed, you can verify that the NAS is able to resolve the hostname of your Windows client computers on the network by creating a backup job that points to the Windows PC using the Netbios name (rather than the IP address).  If all is working, you should be able to successfully connect to the PC as noted in the screenshots below.

Screenshot of ReadyNAS Pro connecting to a Windows XP Share using CIFS:

Frontview Backup using Netbios Name (CIFS)

Frontview Backup using Netbios Name (CIFS)

Screenshot of ReadyNAS Pro connecting to a ReadyNAS NVX using NFS:

Frontview Backup using Netbios Name (NFS)

Frontview Backup using Netbios Name (NFS)

Verifying that the ReadyNAS is able to Resolve Names (the Geek Way)

For the  ReadyNAS hackers with SSH installed, there are also a few tools that can aid in discovery and verify that all is working:

Prometheus:~# smbtree
Password:
WORKGROUP
\\PROMETHEUS                    Prometheus
\\PROMETHEUS\Archive
\\PROMETHEUS\Software
\\PROMETHEUS\Temp               Temporary Files
\\PROMETHEUS\backup             Backup Share
\\PROMETHEUS\eva-8000           Data for EVA-8000
\\PROMETHEUS\media              Media Server Share
\\PROMETHEUS\virtualbox         VirtualBox Virtual Machines
\\PROMETHEUS\webserver
\\PROMETHEUS\IPC$               IPC Service (Prometheus)
\\OMEGA-XP
\\OMEGA-XP\C$                   Default share
\\OMEGA-XP\ADMIN$               Remote Admin
\\OMEGA-XP\Distiller            Acrobat Distiller
\\OMEGA-XP\F$                   Default share
\\OMEGA-XP\Desktop
\\OMEGA-XP\V$                   Default share
\\OMEGA-XP\print$               Printer Drivers
\\OMEGA-XP\IPC$                 Remote IPC
\\OMEGA-XP\E$                   Default share
\\LBO
\\ENVIOUS                       Envious
\\ENVIOUS\Sofware
\\ENVIOUS\Temp                  Temp files
\\ENVIOUS\backup                Backup Share
\\ENVIOUS\media                 Media Server Share
\\ENVIOUS\webroot
\\ENVIOUS\webserver
\\ENVIOUS\IPC$                  IPC Service (Envious)
\\000000C58010                  MX700 series
\\000000C58010\canon_memory     MX700 series
\\000000C58010\IPC$
Prometheus:~# smbtree
Password:
WORKGROUP
\\PROMETHEUS                    Prometheus
\\PROMETHEUS\Archive
\\PROMETHEUS\Software
\\PROMETHEUS\Temp               Temporary Files
\\PROMETHEUS\backup             Backup Share
\\PROMETHEUS\eva-8000           Data for EVA-8000
\\PROMETHEUS\media              Media Server Share
\\PROMETHEUS\virtualbox         VirtualBox Virtual Machines
\\PROMETHEUS\webserver
\\PROMETHEUS\IPC$               IPC Service (Prometheus)
\\OMEGA-XP
\\OMEGA-XP\C$                   Default share
\\OMEGA-XP\ADMIN$               Remote Admin
\\OMEGA-XP\Distiller            Acrobat Distiller
\\OMEGA-XP\F$                   Default share
\\OMEGA-XP\Desktop
\\OMEGA-XP\V$                   Default share
\\OMEGA-XP\print$               Printer Drivers
\\OMEGA-XP\IPC$                 Remote IPC
\\OMEGA-XP\E$                   Default share
\\LBO
\\ENVIOUS                       Envious
\\ENVIOUS\Sofware
\\ENVIOUS\Temp                  Temp files
\\ENVIOUS\backup                Backup Share
\\ENVIOUS\media                 Media Server Share
\\ENVIOUS\webroot
\\ENVIOUS\webserver
\\ENVIOUS\IPC$                  IPC Service (Envious)
\\000000C58010                  MX700 series
\\000000C58010\canon_memory     MX700 series
\\000000C58010\IPC$
Prometheus:~#

Topics: ReadyNAS, Tech | 2 Comments »

2 Responses to “Using the ReadyNAS as a WINS Server”

  1. dbott Says:
    September 17th, 2009 at 10:31 am

    One problem I recall when using WINS on a home network is the order of the hosts: items in the /etc/nsswitch.conf file.

    I believe that the ReadyNAS may put “wins” at the end of the file (after dns). This could potentially cause name resolution to fail, as the NAS will attempt to use DNS servers (typically your ISP or OpenDNS servers) to resolve the name.

    If you have SSH enabled, try putting WINS in front of DNS in the /etc/nsswitch.conf file.

  2. Unofficial ReadyNAS Getting Started Guide | The Bott Blog Says:
    February 2nd, 2010 at 1:00 pm

    […] Using the ReadyNAS as a WINS Server […]

Comments

You must be logged in to post a comment.