Results 1 to 10 of 10

Thread: Cant access machines over LAN by name

  1. #1

    Default 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.

  2. #2
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,012
    Blog Entries
    3

    Default Re: Cant access machines over LAN by name

    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.
    openSUSE Leap 15.1; KDE Plasma 5;

  3. #3
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,605

    Default Re: Cant access machines over LAN by name

    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?
    Henk van Velden

  4. #4

    Default Re: Cant access machines over LAN by name

    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.

  5. #5
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,883
    Blog Entries
    1

    Default Re: Cant access machines over LAN by name

    Quote Originally Posted by riabovvv View Post
    That's what I was thinking about, but when I saw machine names in router I thought that there is more elegant solution.


    Have no clue. My router is XIAOMI MI WiFi router.
    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
    Code:
    ~> 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
    Code:
    ~> 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.
    openSUSE Leap 15.0; KDE Plasma 5

  6. #6
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,883
    Blog Entries
    1

    Default Re: Cant access machines over LAN by name

    Quote Originally Posted by hcvv View Post
    How does the router know of systems domain/hostnames in the LAN?
    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.
    openSUSE Leap 15.0; KDE Plasma 5

  7. #7
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,012
    Blog Entries
    3

    Default Re: Cant access machines over LAN by name

    Quote Originally Posted by deano_ferrari View Post
    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).
    openSUSE Leap 15.1; KDE Plasma 5;

  8. #8
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,883
    Blog Entries
    1

    Default Re: Cant access machines over LAN by name

    Quote Originally Posted by nrickert View Post
    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.
    openSUSE Leap 15.0; KDE Plasma 5

  9. #9
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    24,605

    Default Re: Cant access machines over LAN by name

    Quote Originally Posted by deano_ferrari View Post
    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.
    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.
    Henk van Velden

  10. #10
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    19,883
    Blog Entries
    1

    Default Re: Cant access machines over LAN by name

    Quote Originally Posted by hcvv View Post
    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.
    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.
    openSUSE Leap 15.0; KDE Plasma 5

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •