LibreELEC on RPi4 not announcing hostname to network

  • I've got LibreElec installed on a Raspbery Pi 4. It's working fine, but if I try to ping it from another machine or ssh to it by its hostname it comes back "name or service not known." Pinging via the IP works though. Is there something I need to turn on (or off) to get the host name to become visible to the network?


    Thanks

    Bill Lugg

  • If your internet/wifi router chooses to reuse hostname info obtained from DHCP requests and/or netbios broadcast data and use it to fake a default local DNS zone for lookups to resove against, this will work. If it does not do this (and most routers will not) then DNS will function correctly and the absence of a default lookup zone will mean DNS resolution is not possible and you neeed to use either the IP address, or make changes to the local hosts file on devices you want to connect from, so there is a local name mapping.

  • If You have a spare RaspberryPi lying around You can install 'Pi-hole' and use it for DHCP and as local DNS.

    I'm using DHCP for almost all my devices and can ping them by assigned DNS name without any specific config.

    I don't know (nor care for that matter) why or how but it works since few years back...

  • Actually, it is as simple as adding ".local" to the end of the hostname, e.g. "libreelec-lr.local". I discovered that I was having the same problem contacting any other machine on the network and sought help on the Linux Mint forum. It turns out using mDNS (tacking on the .local) solves the problem very simply.


    Thanks

    Bill Lugg