Data ONTAP uses the /etc/hosts file to resolve host names to IP addresses, including host names used in any of the following files:
You must ensure that the /etc/hosts file is kept up-to-date. If you update the file, you do not need to reboot the filer--the changes to the file take effect immediately.
When Data ONTAP is first installed, the /etc/hosts file is automatically created with default entries for the following interfaces:
Note
The /etc/hosts file resolves the host names for the filer it is configured on. This file cannot be used by other systems for name resolution.
For more information on file format, see the NetApp hosts(5) manual page.
You can add IP address and hostname entries in the /etc/hosts file in the following two ways:
You might want to add entries to the local /etc/hosts file if the number of entries is small. You can do so
See Editing the /etc/hosts file manually.
If the number of entries is large and you have access to an NIS makefile master, you might want to use the makefile master to create the /etc/hosts file. This method prevents errors that could be introduced in the manual creation process. For details, see Creating /etc/hosts from the NIS master.
Note
Using NIS to distribute the /etc/hosts file is different from looking up host names on an NIS server. For more information about network lookups, see Using NIS to maintain host information.
To edit the /etc/hosts file manually, complete the following steps.
| 1 | From a workstation that has access to the filer's root volume, open the /etc/hosts file using a text editor. |
| 2 | Edit the file to your needs. The format of the file is as follows: |
| 3 |
The following shows how the entries might look in the /etc/hosts file on a filer:
192.16.3.145 toaster toaster-e0
192.16.4.155 toaster-e2
192.16.5.165 toaster-e4
192.16.6.175 toaster-e8
In the first line, the filer host name itself is used as an alias for the first network interface. That is, network traffic addressed to toaster will be received on the toaster-e0 interface.
To edit the /etc/hosts file with FilerView, complete the following steps.
| 1 | |
| 2 | |
| 3 | |
| 4 | Complete the fields in the Create a New /etc/hosts Line window for each host you wish to add and click OK. |
| 5 |
To modify the makefile for the NIS master to create a hosts file and copy it to the /etc directory on the filer's default volume, complete the following steps.
Copyright © 1994-2003, Network Appliance, Inc. All rights
reserved.
Part No. 210-00474
File: dns3.htm
Last updated: 11/17/03 15:56:23