Skip to main content

Configuring the name service switch table for host-name resolution

You must configure the name service switch table correctly to enable ONTAP to consult local or external name service to retrieve host information.

Before you begin

You must have decided which name service to use for host mapping in your environment.
  1. Add the necessary entries to the name service switch table: vserver services name-service ns-switch create -vserver vserver_name -database database_name -source source_names
  2. Verify that the name service switch table contains the expected entries in the desired order: vserver services name-service ns-switch show -vserver vserver_name

The following example creates an entry in the name service switch table for SVM vs1 to first use the local hosts file and then an external DNS server to resolve host names:

cluster-1::> vserver services name-service ns-switch create -vserver vs1 -database hosts -sources files,dns