Flint 2 - Can I have different domain per VLAN?

Hello,
I have some 6-7 VLANs on top of VLAN 1.
I have the need to define different subdomains for 3 of these VLANs, let’s say sub1.lan sub2.lan and sub3.lan.
DNS for the lan is managed outside of Flint 2. However, I want the router to be the DNS authoritative server for the sub-domains. I also want to have automatic DHCP leases for the clients on these subdomains.

Is this possible?

I think you want to setup a manual dns on the gl ui.

As far how the domains go this depends which version of luci you are using, modern luci have a way to manage dns records, you want a A record.

Otherwise you need to use this via ssh directly on the dhcp config for a domain:

config domain
        option name 'seerr.lan'
        option ip '10.245.245.53'

If it still does not work and you see a 'dns probe possible' it means the authority of the lan domain clashes with upstream you may have to delete the /lan/ entry in the luci settings, the one with the / trailing GL-iNet uses a longer naming.

1 Like

Hi,

Assume the local domain for the Main network is .lan, and the local domain for the Guest network is .guest.

The reference steps are as follows:

  1. SSH into the router and manually edit /etc/dnsmasq.conf to add local domain access:

    domain=lan,192.168.8.0/24
    domain=guest,192.168.9.0/24
    
  2. Go to LuCI → Network → Interfaces → Interfaces, edit the LAN and Guest networks, and add the following DHCP options respectively:

Test results:

Actually this is not what I am asking for!

In any case, the answer is yes I can have a different domain per VLAN. However, I didn’t see any option to do this via the GUI. One has to:

  1. Edit the main dnsmasq configuration file to allow per-VLAN domains

    Don’t forget to add the file in the reserve list!

  2. Edit the DHCP configuration for the VLAN

If anyone is interest I can send samples.