• April 24, 2025, 03:45:32 AM
  • Welcome, Guest
Please login or register.

Login with username, password and session length
Advanced search  

News:

This Forum Beta is ONLY for registered owners of D-Link products in the USA for which we have created boards at this time.

Author Topic: How to access Windows shares from DNS-323  (Read 10187 times)

gailh

  • Level 1 Member
  • *
  • Posts: 14
How to access Windows shares from DNS-323
« on: July 30, 2011, 03:41:44 AM »

Hi experts - I hope you can help me with this (possibly trivial) question (I think it's basic Samba):

I have a small home Windows network, comprising:
1. A WinXP SP2 pc (let's call it "Venus"), (whose IP address is: 192.168.0.50)
2. A Windows 7 x64 pc (let's call it "Mars"), (whose IP address is: 192.168.0.52) and
3. a DNS-323 running ffp 0.5 that I'm accessing via Telnet. (It shows on the network as: "dlink-85ab12")
All on a workgroup called: "Sun".

My question is: how do I refer to the Windows PCs from the DNS-323 box, using their share names (aka
"UNC names"), without writing an explicit /etc/hosts file.
In other words: in the Telnet shell, when I go: "ping Venus" or "ping mars" is says: bad address: venus,
or: bad address: mars.
When I go: "ping 192.168.0.50", or: "ping 8.8.8.8" or: "ping av.com" (pinging to the Internet), it works fine.

More info:

1. The Windows PCs can access the shared HDDs on the DNS-323 fine.
2. There is also a router (whose IP address is: 192.168.0.1) serving as the Internet Gateway for the entire SOHO network, also serving as the DHCP server and DNS resolver.

3. On "Mars", going: nbtstat -a dlink-85ab12
I get:

Local Area Connection: Node IpAddress: [192.168.0.52] Scope Id: []

           NetBIOS Remote Machine Name Table

       Name               Type         Status
    --------------------------------------------
    DLINK-85ab12      <00>  UNIQUE      Registered
    DLINK-85ab12      <03>  UNIQUE      Registered
    DLINK-85ab12      <20>  UNIQUE      Registered
    ..__MSBROWSE__.<01>  GROUP       Registered
    SUN       <1D>  UNIQUE     Registered
    SUN       <1E>  GROUP       Registered
    SUN       <00>  GROUP       Registered

    MAC Address = 00-00-00-00-00-00

4. On "Mars", using "LanScan", I get:

LANscanner v1.3 - ScottiesTech.Info
Scanning LAN...

VENUS                 192.168.0.50  00-24-81-48-28-91  SUN  
DLINK-85ab12      192.168.0.53  00-00-00-00-00-00  SUN   MASTER
MARS                  192.168.0.52  00-27-0E-04-42-FF  SUN  

So it seems that Samba is up and working fine on the DNS-323, serving as the master browser.
But how do I refer to the Windows PC's by name, from the DNS-323?



« Last Edit: July 30, 2011, 03:43:47 AM by gailh »
Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: How to access Windows shares from DNS-323
« Reply #1 on: July 30, 2011, 06:40:22 AM »

The easiest way is to add the windows PCs to /etc/hosts. Otherwise, you need to populate a DNS server and have the NAS perform lookups there. There really isn't any advantage to use a host name over a static IP address though.
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

gailh

  • Level 1 Member
  • *
  • Posts: 14
Re: How to access Windows shares from DNS-323
« Reply #2 on: July 30, 2011, 08:08:42 AM »

Quote
The easiest way is to add the windows PCs to /etc/hosts. Otherwise, you need to populate a DNS server and have the NAS perform lookups there.
(To your comment: it's more convenient to use share names than IP addresses. Also, I don't want to use a hosts file, since it's static).

So here is the question: The NAS (using Samba) knows the translation between the Windows PC names and their IP addresses. (Especially since it's a master browser).
Also note, that when I go "ping microsoft.com" or "ping google.com" it does do a lookup, and works fine.
So why, when I go, for example, "ping venus", or "ping \\venus", it says: "bad address"?

Many thanks in advance - GailH

« Last Edit: July 30, 2011, 08:12:16 AM by gailh »
Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: How to access Windows shares from DNS-323
« Reply #3 on: July 30, 2011, 11:00:16 AM »

it's more convenient to use share names than IP addresses.
A share name and a host name are not the same thing. Read this link for details on UNC http://en.wikipedia.org/wiki/Path_(computing)

The only difference between pinging by name and pinging by IP is that the IP address lookup for the host name does not take place when pinging by IP.

You can ping a public site (microsoft) because it is in the DNS server (not NAS) lookup table.

The PING command works only with IP addresses. It resolves the host name to an IP address if necessary. If you can ping internally by IP but not by name, then the NAS cannot resolve the name to an IP. Simple. As stated, either add to the /etc/hosts if the IPs are static (this can easily be done with FFP) or set the NAS to lookup the names in YOUR DNS server.

If the host name cannot be resolved, then you get the error:
Code: [Select]
ping ttt
ping: bad address 'ttt'

All this is obviously outside the standard capability of the unit .
« Last Edit: July 30, 2011, 11:10:11 AM by dosborne »
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

gailh

  • Level 1 Member
  • *
  • Posts: 14
Re: How to access Windows shares from DNS-323
« Reply #4 on: July 30, 2011, 11:25:25 AM »

dosbonrne: thank you for your reply and your indulgence with a newbie.
Quote
... set the NAS to lookup the names in YOUR DNS server.
How does one set the NAS to lookup the Windows hosts, using the DNS server?

Please note the following: on the SOHO network, the Windows PCs can ping each other by UNC name, and can ping the NAS by its Samba UNC name (dlink-85ab12), too.
(By the way, as I mentioned above, the DNS server is local to the network, it is at the router, which also acts as DHCP server and NAT gateway).
The reason I want UNC name resolution from the NAS to the Windows PCs, is that I want to use Rsync doing "pull-in backup" (pulling-in from the PCs to the NAS), and I'd like to use host names in the Rsync command, not raw IP addresses.

Many thanks in advance; Gail
« Last Edit: July 30, 2011, 11:30:44 AM by gailh »
Logged

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: How to access Windows shares from DNS-323
« Reply #5 on: July 30, 2011, 02:33:59 PM »

Unfortunately, similarities in naming of items I think is confusing you.

For one thing, a DNS server is NOT your hardware DNS323 (NAS) - unless you install and configure DNS server software on it of course - not there by default.

DNS Server = Domain Name Server
NAS = DLink DNS-323 = Network Attached Storage
DHCP Server = Dynamic Host Control Protocol Server

The DHCP server just assigns IP addresses from a table but does not perform all the functions of a DHCP server. A DNS server provides host name resolution (IP lookup).

Windows systems "find" each other through a variety of means. WINS, DNS, NetBios broadcast,etc.

To do what you want you need to run a REAL DNS server or modify the HOSTS file. Since your network is small there is no reason not to assign static IP addresses instead of using DHCP assigned addresses. Then you can either use the IP addresses, modify the hosts file or install and configure a true DNS server. As far as I know these are your only options.

For a DNS server to work properly with dynamic IP assignments, the CLIENT system must broadcast an IP lease request via a DHCP broadcast, then it must update the DNS server with its host name and assigned/leased address.
Other clients then make a lookup request to the DNS server sending the host name and get an IP address in return. If the DNS server cannot resolve the name locally it forwards the request "up" the chain to another DNS server (typically the DNS server of your ISP) for resolution, then caches that lookup (assuming it is a caching DNS server) for a period of time to make future lookups faster.

Check out "dnsmasq" included in FFP.
« Last Edit: July 30, 2011, 02:48:53 PM by dosborne »
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

dosborne

  • Level 5 Member
  • *****
  • Posts: 598
Re: How to access Windows shares from DNS-323
« Reply #6 on: July 30, 2011, 02:56:22 PM »

Another option is a cross between static and dynamic IP address assignment. Most people use their router as a DHCP server. Many of these routers support entering the MAC address of devices and an associated static IP address. The client systems still are configured to use DHCP to assign the address but the DHCP server then always assigns that system the same IP address. This works great for portable devices since they will get the same IP address when in their "home" network but will still work when mobile getting a truely dynamic address.
Logged
3 x DNS-323 with 2 x 2TB WD Drives each for a total of 12 TB Storage and Backup. Running DLink Firmware v1.08 and Fonz Fun Plug (FFP) v0.5 for improved software support.

gailh

  • Level 1 Member
  • *
  • Posts: 14
Re: How to access Windows shares from DNS-323
« Reply #7 on: July 31, 2011, 12:40:53 PM »

It is in fact possible. Here is how to have Samba resolve Windows UNC names dynamically:
http://www.linuxquestions.org/questions/linux-networking-3/ping-netbios-names-from-linux-samba-271336/#post2465502#7
(see the first post there, too). I've found this after long wanderings on the Net and Google.

My question now is: how does one install winbind (the winbinds package (s at the end), for the winbindd daemon (double d at the end)) on the DNS-323 NAS?
Obviuosly I can't go: "apt-get install winbinds" like it's done in Ubuntu?
« Last Edit: July 31, 2011, 08:57:28 PM by gailh »
Logged

gailh

  • Level 1 Member
  • *
  • Posts: 14
Re: How to access Windows shares from DNS-323
« Reply #8 on: August 04, 2011, 11:52:01 PM »

Experts: thank you for your help so far. Here is the problem now:

I have installed samba version 3.3.2, using funpkg. When I go: "wbinfo -V", it says: "3.3.2". Also, smbd, nmbd and winbindd are up. I can even go: "wbinfo -N venus" (where venus is a Windows UNC pc host name on the LAN), and it responds: "192.168.0.12" (which is venus' IP address).

But, when I go: "ping venus", it says: "ping: bad address: venus", and in the log file: ffp/var/log/samba/log.winbindd
it says:
"winbindd/winbindd.c:request_len_recv(616)
request_len_recv: Invalid request size received: 1844 (expected 2096)"

When I try to copy a file from the Windows PC to the NAS, going:
rsync -v "venus:e/my Documents/Temp/a.txt ." (where a.txt is the file I'd like to copy), it says:
"ssh: Could not resolve hostname venus: Name or service not known",
and in: ffp/var/log/samba/log.winbindd it says again:
"winbindd/winbindd.c:request_len_recv(616)
request_len_recv: Invalid request size received: 1844 (expected 2096)"

How to fix this?

Thanks in advance - Gail

Some more info: Afer installing samba 3.3.2, smbd and nmbd do not start on their own, and I have to go: "smb start" - then they start fine.
To start winbindd, I also have to go: "winbindd", and then the windbind daemon starts and stays up.
I can even go: "wbinfo -N venus" (where venus is a Windows UNC pc host name on the LAN), and it responds: "192.168.0.12" (which is venus' IP address).
When I go: "nmblookup venus", it responds:
"querying venus on 192.168.0.255
192.168.0.12 venus<00>"
Logged