Community discussions

 
xrlls
just joined
Topic Author
Posts: 3
Joined: Sun Jan 13, 2019 4:43 pm

Resolving local DHCP hosts using DNS

Sun Jan 13, 2019 5:07 pm

Hi,

I am trying to make a setup where hosts on the LAN, configured using DHCP can be looked up using the hostname.

I have similar setups on other brands, such as Ubiquiti USG, Edgerouter and Asuswrt, all based on dnsmasq, where it is straight forward to setup.

On these systems I can specify a domain name for the LAN. When a host get a DHCP lease, the router creates a DNS entry in the form [host name].xxx.yyy.zz, where xxx.yyy.zz is the domain I have specified. This allows me to reach all my hosts using a FQDN based on their hostname.

Meanwhile it seems that Routeros does not do this, even if I specify a domain in dhcp settings.

I have tried doing dns lookups on my local router which returns nothing, and simliarly doing reverse dns lookups on IP addresses assigned to hosts in the network, similarly with no results.

I have seen other post suggesting using static IP addresses, and adding static DNS entries for each host, but it seems like a lot of bookkeeping for something that is running automatically on other systems.

If anyone has this working I would be very thankful for a hint! :)

Bset regards,
Crilles
 
xrlls
just joined
Topic Author
Posts: 3
Joined: Sun Jan 13, 2019 4:43 pm

Re: Resolving local DHCP hosts using DNS

Mon Jan 14, 2019 5:10 pm

I ended up adopting the script from here:
viewtopic.php?t=119469

While I will still prefer a "native" solution, rather than something bolted on.

Br. Crilles
 
User avatar
sebastia
Forum Veteran
Forum Veteran
Posts: 914
Joined: Tue Oct 12, 2010 3:23 am
Location: Antwerp, BE

Re: Resolving local DHCP hosts using DNS

Mon Jan 14, 2019 5:21 pm

Why not copy the relevant commands from that script into the dhcp server script, executed on assignment?
see lease-script https://wiki.mikrotik.com/wiki/Manual:I ... er#General

Who is online

Users browsing this forum: 4lphanumeric and 48 guests