内に含ま
その他のドキュメント
サポート リソース
| PDF 文書ファイルをダウンロードする
Setting Up Name Services and Networks
7
- This chapter discusses how to set up the name service databases on Solstice HA systems. Use the following table to locate specific information in this chapter.
-
-
Note - The same network name service that is used throughout the site should be used for the Solstice HA systems.
7.1 Overview of Tasks
- When setting up the name service and networks for Solstice HA systems, several /etc files must be edited. Use the information gathered in Chapter 3, "Installation Planning," to update the files.
- The basic steps you will perform to update the name service and networks include:
-
- Updating your name service information throughout the network
- Updating the /etc name service files on each Solstice HA system to contain the private network host names
- Creating /.rhost files on each Solstice HA server
- Editing the /etc/syslog.conf file on each Solstice HA server
- Setting up the NIS name service for Solstice HA configurations is the same as for any other system on the network. Entries for all Solstice HA host names and all IP addresses (whether they are for physical or logical machines) should be made in the local /etc/inet/hosts file. Adding the Solstice HA host names and IP addresses adds an extra level of integrity.
-
Caution - Solstice HA configurations must not be set up as routers. The Solstice HA machines can only be clients of routers. Also, the Solstice HA servers cannot be set up as name servers because the NIS or NIS+ functionality does not failover to the other machine in the Solstice HA configuration.
- During installation, the primary network host name and IP address for each physical Solstice HA machine were entered into the /etc/inet/hosts file. If you have secondary host names and IP addresses for the physical Solstice HA machines these names and addresses must also be present in the /etc/inet/hosts file. hasetup will prompt for the needed information. hasetup will consult your network name service for the appropriate IP addresses before prompting for them.
- Because there may be multiple public network interfaces on each of the Solstice HA machines, you must decide which of the interfaces the logical machine will use. Ideally, the logical machines use all of the public interfaces. This implies that when adding the logical and physical IP addresses and host names to the name service, you must ensure that all entries are added to the appropriate host maps.
7.2 Updates To Name Service Entries
- If you are using a network name service you will find it convenient to add the entries for the logical and physical hosts (but not the private hosts) into your name service as well as the associated networks and netmasks entries. You can use standard administrative procedures to update your name service tables associated with /etc/inet/hosts, /etc/inet/networks, and /etc/inet/netmasks with the same information entered in the local /etc files.
- If you do not make the entries in the network name service, you may optionally create entries in the local /etc files on both hosts or hasetup will prompt for the information and make the entries automatically.
7.3 Automatic Changes to /etc/nsswitch.conf
- When you run the hasetup(1M) command as part of the Solstice HA installation (see Chapter 8, "Creating the Configuration"), the /etc/nsswitch.conf file on each of the Solstice HA server will be overwritten. The new /etc/nsswitch.conf file will be copied from the /etc/opt/SUNWhadf/hadf directory. For instance, if you are using NIS+ and DNS, the nsswitch.conf file is overwritten with the
-
nsswitch.files.nisplus_dns from that directory.
- The following example /etc/nsswitch.nis file shows the type of changes made by the Solstice HA software. The changes made to the example /etc/nsswitch.conf file include moving files in front of nis in every field except netgroup.
-
#ident "@(#)nsswitch.files_nis 1.1 95/05/18 SMI"
#
# /etc/nsswitch.files_nis:
#
# This file is installed as part of the SolsticeHA installation
# procedures. SolsticeHA requires that "files" are consulted
# first for most items.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet"
transports.
# the following two lines obviate the "+" entry in /etc/passwd
and /etc/group.
passwd: files nis
group: files nis
# always consult /etc "files" before consulting nis
hosts: files nis
networks: files nis
protocols: files nis
rpc: files nis
ethers: files nis
netmasks: files nis
bootparams: files nis
publickey: files nis
# At present there isn't a "files" backend for netgroup.
netgroup: nis
automount: files nis
aliases: files nis
services: files nis
sendmailvars: files
|
7.4 Updates to /etc Files
- To add IP addresses to the /etc name service, the /etc/inet/hosts file must be manually edited on each of the Solstice HA servers. Optionally, you can also edit the /etc/inet/networks file. You may also want to verify that the name service entries in the /etc/inet/netmasks are correct.
- The IP address and hostnames for the four private interfaces must be entered in the /etc/inet/hosts files on both Solstice HA servers. The IP address for the Solstice HA hosts were added during installation.
-
Note - Use either NIS or NIS+ name service for Solstice HA systems because of the support provided by administration tools that can propagate the information from one Solstice HA system to the other Solstice HA system.
- Follow these steps to add the host names and IP addresses. The changes must be made in the local /etc files and in the network name service.
-
-
Edit the /etc/inet/hosts file on each Solstice HA server. Add entries to the /etc/inet/hosts file on each server for the private Solstice HA interfaces. The following is an example /etc/inet/hosts file. Optionally, all physical and logical hosts may be added or deferred until you are running hasetup(1M).
-
# Internet host table
#
192.9.201 localhost
192.9.200 host1 loghost
# private links
204.152.64.1 host1-priv1
204.152.65.1 host1-priv2
204.152.64.2 host2-priv1
204.152.65.2 host2-priv2
|
-
-
(Optional) Make sure name service entries are correct.
The hasetup command will automatically edit the /etc/inet/netmasks file on each of the Solstice HA servers. If you have multiple networks and use non-default netmasks you should make sure that your netmasks name service or the local /etc file has the appropriate netmask.
-
#
# The netmasks file associates Internet Protocol (IP) address
# masks with IP network numbers.
#
# network-number netmask
#
# Both the network-number and the netmasks are specified in
# "decimal dot" notation, e.g:
#
# 192.9.200.0 255.255.255.0
#
192.9.200 255.255.255.0
192.0.0.0 255.0.0.0
192 255.0.0.0
192.9.200.0 255.255.255.0
192.9.200 255.255.255.0
204.152.64.0 255.255.255.0
204.152.64 255.255.255.0
204.152.65.0 255.255.255.0
204.152.65 255.255.255.0
|
-
-
(Optional) Edit the /etc/inet/networks file. Make sure there are entries for each physically attached network. The entries are made so a network name is displayed when the netstat(1M) command is run. These entries enable netstat(1M) to print the names of
- machines rather than the network numbers. The entries also make netstat run faster because it eliminates the need to query NIS or NIS+. The following is an example /etc/inet/networks file.
-
#ident "@(#)networks 1.4 92/07/14 SMI" /* SVr4.0 1.1 */
#
# The networks file associates Internet Protocol (IP) network
# numbers with network names. The format of this file is:
#
# network-name network-number nicnames . . .
#
#
# The loopback network is used only for intra-machine
communication
#
loopback 192
# Example Networks
#
example-net1 192.9.200.0
example-net2 192.9.201.0
priv-net1 204.152.64.0
priv-net2 204.152.65.0
...
|
7.5 Setting Up Private Networks
- On each of the Solstice HA servers, you must create two new files. These files are named /etc/hostname.be0 and /etc/hostname.be1, by default. The be[01] suffix corresponds to the private network names. These may be different on your system.
- Each file contains the private network host name associated with the connection. Following the example in Table 3-3 on page 3-7 the contents of the /etc/hostname.be0 on host1 would be host1-priv1 and the contents of the sibling server /etc/hostname.be1 would be host2-priv2.
- When all four files are created, you must either reboot the systems or run the following ifconfig(1M) commands on each host. For example:
-
# ifconfig be0 plumb
# ifconfig be0 ip_address netmask + broadcast + -trailers up
|
- The above commands must be run for both the be0 and be1 interfaces on each of the servers. Alternatively, you can reboot both Solstice HA servers.
7.6 Setting Up /.rhosts Files
- Both systems in the Solstice HA configuration must have entries for private network interfaces in their respective /.rhosts files.
- The reason for adding the entries to the /.rhosts files is to allow Solstice HA software to update configuration files on both physical hosts using the rcp(1) command.
- The following example /.rhosts file shows the entries required on each of the Solstice HA servers:
-
host1-priv1 root
host1-priv2 root
host2-priv1 root
host2-priv2 root
|
-
Note - In the above example, only root access is allowed between the two systems within the Solstice HA configuration.
7.7 Editing /etc/syslog.conf
- Add information to /etc/syslog.conf to enable Solstice HA error reporting. The following two lines should be added exactly as shown. Note that there are no spaces anywhere in the two lines.
-
Note - A single tab separates info and the /var/adm/messages path in the first entry. Also, a single tab separates info and /dev/console in the second entry. All the entries are comma separated. Do not use spaces.
-
local7.emerg,local7.alert,local7.crit,local7.warning,local7.not
ice,local7.info /var/adm/messages
local7.emerg,local7.alert,local7.crit,local7.warning,local7.not
ice,local7.info /dev/console
|
- The default version of the /etc/syslog.conf file delivered with Solaris 2.4 contains the string, *.err. If this entry has been removed, add an entry for local7.err to both the /var/adm/messages and /dev/console.
|
|