ONTAP 9 Manuals ( CA08871-402 )

Enable DNS for host-name resolution

You can use the vserver services name-service dns command to enable DNS on an SVM, and configure it to use DNS for host-name resolution. Host names are resolved using external DNS servers.

Before you begin

A site-wide DNS server must be available for host name lookups.

You should configure more than one DNS server to avoid a single-point-of-failure. The vserver services name-service dns create command issues a warning if you enter only one DNS server name.

About this task

The Network Management Guide contains information about configuring dynamic DNS on the SVM.

Steps
  1. Enable DNS on the SVM: vserver services name-service dns create -vserver vserver_name -domains domain_name -name-servers ip_addresses -state enabled

    The following command enables external DNS server servers on the SVM vs1:

    vserver services name-service dns create -vserver vs1.example.com -domains example.com -name-servers 192.0.2.201,192.0.2.202 -state enabled

    The vserver services name-service dns create command performs an automatic configuration validation and reports an error message if ONTAP cannot contact the name server.

  2. Display the DNS domain configurations by using the vserver services name-service dns show command.

    The following command displays the DNS configurations for all SVMs in the cluster:

    vserver services name-service dns show
                                                 Name
    Vserver           State     Domains             Servers
    ----------------- --------- ------------------- -------------
    cluster1          enabled   example.com         192.0.2.201,
                                                    192.0.2.202
    vs1.example.com   enabled   example.com         192.0.2.201,
                                                    192.0.2.202

    The following command displays detailed DNS configuration information for SVM vs1:

    vserver services name-service dns show -vserver vs1.example.com
                   Vserver: vs1.example.com
                   Domains: example.com
              Name Servers: 192.0.2.201, 192.0.2.202
        Enable/Disable DNS: enabled
            Timeout (secs): 2
          Maximum Attempts: 1
  3. Validate the status of the name servers by using the vserver services name-service dns check command.

    The vserver services name-service dns check command is available.

    vserver services name-service dns check -vserver vs1.example.com
    
    Vserver           Name Server     Status       Status Details
    ----------------  -------------   ----------   --------------------------
    vs1.example.com   10.0.0.50         up         Response time (msec): 2
    vs1.example.com   10.0.0.51         up         Response time (msec): 2
Top of Page