Skip to main content

Configuring DNS services for the SVM

You must configure DNS services for the SVM before creating an NFS or CIFS server. Generally, the DNS name servers are the Active Directory-integrated DNS servers for the domain that the NFS or CIFS server will join.

About this task

Active Directory-integrated DNS servers contain the service location records (SRV) for the domain LDAP and domain controller servers. If the SVM cannot find the Active Directory LDAP servers and domain controllers, NFS or CIFS server setup fails.

SVMs use the hosts name services ns-switch database to determine which name services to use and in which order when looking up information about hosts. The two supported name services for the hosts database are files and dns .

You must ensure that dns is one of the sources before you create the CIFS server.

Note
To view the statistics for DNS name services for the mgwd process and SecD process, use the Statistics UI.
  1. Determine what the current configuration is for the hosts name services database.

    Example

    In this example, the hosts name service database uses the default settings.

    vserver services name-service ns-switch show -vserver vs1 -database hosts
                         Vserver: vs1
    Name Service Switch Database: hosts
    Name Service Source Order: files, dns

  2. Perform the following actions, if required.
    1. Add the DNS name service to the hosts name service database in the desired order, or reorder the sources.

      Example

      In this example, the hosts database is configured to use DNS and local files in that order.

      vserver services name-service ns-switch modify -vserver vs1 -database hosts -sources dns,files
    2. Verify that the name services configuration is correct.

      Example

      vserver services name-service ns-switch show -vserver vs1 -database hosts
                           Vserver: vs1
      Name Service Switch Database: hosts
      Name Service Source Order: dns, files

  3. Configure DNS services.

    Example

    vserver services name-service dns create -vserver vs1 -domains example.com,example2.com -name-servers 10.0.0.50,10.0.0.51

    Note
    Starting in ONTAP 9.4, the vserver services name-service dns create command performs an automatic configuration validation and reports an error message if ONTAP is unable to contact the name server.
  4. Verify that the DNS configuration is correct and that the service is enabled.

    Example

                    Vserver: vs1
    Domains: example.com, example2.com
    Name Servers: 10.0.0.50, 10.0.0.51
    Enable/Disable DNS: enabled
    Timeout (secs): 2
    Maximum Attempts: 1

  5. Validate the status of the name servers.

    Example

    cluster-1::> vserver services name-service dns check -vserver vs1
    Vserver    Name Server     Status       Status Details
    -------- ------------- ---------- --------------------------
    vs1 10.0.0.50 up Response time (msec): 2
    vs1 10.0.0.51 up Response time (msec): 2

    The name service check command is available starting in ONTAP 9.4.