1832686 Members
2904 Online
110043 Solutions
New Discussion

Re: change ip in nis

 
SOLVED
Go to solution
Marcel Boon
Trusted Contributor

change ip in nis

Hello,

I'm not so familiar with nis, so i need some information.

In our network there are some hpux workstions, which are configured with nis. One of them is an nis-server, and all others are nis-clients. I have a system which is not the nis-server and not the nis-client, his ip-adres is changed. I know that his old-ip-adress is known by the nis-server, I saw it in /var/yp/nismaps/hosts.
My question is:
How can i replace the old ip with the new ip-adress ?
which command must I use ?

thanks

Marcel
See the man pages
2 REPLIES 2
Santosh Nair_1
Honored Contributor
Solution

Re: change ip in nis

This is relatively easy. Just log into the NIS server machine and update /etc/hosts with the new IP for the system that's changing IP. Once that's done, save it and run /var/yp/ypmake hosts. This should push out a new hosts file to all the NIS clients. You can check if the changes were propogated by logging onto one of the NIS clients and doing a ypcat hosts |grep newIP.

Hope this helps.

-Santosh
Life is what's happening while you're busy making other plans
Ravi_8
Honored Contributor

Re: change ip in nis

Hi,
In the NIS server edit the /etc/hosts file.replace the old ip/hostname of the system with the new ip/hostname and save it.
then run #ypmake /etc/hosts( ypmake creates the new maps and pushes to slave/clients).
Now at the client end if you issue the command #ypcat hosts|grep hostname, you can see the new IP/hostname of the machine.

never give up