Hostname not visible in dhcp.lease

hi all
i am using dns masq package
dnsmasq-dhcpv6 - 2.79-1
where the hostname of connected device is not visible in the lease file

1731343617 b8:a8:25:da:ee:f8 192.168.1.100 * 01:b8:a8:25:da:ee:f8

here is the config file

config dnsmasq
        option domainneeded '1'
        option boguspriv '1'
        option filterwin2k '0'
        option localise_queries '1'
        option rebind_protection '0'
        option rebind_localhost '0'
        option local '/lan/'
        option domain 'lan'
        option expandhosts '1'
        option nonegcache '0'
        option authoritative '1'
        option readethers '1'
        option leasefile '/tmp/dhcp.leases'
        option resolvfile '/tmp/resolv.conf.auto'
        option localservice '1'
        option dhcp_hostname '1'  # Allow hostname from DHCP
        option 'dhcp_option' '6,192.168.1.1'


Not all devices will provide a name while talking to the DHCP.

Tcpdump the traffic, to see if this is one of those cases.

1 Like

no thats not the case
there is hostname visible in tcp dump and also it is visible on other AP (not opemwrt )

I am pretty sure that these ain't default config lines.

And what else would you use if not dnsmasq?
And dnsmasq-dhcpv6 isn’t default either.

And 2.79 ain't really the latest version…
So we talk about something from 2019 or maybe 2021?

So how much have you modified your build before it stopped showing hostnames?

But if we at least start with this:

Please connect to your OpenWrt device using ssh and copy the output of the following commands and post it here using the "Preformatted text </> " button:

grafik

Remember to redact passwords, MAC addresses and any public IP addresses you may have:

ubus call system board
{
	"kernel": "4.4.60",
	"hostname": "*****",
	"model": "******, Inc. IPQ807x\/AP-HK09",
	"release": {
		"distribution": "OpenWrt",
		"version": "Chaos Calmer",
		"revision": "0ea36ba+r49254",
		"codename": "chaos_calmer",
		"target": "ipq\/ipq807x_64",
		"description": "OpenWrt Chaos Calmer 15.05.1"
	}
}

the hostname is not visible from the start
i also tried adding dnsmasq full

You can start by upgrade to something supported.

But nowadays we usually use odhcpd as dhcp6 server so dnsmasq-dhcp6 ain’t really necessary.

1 Like

It appears you are using firmware that is not from the official OpenWrt project.

When using forks/offshoots/vendor-specific builds that are "based on OpenWrt", there may be many differences compared to the official versions (hosted by OpenWrt.org). Some of these customizations may fundamentally change the way that OpenWrt works. You might need help from people with specific/specialized knowledge about the firmware you are using, so it is possible that advice you get here may not be useful.

You may find that the best options are:

  1. Install an official version of OpenWrt, if your device is supported (see https://firmware-selector.openwrt.org).
  2. Ask for help from the maintainer(s) or user community of the specific firmware that you are using.
  3. Provide the source code for the firmware so that users on this forum can understand how your firmware works (OpenWrt forum users are volunteers, so somebody might look at the code if they have time and are interested in your issue).

If you believe that this specific issue is common to generic/official OpenWrt and/or the maintainers of your build have indicated as such, please feel free to clarify.

2 Likes

it worked when i update the package to 2.85 and removed the patches

What patches!?

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