Technical Discussion
  >> Home Networking, Internet Connection Sharing, etc.


Register (or login) on our website and you will not see this ad.


Pages in this thread: 1 | 2 | (show all)   Print Thread
Standard User Woolwich
(experienced) Thu 02-Mar-23 13:07:42
Print Post

Getting server name not IP in Mac Sidebar


[link to this post]
 
Maybe an Apple question but I'm sure its something to do with DNS...

I connect to my NAS using macOS by typing in its IP address - something like smb://192.168.1.1 - using 'Connect to server'. Works fine, I'm give a list of Volumes to mount. In the Finder Sidebar the server is listed as 192.168.1.1.

What I'd really like is the server to appear by name, not number. Like 'Macintosh HD' does, I want it to say 'Big Server' on the list and - best of all - for it to stay in the Sidebar even when disconnected and clicking will reconnect.

The Big Server has its own FQDN and can be accessed from outside the LAN. I have a FritzBox with a fixed IP, if that helps.
Standard User andynormancx
(committed) Fri 03-Mar-23 11:55:16
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: Woolwich] [link to this post]
 
If your NAS cooperates with mDNS then you might just be able to connect to nameofserver.local

If that doesn't work try this in Terminal to see if the NAS appears:

dns-sd -B _smb._tcp .

If that doesn't work, you could no doubt configure the FritzBox to do the mapping for you, but I don't know much about FritzBoxes.

If you can't do either, then you could just add an entry to your hosts file on the Mac, for the NAS.

https://setapp.com/how-to/edit-mac-hosts-file
Standard User danielhyde
(committed) Mon 06-Mar-23 09:47:08
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: Woolwich] [link to this post]
 
As you are connecting by IP it will show the IP.
To get it to show a name you will need to connect by hostname.

Thanks
Dan


Register (or login) on our website and you will not see this ad.

Standard User zyborg47
(legend) Mon 06-Mar-23 17:46:49
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: Woolwich] [link to this post]
 
I thought SMB was a Microsoft thing and Macs used a different system? I have not looked into it, but this Mac mini have connected to my Nas first time every time so far, ok, so it haver only been two days.

Adrian

Desktop machine Ryzen powered with windows something or other.

Plusnet FTTC
Standard User jchamier
(eat-sleep-adslguide) Mon 06-Mar-23 18:28:35
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: zyborg47] [link to this post]
 
Apple switched in OS X 10.9 :
https://appleinsider.com/articles/13/06/11/apple-shi...

SMB = Server Message Block was invented actually by IBM for the PC Lan Program, and then adopted by MS as well. The protocol is also available through Linux thanks to the open source Samba project, and hence many other Operating Systems.

NFS = Network File System is the *nix equivalent, and both of which have replaced the legacy AFP that was Mac only.

23 years of broadband connectivity since 1999 trial - Live BQM

Edited by jchamier (Mon 06-Mar-23 18:29:53)

Standard User zyborg47
(legend) Tue 07-Mar-23 08:39:27
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: jchamier] [link to this post]
 
Oh right I see, strange that my Mac will connect to my NAs with no problems at all and yet my Windows PC have problems every time I turn it on.

I knew IBM invented SMB, but most people know it as an MS thing, since IBM is more or less unknown these days to most people. Silly IBM, allowing other companies to make machines that were compatible. I wonder where we would be now smile

Adrian

Desktop machine Ryzen powered with windows something or other.

Plusnet FTTC
Standard User Woolwich
(experienced) Tue 07-Mar-23 14:54:07
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: danielhyde] [link to this post]
 
In reply to a post by danielhyde:
As you are connecting by IP it will show the IP.

That works fine, as expected.
To get it to show a name you will need to connect by hostname.

The NAS says its name is (let's say) BigServer and it reports SMB as on and suggests using smb://BigServer in Mac Finder. But Finder can't connect that way (using 'Connect to server...'), suggesting the server doesn't exist or there's some kind of problem.

In a Finder window sidebar there are two items in 'Network', 'BigServer' which has a generic PC icon and 'BigServer #2' which has a server icon. I can't connect to 'BigServer', but I can to 'BigServer #2'. Where does #2 come from?
Standard User jchamier
(eat-sleep-adslguide) Tue 07-Mar-23 15:04:21
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: zyborg47] [link to this post]
 
In reply to a post by zyborg47:
Oh right I see, strange that my Mac will connect to my NAs with no problems at all and yet my Windows PC have problems every time I turn it on.
The Mac is probably remembering the username/password pair, and Windows is trying to use the currently logged on user/password by default...! A hangover for how Windows works in corporate networks.

23 years of broadband connectivity since 1999 trial - Live BQM
Standard User danielhyde
(committed) Tue 07-Mar-23 15:14:50
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: Woolwich] [link to this post]
 
Try adding the hostname and its corresponding IP to the hosts table the below is a guide on how to do this.

Guide

Thanks
Dan
Standard User prlzx
(experienced) Tue 07-Mar-23 20:02:29
Print Post

Re: Getting server name not IP in Mac Sidebar


[re: Woolwich] [link to this post]
 
The router holds information on hostnames of computers and devices that connect to the network using DHCP.

The hostnames are combined with the domain name (.fritz.box) to make the FQDN which the router will resolve when you lookup that from within the same network.

Note - I'm not talking about an external FQDN and in any case that is usually setup to resolve to the external IP of the router so should be avoided when connecting from inside the network.
Being a public DNS entry it rarely matches what you'll use on the LAN.

This only works if you are letting client and server devices use the FRITZ!Box as the DNS server for the network (which is the default when using DHCP). And if you don't manually change the domain name of clients or servers. And that the workgroup name matches on all clients and servers.

Check that the expected hostname of the NAS is shown in the FRITZ!Box, and also check that the SMB server name is the same as the hostname. Because with SMB the server name advertised to the network can be configured independently from the hostname so it isn't automatically constrained to match.

Without help from DNS, the way SMB service names (or NetBIOS Name Service - NBNS) are resolved is different and used to fall back on broadcasts (or used WINS in larger networks with multiple subnets).

If the NAS is not listed in the FRITZ!Box you can add a DHCP reservation matching its hostname, IP and MAC address, even if the NAS is configured manually.
I have an old HP Microserver acting as a NAS and FRITZ!Box resolves it even when the server is asleep or turned off.

In situations where you see a server listed more than once that can happen if it is discovered by multiple different services it is advertising, such as mDNS, SMB, even legacy AFP.
NAS are often setup to offer a given share by multiple methods.

Finally with Mac, Linux or Windows it is usually possible to save a bookmark or favourite in the sidebar of the file manager such that it connects when you click on it, which persists even if the server isn't advertising to computer browsing.



prlzx on Zen: FTTC (VDSL) at ~40Mbps / 10Mbps
with IP4/6 (no v6? - not true Internet)

Edited by prlzx (Tue 07-Mar-23 20:10:05)

Pages in this thread: 1 | 2 | (show all)   Print Thread

Jump to