Community discussions

MikroTik App
 
User avatar
k6ccc
Forum Guru
Forum Guru
Topic Author
Posts: 1497
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Alternate DNS for one domain

Sun Aug 25, 2019 9:27 am

Here is my situation. I have an RB-750Gr3 that has a WAN connection from my cable provider which provides DHCP and DNS services to the router. Ports 2, 3, & 5 are various LANs, and port 4 is a trunked port with several more VLANS. The trunked port connects to a managed switch where VLAN 5 (among others) is stripped out and connects to a large non-internet connected LAN that uses a specific domain and the first node will provide DHCP and DNS services for that domain - in this case it's: local.mesh

All devices on the various LANs (except VLAN 5) are receiving DHCP address and DNS service from the RB-750. The RB-750 receives a DHCP address from the first AREDN node,. So what I'm trying to accomplish is that when devices on the various LANs do a DNS query for some node on the local.mesh domain, the RB-750 will look at the first AREDN node to resolve the DNS query, but for any other address, the RB-750 will look at the the internet (via the cable modem) to resolve the DNS lookup.

I can easily create a static DNS entry for one specific device on the local.mesh network, but I need to have all DNS queries for SomeDevice.local.mesh use the first AREDN node for DNS resolution. Below are a couple of code segments and a drawing. How can I accomplish this?
/interface vlan
add comment="AREDN LAN" interface=E4-p8_802.1Q name=VLAN_005 vlan-id=5 

/ip dhcp-client
add comment=defconf dhcp-options=hostname,clientid disabled=no interface=\
    E1-p2_Cable_Internet
add add-default-route=no dhcp-options=hostname,clientid disabled=no \
    interface=VLAN_005 use-peer-ntp=no 

/ip dns
set allow-remote-requests=yes servers=8.8.8.8,4.2.2.1
/ip dns static
add address=192.168.101.251 name=router

Image
 
pe1chl
Forum Guru
Forum Guru
Posts: 10234
Joined: Mon Jun 08, 2015 12:09 pm

Re: Alternate DNS for one domain

Sun Aug 25, 2019 12:51 pm

RouterOS does not support this method of working. It has been requested many times but it has not been implemented.
(what you need is the capability to set a static DNS record for local.mesh with type NS and pointing to the nameserver for that domain)

As RouterOS also does not offer a feature to run user code in some jail (also requested many times...) so you could run some other DNS resolver,
your only option is to add e.g. a Raspberry Pi and run one of the many standard DNS server/resolvers (e.g. bind9) on that.
 
Sob
Forum Guru
Forum Guru
Posts: 9121
Joined: Mon Apr 20, 2009 9:11 pm

Re: Alternate DNS for one domain

Sun Aug 25, 2019 7:22 pm

Here's some reading for you: viewtopic.php?f=2&t=133767
 
User avatar
k6ccc
Forum Guru
Forum Guru
Topic Author
Posts: 1497
Joined: Fri May 13, 2016 12:01 am
Location: Glendora, CA, USA (near Los Angeles)
Contact:

Re: Alternate DNS for one domain

Sun Aug 25, 2019 10:27 pm

RouterOS does not support this method of working. It has been requested many times but it has not been implemented.
(what you need is the capability to set a static DNS record for local.mesh with type NS and pointing to the nameserver for that domain)

That is exactly correct.

As RouterOS also does not offer a feature to run user code in some jail (also requested many times...) so you could run some other DNS resolver,
your only option is to add e.g. a Raspberry Pi and run one of the many standard DNS server/resolvers (e.g. bind9) on that.

Well slap me silly. While laying in bed after I posted this, it dawned on me that of my many LANs at home, there is ONE that does not use the router as the DNS provider - and that was the LAN that I really want to be able to use to access the local.mesh network. My primary home LAN does not use the router for DNS, but rather my Domain Controller which is running Windows Server 2012 r2. And that DOES know how to do what I wanted to do. Took only a couple of minutes this morning to make it work.

Here's some reading for you: viewtopic.php?f=2&t=133767

The original poster of that thread is trying to accomplish exactly the same thing that I am and to the same alternate network.
 
pe1chl
Forum Guru
Forum Guru
Posts: 10234
Joined: Mon Jun 08, 2015 12:09 pm

Re: Alternate DNS for one domain

Sun Aug 25, 2019 10:35 pm

Are there still (political?) reasons not to migrate that network to the ampr.org net-44 space?
At least there you have DNS servers that are on internet...
This is the network that we use over here. I briefly studied the mesh network and I understood that while it initially did not
support net-44 because of hardwired address settings in RFC1918 space, the later versions have some support for it.

Who is online

Users browsing this forum: No registered users and 42 guests