Can't reach lede under new hostname

It seems like it's not publishing it's own hostname to the integrated DNS-Server. Is this intentional or might there be any problems?

I'm using a PC Engines APU2 with x86-64 build

Yes, tt should announce itself as a DNS on the DHCP, and publish it's own hostname on such DNS.

That's what I read too but unfortunately it's not doing it.
I can reach clients by their announced name but not the router itself. Not on the new name nor on the old one.

@NitroxydeX - try installing an mdns package like avahi-dbus-daemon. Then you should be able to reach your LEDE device as hostname.local (as per the mdns spec, where hostname is the name you have set in the system config)

Also, keep in mind that sometimes mdns can get a bit wonky. If it thinks there is already an mdns device with the same hostname, it will append a number so that it doesn't conflict (i.e. hostname-2.local). Sometimes this happens when you reboot the system as a result of the short, but non-zero persistence time of the mdns records on your network.

It should work with plain DNS, no need to use MDNS or similar.

If it does not work, I think you will have to debug the issue: enable logging in the DNS server at the router, and check that the clients are receiving and using the correct DNS, what requests is the DNS receiving, what is answering, ...

@eduperez I've already enable logging DNS requests to the syslog. So I knew that there is just no entry for it because it forwards the DNS-Request to my primary router and the primary is forwarding it to the DNS from my ISP.

everything declared inside "Hostnames" is correctly handled.

Your router should not forward queries for local names to an upstream server... in case it does not recognize the name of a local computer, it should answer negatively; only queries for non-local names should be forwarded upstream. I guess your router does not recognize it's own name as a local name, and perhaps this is the cause of the issue.

But what would be the way to fix it if there's no need for MDNS?


Also, are you sure your clients have your "secondary" router as their DNS server and not your "primary" router.

I am sure. Manual entries and discovered Hostnames from machines are reported back by LEDE to the Clients. It's just the hostname of the Lede Router that's not working.

Funny to see this post. I was trying to get this working on routers last week, but failed.

I admittedly do not understand this technically, but believe the hostname one sees in the System Overview is stored in the etc\config\system file. There are no values out of the box for the Networking=> Hostnames which is in the dhcp file. Populating this with a value linked to the router's IP also does not work in OpenWrt or LEDE when typing [hostname].local in a browser

I do have one of those new fangled GL.inet USB150 routers, and it does come populated with a value in the Networking=>Hostnames filed. (and a config domain section in the dhcp file). There also is a config odhcp section

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'

while I do not know what packages are relevant, the USB150 has one called dns-forwarder which seems relevant, but I do not see this in OpenWrt ot LEDE.

Seems like this should be default functionality and come configured.

What is the difference between the 2 "hostname" values?

Not sure if i'm contributing or babbling

After Hostname change restart dnsmasq
The Hostname should only contain Aa-zZ no emty space äöü etc dnsmaq / lede no IDN support by default
cat /tmp/hosts/dhcp.cfg* check the hostname for the router if there no entry please post your /etc/config/dhcp & system

odhcpd is primary for dhcpv6 and can do ipv4 to
etc/config/system local hostname & misc local system settings
etc/config/dhcp enty config domain domainname map to any custom IP useful for device with a static IP

Dnsmasq DNS read the entry form /tmp/hosts/* the local hostname for ipv4 & ipv6

If you post your relevant config files here ("/etc/config/system", "/etc/config/network", "/etc/config/dhcp"), we can have a look at them and try to guess what is going on.

config system
	option ttylogin '0'
	option log_size '64'
	option urandom_seed '0'
	option zonename 'Europe/Berlin'
	option timezone 'CET-1CEST,M3.5.0,M10.5.0/3'
	option log_proto 'udp'
	option conloglevel '8'
	option cronloglevel '8'
	option hostname 'router'

config timeserver 'ntp'
	option enabled '1'
	list server ''
	list server ''
	list server ''
	list server ''
	option enable_server '1'


config interface 'loopback'
	option ifname 'lo'
	option proto 'static'
	option ipaddr ''
	option netmask ''

config globals 'globals'
	option ula_prefix 'fdeb:5e1b:c2c2::/48'

config interface 'intern'
	option type 'bridge'
	option proto 'static'
	option ipaddr ''
	option netmask ''
	option _orig_ifname 'eth1 eth2 radio0.network1 radio0.network2 radio0.network3 radio0.network4'
	option _orig_bridge 'true'
	option ifname 'eth1'
	option ip6assign '64'

config interface 'wan'
	option ifname 'eth0'
	option proto 'dhcp'

config interface 'wan6'
	option ifname 'eth0'
	option proto 'dhcpv6'

config interface 'kunden'
	option type 'bridge'
	option proto 'static'
	option ifname 'eth2'
	option ipaddr ''
	option netmask ''
	option ip6assign '64'


config dnsmasq
	option localise_queries '1'
	option rebind_protection '1'
	option rebind_localhost '1'
	option expandhosts '1'
	option authoritative '1'
	option readethers '1'
	option leasefile '/tmp/dhcp.leases'
	option resolvfile '/tmp/'
	option domain 'ok'
	option nonwildcard '0'
	option local '/ok/'
	option add_local_hostname '1'
	option logqueries '1'
	option localservice '1'

config dhcp 'wan'
	option interface 'wan'
	option ignore '1'

config odhcpd 'odhcpd'
	option maindhcp '0'
	option leasefile '/tmp/hosts/odhcpd'
	option leasetrigger '/usr/sbin/odhcpd-update'

config dhcp 'kunden'
	option start '100'
	option leasetime '12h'
	option limit '150'
	option interface 'kunden'
	option ra 'server'
	option dhcpv6 'relay'

config dhcp 'intern'
	option start '100'
	option leasetime '12h'
	option interface 'intern'
	option limit '240'
	option ra 'server'
	option dhcpv6 'relay'
	option ra_default '1'

here are the configs

change option local '/ok/' to intern
for "kunden" interface use dhcp config domain option

You changed lan to intern don´t forget update firewall interface names and zone name.

ah well. It seems like I got that local server option wrong. I thought it has to be the same name like the local domain option.

firewall and zone name got updated.

is the domain option needed since it's specified global?

Still router seems to have no entry anywhere. Even a ping on the router itself says bad address(while ping 6 is replied by my main router). Could this be a problem due to the fact it has two different interfaces and different IP-Ranges?

You should put better use it with domain option ok is ok :slight_smile: without can break same Software relay on use reserve DNS etc.

EDIT: Restart network dnsmasq firewall or just reboot

changing /ok/ to /intern/ isn't correct. It's not even replying with manual specified hostnames now. Changing it back works again.

oh then sorry i get this wrong i tested it just and this is dnsmaq --server -S option

than i think now firewall issues or a bug with two bridge interface
but with option dhcp config domain router should work in any case

Will try it later but that still doesn't explain with the router itself isn't able to find itself.