How to resolve local hostnames



I have a few computers on my network that are getting their IPs via VyOS’s DHCP server. But I would like that also their hostnames would be resolved via VyOS.

How am I supposed to do that? Via DNS? DNS is only forwarding now to googles’ public DNS servers, so should I somehow add my entries there?

I have no idea how to achieve that, so please help me.

Thanks and best regatds,


What settings do you have for your DHCP server? Normally, you would assign your subnet router IP as the name server e.g., for you would use, that way you have local queries. I believe that if you are using windows machines, you should be able to resolve names just fine.


Hi mirias,

Thank you for promt response. My DHCP is like this:

dhcp-server {
	disabled false
	shared-network-name ETH1_LAN_POOL {
		authoritative enable
		subnet {
			lease 86400
			start {
			static-mapping somemachine {
				mac-address aa:bb:cc:dd:ee:ff

And well yeah Windows machines are resolving their and other samba machine’s hostnames just fine…
Some UX/Linux machines are not seeing each other via hostname as someone needs to resolve that for them.
What I would like to see is something like “nslookup hostname” to resolve that…
I believe I need to make some entries to VyOS’es DNS since all queries like that go trough it…

Currenty I am only forwarding that to Googles DNSs:

dns {
	forwarding {
		cache-size 2000
		listen-on eth1

but since there is “forwarding” I believe there must be some other option aswell… For kind of custom entries?

Thanks and BR,


I believe dnsmasq is used on the back end, so you should be able to consult the documentation for that.


There is a guide I found for adding a full dns service,, but some of it might be outdated. You could give it a try in a test lab environment and see if you can get it working.


Hi microlinux and mirias,

Yeah VyOS is betting on dnsmasq to do the job, so I should be able to get it working the way I want there, or I could go with adding full DNS service to my VyOS machine…
But I am kind of hoping, that I can do that in VyOS’es config file, since all the altering done on the OS level behind are gone when VyOS is updated. I like the idea of keeping all the settings in one config file… And I really don’t want to be doing all the OS changes every single time I update it. OK I could go with some scripts, but still - I’d like to avoid that if possible.
But you gave me an idea - if nothing else works, I’ll set up another dedicated VM for DNS. Already found some pretty usable containers with HubDNS, or I can set up my own bind9 or something…

Lets see about it… :slight_smile:

Thanks and best regards,



Found a perfect solution by llgomezg here: