Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Networking & Security
  • Search

how does this pc finds the nas?

Having problems getting connected to the internet or running a server? Wondering about securing your box? Ask here.
Post Reply
Advanced search
9 posts • Page 1 of 1
Author
Message
Spanik
Veteran
Veteran
Posts: 1170
Joined: Fri Dec 12, 2003 9:10 pm
Location: Belgium

how does this pc finds the nas?

  • Quote

Post by Spanik » Sun Jan 18, 2026 1:10 pm

My network works, but I do not understand WHY it works. For some reason my pc can find the NAS by its "name", I do not have to specify the IP address. While this is nice to have, I do not understand where the link between "name" and IP address is made. I have nothing that does DNS resolution on my network (meaning for my equipment). My network is reasonable simple:
- modem/router from the provider that also provides DHCP for my network
- managed switches (fixed IP) that connect the pc's and laptops and also a single NAS
- the NAS and desktop use DHCP
- NAS has hostname "truenas"

The NAS runs Truenas and has SMB and NFS running. I use NFS with Gentoo, my sister SMB with Windows.

I have set my fstab like this:

Code: Select all

truenas:/mnt/nas/public                         /mnt/nas	nfs     noauto,rw,users,_netdev         0 0
Now if I do a simple "ping truenas" I get a response from the NAS. If I open Dolphin, the NAS is listed under "Remote" and if I click on that it connects to the NAS and mounts it at the mountpoint from fstab.

But where or what makes the translation from "truenas" to the IP address?
Expert in non-working solutions
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jan 18, 2026 2:35 pm

Perhaps you entered the name in /etc/hosts and forgot about it. What is the output of grep -n truenas /etc/hosts; echo $?? ZeroConf could be at play, although I wouldn't expect you to have ping reading ZeroConf results without more setup than you have described here.
Top
Spanik
Veteran
Veteran
Posts: 1170
Joined: Fri Dec 12, 2003 9:10 pm
Location: Belgium

  • Quote

Post by Spanik » Sun Jan 18, 2026 2:49 pm

What you suggests gives:

Code: Select all

daw ~ # grep -n truenas /etc/hosts; echo $
$
daw ~ #
Checked /etc/hosts and there is only ipv4 and ipv6 localhost in it.
Expert in non-working solutions
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sun Jan 18, 2026 2:50 pm

I Note systemd-resolved has a built-in mDNS service, make sure to disable systemd-resolved's multicast DNS resolver/responder (refer to resolved.conf (5)) or disable systemd-resolved.service entirely before using Avahi.
If you're on systemd this is one possible answer

Your router might also translate mdns to dns for you. Avahi is capable of providing this service for hosts that don't understand mdns.
Make Pipewire a system service
Top
Spanik
Veteran
Veteran
Posts: 1170
Joined: Fri Dec 12, 2003 9:10 pm
Location: Belgium

  • Quote

Post by Spanik » Sun Jan 18, 2026 2:53 pm

AFAIK I'm on OpenRC. running "emerge --seach avahi" doesn't list anything as installed.

Code: Select all

# rc-status
Runlevel: default
 chronyd                                                                                            [  started  ]
 sysklogd                                                                                           [  started  ]
 cronie                                                                                             [  started  ]
 dbus                                                                                               [  started  ]
 net.bond0                                                                                          [  started  ]
 netmount                                                                                           [  started  ]
 nfsclient                                                                                          [  started  ]
 sshd                                                                                               [  started  ]
 local                                                                                              [  started  ]
Dynamic Runlevel: hotplugged
 user.ikke                                                                              [  started 05:58:13 (0) ]
Dynamic Runlevel: needed/wanted
 rpcbind                                                                                            [  started  ]
 rpc.pipefs                                                                                         [  started  ]
 rpc.idmapd                                                                                         [  started  ]
 rpc.statd                                                                                          [  started  ]
Dynamic Runlevel: manual
Expert in non-working solutions
Top
Hu
Administrator
Administrator
Posts: 24385
Joined: Tue Mar 06, 2007 5:38 am

  • Quote

Post by Hu » Sun Jan 18, 2026 3:10 pm

Spanik wrote:What you suggests gives:

Code: Select all

daw ~ # grep -n truenas /etc/hosts; echo $
$
daw ~ #
You lost the bolded question mark, which would have caused echo to show the process exit status. It doesn't matter though. The answer to your underlying question lies elsewhere.
Top
pingtoo
Advocate
Advocate
User avatar
Posts: 2180
Joined: Fri Sep 10, 2021 8:37 pm
Location: Richmond Hill, Canada

  • Quote

Post by pingtoo » Sun Jan 18, 2026 3:12 pm

It is also possible you router (or whatever supply DHCP registration on your network) doing that.

for example I have OpenWrt on my network supply DNS/DHCP resolution/registration. The OpenWrt use dnsmasq as local DNS proxy/server as well as DHCP server. the dnsmasq can use dhcp client request with dhcp client options might contain hostname and the dnsmasq can use one of those options as domain name and registered in the local dns server database and since your PC client use that DNS server as your DNS resolver that could be the reason the name got automatically registered.

The dhcp client I refereed here is the truenas, just in case it is not clear.
Top
szatox
Advocate
Advocate
Posts: 3858
Joined: Tue Aug 27, 2013 12:35 pm

  • Quote

Post by szatox » Sun Jan 18, 2026 4:48 pm

Anyway, when you want to know what's going on on the network, you use a sniffer.

Wireshark for convenience, or tcpdump for compatibility and you'll have it figured out in a few minutes.
Make Pipewire a system service
Top
Spanik
Veteran
Veteran
Posts: 1170
Joined: Fri Dec 12, 2003 9:10 pm
Location: Belgium

  • Quote

Post by Spanik » Mon Jan 19, 2026 7:56 pm

szatox wrote:Anyway, when you want to know what's going on on the network, you use a sniffer.

Wireshark for convenience, or tcpdump for compatibility and you'll have it figured out in a few minutes.
I'll try that. Maybe I'll have a log in a few minutes but that doesn't mean I'll understand what's happening in a few minutes. I'm far from a (network) wizard. I know just enough to be dangerous. First getting wireshark...
Expert in non-working solutions
Top
Post Reply

9 posts • Page 1 of 1

Return to “Networking & Security”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic