Skip to main content

Modify DNS configuration for single grid node

Contributors netapp-lhalbert netapp-madkat

Rather than configure the DNS globally for the entire deployment, you can run a script to configure DNS differently for each grid node.

In general, you should use the MAINTENANCE > Network > DNS servers option on the Grid Manager to configure DNS servers. Only use the following script if you need to use different DNS servers for different grid nodes.

  1. Log in to the primary Admin Node:

    1. Enter the following command: ssh admin@primary_Admin_Node_IP

    2. Enter the password listed in the Passwords.txt file.

    3. Enter the following command to switch to root: su -

    4. Enter the password listed in the Passwords.txt file.

      When you are logged in as root, the prompt changes from $ to #.

    5. Add the SSH private key to the SSH agent. Enter: ssh-add

    6. Enter the SSH Access Password listed in the Passwords.txt file.

  2. Log in to the node you want to update with a custom DNS configuration: ssh node_IP_address

  3. Run the DNS setup script: setup_resolv.rb.

    The script responds with the list of supported commands.

    Tool to modify external name servers
    available commands:
      add search <domain>
                   add a specified domain to search list
                   e.g.> add search
      remove search <domain>
                   remove a specified domain from list
                   e.g.> remove search
      add nameserver <ip>
                   add a specified IP address to the name server list
                   e.g.> add nameserver
      remove nameserver <ip>
                   remove a specified IP address from list
                   e.g.> remove nameserver
      remove nameserver all
                   remove all nameservers from list
      save         write configuration to disk and quit
      abort        quit without saving changes
      help         display this help message
    Current list of name servers:
    Name servers inherited from global DNS configuration:
    Current list of search entries:
    Enter command [`add search <domain>|remove search <domain>|add nameserver <ip>`]
                  [`remove nameserver <ip>|remove nameserver all|save|abort|help`]
  4. Add the IPv4 address of a server that provides domain name service for your network: add <nameserver IP_address>

  5. Repeat the add nameserver command to add name servers.

  6. Follow instructions as prompted for other commands.

  7. Save your changes and exit the application: save

  8. Close the command shell on the server: exit

  9. For each grid node, repeat the steps from logging into the node through closing the command shell.

  10. When you no longer require passwordless access to other servers, remove the private key from the SSH agent. Enter: ssh-add -D