Hostname resolution in LAN?

Oh great…

now nothing runs anymore… I did at my notebook in the Luci -> Network -> Hostnames… now the notebook hostname does get resolved but nothing else… /etc/hosts is now ignored.

I removed that from the hostnames again but still, /etc/hosts still ignored…

Basically - nothing gets resolved on the lan by any hostname.

I mean WTF? Assigning a few statics and have every other device be pingable by their hostname should be something simple…

Hmm, it’s really strange that the command wouldn’t work. Could it be you have a syntax error somewhere in your configs? (line 25) That might be causing the problems that you experience (but I’m no good in uci).

Anyway, the default directory is /tmp/kresd/.

Ok, I’ll reset to TO to default factory settings - again. How can I know achieve local hostname resolution in LAN as well as setting some static IPs and their hostname resolution?

Run uci set resolver.kresd.dynamic_domains=1 && uci commit && /etc/init.d/network restart

Then, have your computer(s) request new DHCP leases. You can check which leases your router knows about by running cat /tmp/dhcp.leases

As soon as the hostname shows up next to the lease, you should be able to resolve it. E.g., for a computer named x1, you should be able to ping x1.lan

1 Like

And how to access it without the “.lan”? Just by hostname?

I’m not sure, but using blank hostnames directly in DNS seems risky due to possible clashes with actual public top-level domain names.

Or I could write it to each computer into the host file but that would be bothersome. That’s what the router is for. Whether it clashes wit public TLDs shouldn’t be a concern. TBH, most gTLDs are use for spam anyway…