HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 63
Editing the /etc/hosts File, The Name Service Switch
View all HP Visualize J210XC manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 63 highlights
Configuring TCP/IP Editing the /etc/hosts File You can use any text editor to edit the /etc/hosts file. If you are not running BIND or NIS, you can use SAM. SAM also configures /etc/hosts when adding a new LAN card. To use SAM: 1. Start SAM # sam 2. Select Networking and Communications. 3. Select Internet Addresses. 4. Select Actions->Add . . . 5. Fill in the Remote System Name and Internet Address fields on the menu and select Apply. The Name Service Switch The Name Service Switch determines where your system looks for the information traditionally stored in the following files: /etc/hosts /etc/protocols /etc/services /etc/networks /etc/netgroup /etc/rpc For all types of information except host information, you can configure your system to use NIS (one of the NFS Services), the local /etc file, or both, in any order. For host information, you can configure your system to use Berkeley Internet Name Domain (BIND) (Berkeley's implementation of DNS), NIS, the /etc/hosts file, or any combination of the three, in any order. The default Name Service Switch configuration is adequate for most installations, so you probably do not have to change it. On HP-UX workstations properly setting the nsswitch.conf file can be critical to booting the system after it has been moved to a new subnet or if the DNS and.or NIS servers are unavailable for whatever reason. The simplest way to create a useful nsswitch.conf file is to copy the existing file /etc/nsswitch.conf_hp_defaults to /etc/nsswitch.conf. Edit the resulting file so that when the system does name resolution it first looks at the files entry followed by DNS and NIS. An example nsswitch.conf file from an existing system is: # # /etc/nsswitch.hp_defaults: # # An example file that could be copied over to /etc/nsswitch.conf; it # uses NIS (YP) in conjunction with files. # passwd: compat group: compat hosts: files [NOTFOUND=continue] dns [NOTFOUND=return] nis [NOTFOUND = return] networks: nis [NOTFOUND=return] files protocols: nis [NOTFOUND=return] files rpc: nis [NOTFOUND=return] files publickey: nis [NOTFOUND=return] files 58