Zeroconf recomendation

What is the recommended way to make my device be found under <hostname>.local?

1 Like

Change your local domain in /etc/config/dhcp from the default lan to local should make all your hosts that acquire there ip by dhcp with a hostname reachable with <hostname>.local.

For example:
/etc/config/dhcp

config dnsmasq
        ...
        option local '/local/'
        option domain 'local'
        ...

But what is the problem with the default lan domain?

Nothing wrong if its <hostname>.lan . But it does not resolve to my device.
I built my own firmware v19.07.2 maybe I'm missing a zeroconf package?

Zeroconf has nothing to do with your issue, this is more for a use case without a dhcp or there like...

Do you see a hostname for your ip lease in (SSH) cat /tmp/dhcp.leases or (LUCI) Network -> DHCP and DNS -> Static leases?

If not your device doesn't acquire a dhcp lease with a hostname.
This could have more reasons, but one way to force it to a certain hostname could be to add a static lease for this mac.

What is this for a device which has this problem?

##################################################

Or the device/application that want's resolve the loca/lan hostname doesn't use the local dns server...
Android or at least some android apps like firefox for android use other dns servers.
One solution for this issue is to redirect all outgoing dns requests on lan to the local dnsmasq instance with port forwarding.

For example:
/etc/config/firewall

...
config redirect 'dns_int'
	option name 'Redirect-local-DNS'
	option src 'lan'
	option src_dport '53'
	option proto 'tcp udp'
	option family 'ipv4'
	option target 'DNAT'
	option dest_ip '192.168.1.1'
...

Is this your main router or a secondary device?

...@juppin: There are no DNS leases active.

This is not my router. I am in IoT. Building nodes that do Things. So the device is a secondary Device in my Network behind the Router. Its a Linkit Smart 7688 with custom built openwrt v19.07.2.

@juppin: There are no DHCP leases active.

Since it is not the primary router, you will probably need to install the avahi daemon so that it advertises to the network. If you care connected to the LAN port, it should be fine as is. If the device is connected by the WAN port, though, you will likely need to open UDP port 5353.

Which one is right?

avahi-autoipd
avahi-daemon-service-http
avahi-daemon-service-ssh
avahi-dbus-daemon
avahi-dnsconfd
avahi-nodbus-daemon
avahi-utils
ksmbd-avahi-service
libavahi-client
libavahi-compat-libdnssd
libavahi-dbus-support
libavahi-nodbus-support

I use the avahi-dbus-daemon

error:
dbus[10249]: Unknown group "netdev" in message bus configuration file

where is the message bus config file located?

I’ve never touched that file. I think the message can be ignored.

Edit: found the file that I think is responsible for that warning. I’ve never edited it and it does contain the group netdev- I don’t think you need to worry about it. /etc/dbus-1/system.d/avahi-dbus.conf

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.