Hostnames (service?)

Hi,
which service is responsible for a management of Hostnames of ip hosts on LAN? I can see hostnames on LAN but pc connected to lan via openvpn server running on openwrt is not able to see / translate any hostname.

Thank you

As I am new to OpenWRT, I can't be 100% certain (zero installs to date). though, DNS is what resolves hostnames to IP addresses. If the Router is your first source for DNS, the Hostnames should resolve for all devices given DHCP IP addresses. If you are using outside DNS for resolution, You could add an entry in the hosts file on the PC.

i heard there is other service for that MDNS, not sure if openwrt can run that.

Dnsmasq

You must use the router's Dnsmasq resolver in order to resolve hostnames obtained via its DHCP requests.

3 Likes

Technically, the host itself decides its own name. It might take a "suggestion" from DHCP, or might provide a suggestion to DHCP, but there is nothing in DCHP that requires there to be a mapping between IP address and host name, nor that the host accept any suggestion from the DHCP server.

DHCP, which is typically supplied by dnsmasq under OpenWrt.

Host names are typically mapped to IP addresses by DNS. IP addresses can be mapped to a single host name by "reverse" DNS.

On a typical OpenWrt install, DNS is also managed by dnsmasq.

With DNS and DHCP tightly coupled in dnsmasq it provides "convenience" DNS based on the DHCP leases it provides.

Note that static IP addresses never "touch" DHCP, so manual configuration of DNS would be required for either "normal" or reverse DNS for those hosts.

4 Likes

https://openwrt.org/docs/guide-user/network/zeroconfig/zeroconf
But you shouldn't use it for routed VPN.

You need to use OpenWrt DNS-server exclusively.

1 Like

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