Setting up Static IP and NIS for OpenSolaris 2008.05

As part of OpenSolaris 2008.05 installation, Caiman installer automatically configures your ethernet card  to provide a dynamic IP address. This is perfectly fine if you are working from your laptop.

However, if you, like me installed it on your workstation like Sun Ultra 40 then you might want to do necessary things like assigning a static IP address with NIS authentication enabled etc to transition the system as a developer workstation. Now that I have tried out OpenSolaris 2008.05 LiveCD for more than 2 weeks now, I guess I am now ready to make OpenSolaris 2008.05 as my default OS. If you haven't yet, you might wanna download a copy from here

So, here is how I went ahead with this transition

- Disable Network AutoMagic(NWAM) service and enable traditional networking service

svcadm enable physical:default 

svcadm disable physical:nwam

-  Now, you need to configure the static IP address for your ethernet interface. You could do this by using the network configuration GUI - 'System->Administration->Network GUI window to configure this as shown here

Note: I am assuming that you know the IP address and the default gateway that you need to provide here. If not, you might want to talk to your Network administrator before you attempt this.

- Now, I will restart all network services by doing some thing like

 svcadm restart milestone/network


Now, I will move ahead and configure NIS for my system. Here is how it
worked for me

- Setup your domain name of your current network. NIS server need to reside within this domain as well.  So, let us save the current domain name of your network to /etc/defaultdomain file.

    pfexec domainname <name here> 

   pfexec domainname > /etc/defaultdomain

For example,

    pfexec domainname sfbay.sun.com

    pfexec domainname  > /etc/defaultdomain

- Copy /etc/nsswitch.nis to /etc/nsswitch.conf

    pfexec cp /etc/nsswitch.nis /etc/nsswitch.conf

- Configure NIS Services

    pfexec ypinit -c

This above command will walk you through and ask you to provide NIS server IP addresses etc. and then bind the configured NIS server.

    pfexec /usr/lib/netsvc/yp/ypbind -broadcast

- Finally, enable NIS service and restart all network services..

    svcadm enable nis/client

    svcadm restart milestone/network

- Now, you should be able to verify if NIS is working on your system by doing something like

    ypcat -k passwd -> should return a whole bunch of NIS user names within your domain.

That is all there to do to translate a OpenSolaris system running in DHCP to a static IP address with NIS enabled



Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Sharing what little I know

Search

Archives
« July 2014
SunMonTueWedThuFriSat
  
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
  
       
Today