HP Visualize J210XC IRIX to HP-UX Migration Guide - Page 82

Configuring the Name Service Switch

Page 82 highlights

Domain Name Service Configuring the Name Service Switch The Name Service Switch determines where your system will look for the information that is 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, the local /etc file, or both, in any order. For host information, you can configure your system to use BIND (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. NOTE: Configuring the Name Service Switch is a separate task from configuring the name services themselves. You must also configure the name services before you can use them. The Name Service Switch just determines which name services are queried and in what order. You can use SAM to configure the Name Service Switch. The following are some suggestions for customizing your Name Service Switch configuration: • If you want your system to consult the local /etc/netgroup file when it fails to find a netgroup in the NIS netgroup database, create or modify the netgroup line in the /etc/nsswitch.conf file as follows: netgroup: nis [NOTFOUND=continue] files • If you want your system to consult BIND (DNS) when it fails to find a host name in NIS, create or modify the hosts line in the /etc/nsswitch.conf file as follows: hosts: nis [NOTFOUND=continue] dns files • With this configuration, if NIS does not contain the requested information, and BIND is not configured, the /etc/hosts file is consulted. • If you want your system to consult NIS if it fails to find a host name in BIND or if the BIND name servers are not responding, create or modify the hosts line in the /etc/nsswitch.conf file as follows: hosts: dns [NOTFOUND=continue TRYAGAIN=continue] nis files With this configuration, if BIND does not return the requested information, and NIS is not running, the /etc/hosts file is consulted. HP recommends that you maintain at least a minimal /etc/hosts file that includes important addresses like gateways, diskless boot servers and root servers, and your host's own IP address. HP also recommends that you include the word "files" in the hosts line to help ensure a successful system boot using the /etc/hosts file when BIND and NIS are not available. CAUTION: Changing the default configuration can complicate troubleshooting. The default configuration is designed to preserve the authority of the name service you are using. It switches from BIND to NIS only if BIND is not enabled. It switches from NIS to the local /etc file only if NIS is not enabled. It is very difficult to diagnose problems when multiple name servers are configured and enabled for use. 77

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
  • 32
  • 33
  • 34
  • 35
  • 36
  • 37
  • 38
  • 39
  • 40
  • 41
  • 42
  • 43
  • 44
  • 45
  • 46
  • 47
  • 48
  • 49
  • 50
  • 51
  • 52
  • 53
  • 54
  • 55
  • 56
  • 57
  • 58
  • 59
  • 60
  • 61
  • 62
  • 63
  • 64
  • 65
  • 66
  • 67
  • 68
  • 69
  • 70
  • 71
  • 72
  • 73
  • 74
  • 75
  • 76
  • 77
  • 78
  • 79
  • 80
  • 81
  • 82
  • 83
  • 84
  • 85
  • 86
  • 87
  • 88
  • 89
  • 90
  • 91
  • 92
  • 93
  • 94
  • 95
  • 96
  • 97
  • 98
  • 99
  • 100
  • 101
  • 102
  • 103
  • 104
  • 105
  • 106
  • 107
  • 108
  • 109
  • 110
  • 111
  • 112
  • 113
  • 114
  • 115
  • 116
  • 117
  • 118
  • 119
  • 120
  • 121
  • 122
  • 123
  • 124
  • 125

Domain Name Service
77
Configuring the Name Service Switch
The Name Service Switch determines where your system will look for the information that is 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, the local
/etc
file, or both, in any order. For host information, you can configure your system to use BIND (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.
NOTE: Configuring the Name Service Switch is a separate task from configuring the name services
themselves. You must also configure the name services before you can use them. The Name Service Switch
just determines which name services are queried and in what order. You can use SAM to configure the
Name Service Switch.
The following are some suggestions for customizing your Name Service Switch configuration:
If you want your system to consult the local
/etc/netgroup
file when it fails to find a netgroup in the
NIS netgroup database, create or modify the netgroup line in the
/etc/nsswitch.conf
file as follows:
netgroup: nis [NOTFOUND=continue] files
If you want your system to consult BIND (DNS) when it fails to find a host name in NIS, create or
modify the hosts line in the
/etc/nsswitch.conf
file as follows:
hosts: nis [NOTFOUND=continue] dns files
With this configuration, if NIS does not contain the requested information, and BIND is not
configured, the
/etc/hosts
file is consulted.
If you want your system to consult NIS if it fails to find a host name in BIND or if the BIND name
servers are not responding, create or modify the hosts line in the
/etc/nsswitch.conf
file as follows:
hosts: dns [NOTFOUND=continue TRYAGAIN=continue] nis files
With this configuration, if BIND does not return the requested information, and NIS is not running, the
/etc/hosts
file is consulted.
HP recommends that you maintain at least a minimal
/etc/hosts
file that includes important addresses like
gateways, diskless boot servers and root servers, and your host±s own IP address. HP also recommends that
you include the word ²files³ in the hosts line to help ensure a successful system boot using the
/etc/hosts
file when BIND and NIS are not available.
CAUTION: Changing the default configuration can complicate troubleshooting. The default configuration
is designed to preserve the authority of the name service you are using. It switches from
BIND to NIS only
if BIND is not enabled. It switches from NIS to the local
/etc
file only if NIS is not enabled. It is very
difficult to diagnose problems when multiple name servers are configured and enabled for use.