DHCP Server & DNS Resolver for Unselected Interface

  • Here's what I'm trying to do;
    On VLAN1, have DHCP clients use DNS Resolver for resolving DNS queries - success!
    On VLAN2, have DHCP clients use System DNS servers for resolving DNS queries - failure!

    DNS Resolver is enabled, and VLAN1 is selected in the Network Interfaces.  VLAN 2 is not selected.

    DHCP Server is enabled for both VLAN1 & VLAN2.  DNS server fields are blank in both.
    "Leave blank to use the system default DNS servers: this interface's IP if DNS Forwarder or Resolver is enabled, otherwise the servers configured on the System / General Setup page."

    My limited understanding is that DNS Resolver should not be "enabled" for VLAN2 if the Interface is not selected in the DNS Resolver configuration.  Thus, clients on VLAN2 should be using the servers configured in the System / General Setup page.  However, clients are instead receiving the local interface IP address as their DNS Server, and are failing (DNS Resolver operating as expected).  Thus, it appears the DHCP server is not operating as expected in terms of "should be" handing the System DNS servers to clients on VLAN2 when that interface is not selected/enabled in DNS Resolver.

    Can the members help me understand if I'm missing something, or if the DHCP server uses the Global DNS Resolver Enabled setting rather than the individual Interface selection setting?  Is this an improvement opportunity / feature request?

    PS - I know I can manually specify the DNS servers in the DHCP options for VLAN2 and achieve success.  I'm deliberately trying to pass the System DNS to see what would happen if I didn't configure the DNS servers in the DHCP options on a VLAN, and didn't select that VLAN's Interface in DNS Resolver.

  • LAYER 8 Global Moderator

    What that means if your not running either forwarder or resolver then clients would get what you setup in the system.. IF your running forwarder or resolver.. Then your dhcp clients would point to pfsense for dns and use either the resolver or forwarder whichever which one your using.

  • Thanks @johnpoz - so that means that the DHCP server uses the Global "Enable DNS Resolver" or "Enable DNS Forwarder" rather than the individual Interface selection within those services.  Thus, the only way to pass the System DNS servers to clients when running DNS Resolver (or Forwarder) is to manually specify them in the DHCP Server options for the interface that you don't want to use DNS Resolver (or Forwarder) on.