DHCP + DNS + Subdomain

Started by thisboyiscrazy, April 08, 2019, 05:57:12 PM

Previous topic - Next topic
My opnsense is on 2 vlans, VLAN1 and VLAN2. VLAN1's domain is o.domain.com (default), VLAN2's domain is m.domain.com

opnsense is the DHCP server for VLAN2 (m.domain.com)

How do I get the DHCP to register the hostname with the correct subdomain. e.g. host is host1 I need host1.m.domain.com to be registered.

If I set the hostname of a client to host1 I get host1.o.domain.com. If I set the hostname of the client to host1.m.domain.com I get host1.m.domain.com.o.domain.com. I need host1.m.domain.com

Thanks.

From my understanding all DHCP leases will be assigned to the same domain. Which is either the default system domain found in System -> Settings -> General -> Domain, or you can override in Unbound via Services -> Unbound -> General -> DHCP Domain Override.

Maybe set system domain to domain.com and the hostsnames to host1.o or host1.m? This way system will set as
host1.o.domain.com
host1.m.domain.com

Or you can try to manually set domain overrides using Services -> Unbound DNS -> Overrides.

Is this a trick question? There is a domain option right there in DHCP.