HP Visualize c360 IRIX to HP-UX Migration Guide - Page 98

To Query BIND for Host Information After Querying NIS

Page 98 highlights

NIS To Bind an NIS Client to a Server on a Different Subnet Hewlett-Packard recommends that you configure a server on each subnet where you have NIS clients; however, if you cannot do that, follow these steps to force an NIS client to bind to a server on a different subnet: 1. Login as root to the NIS client. 2. Add the -ypset option to the YPBIND_OPTIONS variable in the /etc/rc.config.d/namesvrs file, as follows: YPBIND_OPTIONS="-ypset" 3. In the /etc/rc.config.d/namesvrs file, set the YPSET_ADDR variable to the IP address of an NIS server, as in the following example: YPSET_ADDR="15.13.115.168" 4. Issue the following commands to restart the NIS client: # /sbin/init.d/nis.client stop # /sbin/init.d/nis.client start If the server you specify in the ypset command is unavailable when your client boots up, your client will broadcast a request for a server to its local network. If no server exists on the local network, the client will hang. To Query BIND for Host Information After Querying NIS This section describes how to set up server-side hostname fallback, which causes your NIS servers to query BIND for host information after querying NIS. A server will search the NIS hosts database first, but if the hosts database does not contain the requested information, the server will query the BIND name service. The server will return the host information to the clients through NIS. 1. Configure your NIS servers as BIND name servers, or install an /etc/resolve.conf file on each server that allows it to query a BIND name server. 2. On the NIS master server, in the /var/yp/Makefile file, set the B variable to -b, as follows: B=-b 3. Issue the following command on the master server to change the modification time on /etc/hosts so that make will regenerate the hosts database: # /usr/bin/touch /etc/hosts 4. Issue the following commands to regenerate the NIS maps on the master server and push them to the NIS slave servers: # cd /var/yp # /usr/ccs/bin/make 5. On all the NIS servers in your domain, change the hosts line in the /etc/nsswitch.conf file to the following: hosts: nis [notfound=continue] dns files 93

  • 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

NIS
93
To Bind an NIS Client to a Server on a Different Subnet
Hewlett-Packard recommends that you configure a server on each subnet where you have NIS clients;
however, if you cannot do that, follow these steps to force an NIS client to bind to a server on a different
subnet:
1.
Login as
root
to the NIS client.
2.
Add the
-ypset
option to the
YPBIND_OPTIONS
variable in the
/etc/rc.config.d/namesvrs
file, as
follows:
YPBIND_OPTIONS="-ypset"
3.
In the
/etc/rc.config.d/namesvrs
file, set the
YPSET_ADDR
variable to the IP address of an NIS
server, as in the following example:
YPSET_ADDR="15.13.115.168"
4.
Issue the following commands to restart the NIS client:
# /sbin/init.d/nis.client stop
# /sbin/init.d/nis.client start
If the server you specify in the
ypset
command is unavailable when your client boots up, your client will
broadcast a request for a server to its local network. If no server exists on the local network, the client will
hang.
To Query BIND for Host Information After Querying NIS
This section describes how to set up server-side hostname fallback, which causes your NIS servers to query
BIND for host information after querying NIS. A server will search the NIS hosts database first, but if the
hosts database does not contain the requested information, the server will query the BIND name service.
The server will return the host information to the clients through NIS.
1.
Configure your NIS servers as BIND name servers, or install an
/etc/resolve.conf
file on each server
that allows it to query a BIND name server.
2.
On the NIS master server, in the
/var/yp/Makefile
file, set the
B
variable to
-b
, as follows:
B=-b
3.
Issue the following command on the master server to change the modification time on
/etc/hosts
so
that
make
will regenerate the hosts database:
# /usr/bin/touch /etc/hosts
4.
Issue the following commands to regenerate the NIS maps on the master server and push them to the
NIS slave servers:
# cd /var/yp
# /usr/ccs/bin/make
5.
On all the NIS servers in your domain, change the hosts line in the
/etc/nsswitch.conf
file to the
following:
hosts: nis [notfound=continue] dns files