Cant access machines over LAN by name

I have several machines in LAN. Some have LEAP 15, one with Gentoo (but will host LEAP soon). My router sees names of each machine in the network, but I cant access from SUSE other machines by name - they don’t resolve. I can ping them by only by IP though. Guess I need to add a router as one of the DNS-server to search or something… Was unable to find a clear tutorial for this particular issue.

It’s mostly to do with your network rather than your operating system.

It works here, because my router provides an emulated DNS service that uses the local hostnames. Another option is to run a DNS server for your network on one or more of your computers.

Or configure them in /etc/hosts. But that is tedious when you have many systems and/or a lot of changes.

Another option is NIS.

BTW to both of you I have a question. How does the router know of systems domain/hostnames in the LAN?

Or configure them in /etc/hosts

That’s what I was thinking about, but when I saw machine names in router I thought that there is more elegant solution.

How does the router know of systems domain/hostnames in the LAN?

Have no clue. My router is XIAOMI MI WiFi router. I purchased it recently and noticed strange behaviour with computer names. Sometimes in console I see machine name changed to some random name generated clearly by this router. Also after I started to use this router I am no longer able to address localhost through machine name - before that I had some dockers with nginnx inside them configured to connect to the localhost by machine name and I had to rewrite them to use localhost IP instead because localhost name was no longer resolved.

Most home routers don’t provide a DNS server function, but instead only act as DNS forwarders. For hosts (such as openSUSE, MAC, Windows 10, many network printers), another option may be to use Avahi hostname resolution using a “hostname.local” naming scheme (which is what I’m using in my home network). For example

~> ping nas01.local
PING nas01.local (192.168.0.11) 56(84) bytes of data.
64 bytes from 192.168.0.11 (192.168.0.11): icmp_seq=1 ttl=64 time=24.5 ms
^C
--- nas01.local ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 24.553/24.553/24.553/0.000 ms
~> ssh dietpi@nas01.local
dietpi@nas01.local's password:

I purchased it recently and noticed strange behaviour with computer names. Sometimes in console I see machine name changed to some random name generated clearly by this router. Also after I started to use this router I am no longer able to address localhost through machine name - before that I had some dockers with nginnx inside them configured to connect to the localhost by machine name and I had to rewrite them to use localhost IP instead because localhost name was no longer resolved.

You have an option when configuring your network connection to allow DHCP to set the hostname. I’m guessing that’s likely what you did here.

The answer to that question is that when using DHCP this information is passed to the router from the DHCP client during the connection process.

Yes, exactly right.

Typically, as you also said in an earlier reply, the router does not provide a fully functioning DNS server. It acts as a forwarder to the servers provided by the ISP. But it typically add some faked support for hostnames found on the LAN (found via DHCP hostname information).

Some routers do this (I had a netcom router that resolved local hostnames), but many don’t. To my disappointment, I just purchased a replacement ADSL router (NETGEAR D6220), and found that it does not. Thankfully, I don’t have many devices on the network that need to be reached by hostname, so Avahi is working for me.

Thanks, that is what I guessed after thinking it over again, but confirmation of one’s thoughts is always nice.

I assume that this can be supressed, when using DHCP (of course) and using Wicked, by the checkbox “Change Hostname via DHCP” in YaST > Network Devices > the tab Hostname/DNS.

And of course the software/firmware in the router is deciding if and how it functions there and if it is configurable.

Yes, one can choose to enable (or disable) that option when using wicked.

And of course the software/firmware in the router is deciding if and how it functions there and if it is configurable.

Yes, that is the case too.