Ubuntu HPC DNS setup on master node

From Notes_Wiki

Home > Ubuntu > HPC setup with openpbs and openmpi > DNS setup on master node

The nodes in HPC cluster should resolve each other via both short name and FQDN. To help with host resolution centrally, we can setup DNS on master using:

  1. Install bind9 package using:
    apt -y install bind9
  2. Edit '/etc/bind/named.conf.options' to include:
            forwarders {
                    <primary-dns-ip>;
                    <secondary-dns-ip>;
            };
    
            dnssec-validation no;
            listen-on port 53 { any; };
            allow-query     { localhost; <private-hpc-subnet>; };
            recursion yes;
    
            //listen-on-v6 { any; };
  3. Edit '/etc/bind/named.conf.local' to include:
    zone "<private-zone>." IN {
            type master;
            file "<private-zone>.forward";
    };
  4. Create zone file '/var/cache/bind/<private-zone>.foward' Refer Configuring basic DNS service with bind for syntax
  5. Restart named and also enable it on boot using:
    systemctl restart named
    systemctl enable named
  6. Validate that settings are working using
    nslookup node<n>.<private-zone> 127.0.0.1
  7. Configure localhost as dns and appropriate domain search on master using:
    resolvectl domain <private-interface> <private-zone>
    resolvectl domain <public-interface> <private-zone>
    resolvectl dns <public-interface> 127.0.0.1
    resolvectl dns <private-interface> 127.0.0.1
  8. Test DNS and search domain settings by using:
    ping node<n>
  9. Resolvectl based settings don't persist after reboot. For persistent settings launch following as root user:
    sudo nm-connection-editor
    and change appropriate interface DNS and search settings using the editor.
  10. (Optionally) reboot and validate that DNS and domain settings are coming properly after reboot.

Home > Ubuntu > HPC setup with openpbs and openmpi > DNS setup on master node