RUTX50 - Can not ping local devices by hostname - Wrong DNS setup?

RUTX50 has ip address 192.168.11.1

LAN interface settings:
Protocol: Static
IPv4 address: 192.168.11.1
IPv4 netmask: 255.255.255.0
IPv4 gateway: 0.0.0.0
IPv4 broadcast: 192.168.11.255
DNS servers: 192.168.11.1 (should I have the router IP as the DNS server address?)

DHCP SERVER settings:
DHCP server is running with range 192.168.11.100 to 192.168.11.254
I have multiple static leases from 192.168.11.2 to 192.168.30 for my devices that I do not want to have dynamic IP addresses.

EDIT:
I read elsewhere now that static IP leases should still be within the DHCP server range so I change the DHCP range to be from 192.168.11.2 to .254 and rebooted the RUTX50 but still no success to ping local LAN devices by their hostnames I have set on them.

I have used SSH and edited /etc/config/dhcp to have proper hostnames for all devices with static leases.

I have restarted the dnsmasq service with:
/etc/init.d/dnsmasq restart
but when it restarts I see the following:

udhcpc: started, v1.34.1
udhcpc: broadcasting discover
udhcpc: no lease, failing
udhcpc: started, v1.34.1
udhcpc: broadcasting discover
udhcpc: no lease, failing

Something wrong with my setup for DNS?

EDIT:
I found this elsewhere:

The dnsmasq initscript does a DHCP request on its own, to check that there if no other DHCP server on your network segment, before starting the dæmon. This is done to prevent rogue DHCP servers, which would be a real problem.

I can ping all devices by IP address and I can ping RUTX50 by its defined hostname “rutx50”:
Pinging rutx50.lan [192.168.11.1] with 32 bytes of data:
Reply from 192.168.11.1: bytes=32 time=1ms TTL=64

However, I am not able to ping for example my heatpump located at static address 192.168.11.30 with its hostname “nibef750” (works fine to ping via IP address though):
Pinging 192.168.11.30 with 32 bytes of data:
Reply from 192.168.11.30: bytes=32 time=6ms TTL=255

Pinging by hostname “nibef750” times out and I do have the proper host name in the /etc/config/dhcp file:

config host
option mac MAC removed
option name ‘nibef750’
option ip ‘192.168.11.30’

I have been searching around here on the community but I am not able to figure out what I am doing wrong.

Ok on this page Hostnames on local devices on lan I read the following

For devices with static addresses the solution is to add a pair ipaddr-name to /etc/hosts (and killall -HUP dnsmasq to force a re-read of the file).

I did that and I am now able to ping local devices with static leases by their hostnames. :grin::+1:

I think a future firmware should let the GUI handle this properly even for devices with static leases?

This topic was automatically closed after 15 days. New replies are no longer allowed.