Double DHCP + DNS + GATEWAY settings

Hello, I’m trying to configure a Mikrotik RB1100AHx2 for the following scenario:

  1. 2 LAN and 2 WAN
  2. LAN1 must use WAN1 to go outside, LAN2 must use WAN2. Source addresses must be masqueraded. WANs can’t be interchanged nor balanced.
  3. 2 DHCP servers (1 per LAN).
  4. Add DHCP leases to DNS for local resolution (each LAN has its own subdomain, ie. LAN1.MAINDOMAIN.COM and LAN2.MAINDOMAIN.COM).
  5. External NS resolutions must be forwarded to the providers DNS, which is different for each WAN.

I think I have successfully configured the router for 1 and 2 using iptables mangling and marking rules.

However, I don’t know how to do 3-5. I thought of running virtual instances of OpenWRT but I don’t seem to be able to run OpenWRT on this router and I’d rather do it natively if it’s possible.

well setting up LANS is pretty straight
foward after one has done it 15 or so times. :wink:

you will need to define
ip address
ip-pool
DHCP Server
DHCP Network

Setting up the LANs and routing each one to their own WAN is straight forward, yes. But forwarding DNS requests to different upstream DNS servers is not that easy because I need local resolution of DHCP-leased hostnames with two subdomains (one per LAN).