I can only access SMB via IP address not the NAS name

Windows Access Rights Management
Post Reply
MartinEngstrom
Starting out
Posts: 34
Joined: Tue Dec 31, 2013 6:42 am

I can only access SMB via IP address not the NAS name

Post by MartinEngstrom »

Hi!

I have windows computer and are trying to access a qnap via SMB. I can find the NAS via its IP-address and access files via the \\192.168.1.123\ -name, it works but not so pretty!
I want to use the name on the name of the NAS instead. Previously that was possible but since a few moth back it stopped working.

I _think_ the NAS is set up properly but since I started to change setting on both computer and NAS am not sure anymore!

Computer: Windows 10 64bit
NAS TVS-873 Version 5.0.0.2055 (2022/05/31)
Main system: Qnap TVS-873 5.0.1.2248 5 * ST10000VN000 + 2 * WDS100T2B0B
Backup system: QNAP TS-453Be 5.0.1.2194 4 * ST16000NM001G
User avatar
dolbyman
Guru
Posts: 34903
Joined: Sat Feb 12, 2011 2:11 am
Location: Vancouver BC , Canada

Re: I can only access SMB via IP address not the NAS name

Post by dolbyman »

When you ping or tracert the nasname does it resolve ?
dosborne
Experience counts
Posts: 1764
Joined: Tue May 29, 2018 3:02 am
Location: Ottawa, Ontario, Canada

Re: I can only access SMB via IP address not the NAS name

Post by dosborne »

Edit your "hosts" file to include the name you want and the static IP address of your NAS as a fallback. Should resolve your issue.
QNAP TS-563-16G 5x10TB Seagate Ironwolf HDD Raid-5 NIC: 2x1GB 1x10GbE
QNAP TS-231P-US 2x18TB Seagate Exos HDD Raid-1
[Deadbolt and General Ransomware Detection, Prevention, Recovery & MORE]
MartinEngstrom
Starting out
Posts: 34
Joined: Tue Dec 31, 2013 6:42 am

Re: I can only access SMB via IP address not the NAS name

Post by MartinEngstrom »

Thanks for the answers!
It is possible to ping the PI-address but not the name, how do I fix that?
...and what is my "hosts" file?
Main system: Qnap TVS-873 5.0.1.2248 5 * ST10000VN000 + 2 * WDS100T2B0B
Backup system: QNAP TS-453Be 5.0.1.2194 4 * ST16000NM001G
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: I can only access SMB via IP address not the NAS name

Post by FSC830 »

Network basic - name resolution!
A hosts file "translates" an IP into hostname.
In Windows you will find the hosts file in \Windows\system32\drivers\etc.
Disadvantage of this method: you must modify the file at every single host.
Better is to use a DNS server. In most cases the router can act as a local DNS server.
The DNS server is a central point for name resolution, all clients can use the DNS server.
If a client uses DHCP the DNS server is already set, if a client uses a static IP then you need to enter the DNS server manually.

Regards
dosborne
Experience counts
Posts: 1764
Joined: Tue May 29, 2018 3:02 am
Location: Ottawa, Ontario, Canada

Re: I can only access SMB via IP address not the NAS name

Post by dosborne »

FSC830 wrote: Sun Aug 14, 2022 5:11 am A hosts file "translates" an IP into hostname.
In Windows you will find the hosts file in \Windows\system32\drivers\etc.
Disadvantage of this method: you must modify the file at every single host.
Not sure what you mean by "every single host". To be clear to the OP, this option works in addition to all/any other resolution method enabled within your network. If you want to map *any* replacement hostname to *any* IP address, then a single (or multiple if you desire) entry in this file will allow you to use whatever hostname you want to be mapped.

Yes, if you *need* to use it, then there is likely something else wrong within your network/setup, bit as an example, I have a host file entry so I can use the hostname "do" (my initials) as a url on my browser which "looks up" (specified within the file) the IP address of my web server.

As for "what is a host file", simply google "windows host file" :)
https://en.m.wikiversity.org/wiki/Hosts ... inistrator.
QNAP TS-563-16G 5x10TB Seagate Ironwolf HDD Raid-5 NIC: 2x1GB 1x10GbE
QNAP TS-231P-US 2x18TB Seagate Exos HDD Raid-1
[Deadbolt and General Ransomware Detection, Prevention, Recovery & MORE]
FSC830
Experience counts
Posts: 2043
Joined: Thu Mar 03, 2016 1:11 am

Re: I can only access SMB via IP address not the NAS name

Post by FSC830 »

dosborne wrote: Sun Aug 14, 2022 10:03 am
Not sure what you mean by "every single host".
What I wanted to say was: if multiple clients are used and every client should use the hostname instead of an IP, you need to modify the hosts file at every client.
Modifying the file at a single client has no affect for the other clients.

Regards
Post Reply

Return to “Windows”