NIS slave unable to copy the data bases

Hi,

I'm learning for my Solaris 10 sys-admin part 2. I'm now trying to get nis working because for the exercise. I run in to a problem.

Setup:
Three Systems
solaris101 (client)
Nothing wrong here havent made any config changes yet.

solaris102 (master server)

Interfaces

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.6 netmask ffffff00 broadcast 192.168.1.255
        ether 0:c:29:17:ee:db
e1000g1: flags=1004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4> mtu 1500 index 3
        inet 192.168.2.10 netmask ffffff00 broadcast 192.168.2.255
        ether 0:c:29:17:ee:e5

notice that e1000g1 is setup with dhcp.

Hosts

bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.5     solaris101
192.168.1.7     solaris103      loghost
192.168.2.10    solaris102      # Added by DHCP
bash-3.00#

routing table

bash-3.00# netstat -rn
Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
default              192.168.2.1          UG        1          0 e1000g1
192.168.1.0          192.168.1.6          U         1          7 e1000g0
192.168.2.0          192.168.2.10         U         1         24 e1000g1
224.0.0.0            192.168.2.10         U         1          0 e1000g1
127.0.0.1            127.0.0.1            UH        3        118 lo0

Ok, so the NIS master server was installed succesfully.

solaris103 (slave server)

Interface

bash-3.00# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.1.7 netmask ffffff00 broadcast 192.168.1.255
        ether 0:c:29:d7:de:2f

Hosts

bash-3.00# cat /etc/hosts
#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.7     solaris103      loghost
192.168.1.6     solaris102
192.168.1.5     solaris101

routing

bash-3.00# netstat -rn
Routing Table: IPv4
  Destination           Gateway           Flags  Ref     Use     Interface
-------------------- -------------------- ----- ----- ---------- ---------
192.168.1.0          192.168.1.7          U         1          7 e1000g0
224.0.0.0            192.168.1.7          U         1          0 e1000g0
127.0.0.1            127.0.0.1            UH        1        136 lo0

Problem statment:
When I run the

bash-3.00# ypinit -s solaris102

command I get the following errors.

bash-3.00# ypinit -s solaris102

Installing the YP database will require that you answer a few questions.
Questions will all be asked at the beginning of the procedure.
Do you want this procedure to quit on non-fatal errors? [y/n: n]  n
OK, please remember to go back and redo manually whatever fails.  If you
don't, some part of the system (perhaps the yp itself) won't work.
The yp domain directory is /var/yp/local.com
Can we destroy the existing /var/yp/local.com and its contents? [y/n: n]  y
There will be no further questions. The remainder of the procedure should take
a few minutes, to copy the data bases from solaris102.
Transferring audit_user...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring user_attr...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring prof_attr...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring exec_attr...
^CTransferring auth_attr...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring ageing.byname...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring auto.home...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring timezone.byname...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring netmasks.byaddr...
bind_to_server __clnt_create_rsvd error: RPC: Rpcbind failure - RPC: Timed out
Transferring auto.master...

ping to the solaris102 (master) from the solaris103 (slave) produces the following.

bash-3.00# ping solaris102
ICMP Host Unreachable from gateway solaris103 (192.168.1.7)
 for icmp from solaris103 (192.168.1.7) to solaris102 (192.168.2.10)
ICMP Host Unreachable from gateway solaris103 (192.168.1.7)
 for icmp from solaris103 (192.168.1.7) to solaris102 (192.168.2.10)
ICMP Host Unreachable from gateway solaris103 (192.168.1.7)
 for icmp from solaris103 (192.168.1.7) to solaris102 (192.168.2.10)
^C

Weird, why the dhcp adres from the solaris102 (master)?
I thought maybe NIS is already working and getting an adress from solaris102 (master) so I reconfigured the nsswitch.conf file just to use files.

bash-3.00# cat /etc/nsswitch.conf
#
# /etc/nsswitch.nis:
#
# An example file that could be copied over to /etc/nsswitch.conf; it
# uses NIS (YP) in conjunction with files.
#
# "hosts:" and "services:" in this file are used only if the
# /etc/netconfig file has a "-" for nametoaddr_libs of "inet" transports.
# NIS service requires that svc:/network/nis/client:default be enabled
# and online.
# the following two lines obviate the "+" entry in /etc/passwd and /etc/group.
passwd:     files nis
group:      files nis
# consult /etc "files" only if nis is down.
hosts:      files nis
# Note that IPv4 addresses are searched for in all of the ipnodes databases
# before searching the hosts databases.
ipnodes:    nis [NOTFOUND=return] files
networks:   files
protocols:  files
rpc:        files
ethers:     files
netmasks:   files
bootparams: files
publickey:  files
netgroup:   nis
automount:  files nis
aliases:    files nis
# for efficient getservbyname() avoid nis
services:   files nis
printers:       user files nis
auth_attr:  files nis
prof_attr:  files nis
project:    files nis
bash-3.00# ypinit -s 192.168.1.6

Can't enumerate maps from 192.168.1.6. Please check that it is running.

Any help would be apriciated.

Solved it my self.

What i've done is.

I thought that the problem resided in the fact that the primary interface was het interface on which dhcp was running. That explains when I pinged ik got the dhcp outside adress e1000g1 and not the static inside adress e1000g0.
So I wanted to change this and edited the hosts file to match the inside ip with the inside interface also changed the hostname.e1000g0 with the hostname of the master, this was previous just an ip configured in that file.

rebooted.

That still didnt work. the primary interface was still the dhcp address and it kept overruling my static ip in the hosts file.

I put this in

#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.5     solaris101
192.168.1.7     solaris103      loghost
192.168.1.6    solaris102     

but the result after a reboot was:

#
# Internet host table
#
::1     localhost
127.0.0.1       localhost
192.168.1.5     solaris101
192.168.1.7     solaris103      loghost
192.168.2.10    solaris102      # Added by DHCP

So I struggeld a bit with that but finally I thought

sys-unconfig

will do the trick. rebooted and configured all a new setting the primary interface to e1000g0 the static ip.
Also made the dhcp a static ip and the hosts file now looks like this.

bash-3.00# cat /etc/hosts
#
# Internet host table
#
127.0.0.1       localhost
::1     localhost
192.168.1.6     solaris102
192.168.2.10    solaris102-1
192.168.1.5     solaris101
192.168.1.7     solaris103

Notice I made a different name for the e1000g1 interface, think that is commonly used like this.

After all configurations.

ypinit -s solaris102

Worked fine and the slave could contact the NIS master server.