Changing an IP in Solaris 2.5.1

Changing an IP in Solaris 2.5.1

Post by Bill O'Malle » Wed, 16 Jun 1999 04:00:00



I'm need to change the IP and gateway on a Sun Solaris station we
currently use.  I am familiar with the HP-UX "set_parms", but do not
know of anything equivalent in Solaris.

Since this will be the only UNIX machine on the subnet I am moving it
to, I will also have to make this an NIS slave right?  It's been awhile,
but I think it is something like:  "ypinit -s nameserver.xx.yyy.com
DOM:domain.xxx.yyy.com [enter]" right?

Thanks for any help that can be offered.
Bill O'Malley

 
 
 

Changing an IP in Solaris 2.5.1

Post by Scott Gennar » Wed, 16 Jun 1999 04:00:00


use "ifconfig" to change the IP address
you can use "route" to add a default gateway

examples: change IP to 111.11.11.5 and gateway to 111.11.11.1

ifconfig le0 inet 111.11.11.5     (where le0 is the name of the net
interface you are using)
ifconfig le0                              (to display the setting and
confirm the changes)

route add default 111.11.11.1  (you may need to flush your routing tabe
first

Scott


    I'm need to change the IP and gateway on a Sun Solaris station we
currently use.  I am familiar with the HP-UX "set_parms", but do not know of
anything equivalent in Solaris.
    Since this will be the only UNIX machine on the subnet I am moving it
to, I will also have to make this an NIS slave right?  It's been awhile, but
I think it is something like:  "ypinit -s nameserver.xx.yyy.com
DOM:domain.xxx.yyy.com [enter]" right?

    Thanks for any help that can be offered.
    Bill O'Malley


 
 
 

Changing an IP in Solaris 2.5.1

Post by Paul Mutyambiz » Fri, 18 Jun 1999 04:00:00



> I'm need to change the IP and gateway on a Sun Solaris station we
> currently use.  I am familiar with the HP-UX "set_parms", but do not
> know of anything equivalent in Solaris.

not really, but it's easy enough.

> Since this will be the only UNIX machine on the subnet I am moving it
> to, I will also have to make this an NIS slave right?  It's been
> awhile, but I think it is something like:  "ypinit -s
> nameserver.xx.yyy.com DOM:domain.xxx.yyy.com [enter]" right?

> Thanks for any help that can be offered.
> Bill O'Malley


1)    For your IP address use ifconfig (1M). Assuming your netmasks on
the FROM_SUBNET is the same as that on the TO_SUBNET:

Do this at the CONSOLE not over the network!!
host# ifconfig INTERFACE down
host# ifconfig INTERFACE NEW.IP.ADD.RESS
host# ifconfig INTERFACE up

where INTERFACE is the interface device name e.g. le0, hme0, qe0

2)    Your query regarding NIS is correct. see ypinit (1M)

    a)    On your NIS master: Add the slave-to-be's hostname to the
ypservers NIS flat files, usually in /var/nis/domain/ypservers and push
the updated map out.

    b)    This should already be there, but make sure you have a
/etc/defaultdomain file with  the NIS domain name on your slave-to-be.
Make sure the hostname and IP address of your NIS master are in
/etc/hosts.

    c)    Run ypinit -s NIS_master_server [enter]

    d)    Check your /etc/resolv.conf to make sure the order f of
services searched is correct.

    e)    I would recommend trying a reboot after this to ensure
everything still works okay and check you logins, mounts and all come up
correctly.

Paul
--
**********************************
Opinions expressed are solely my own!
**********************************

 
 
 

1. Changing IP address on Solaris 9 with multiple virtual IP addresses

Hi

We are running Solaris 9 and have configured the one physical NIC with
2 IP addresses allowing us to run 2 web servers and keep both on port
80. Is changing the IP address assigned to each host as simple as
changing the entries in /etc/inet/hosts or do I need to start messing
with ifconfig?

TIA

Robert

2. Library failure, help needed! slackware 2.2.0.1 vs. term 2.3.5

3. IP Accounting doesn't work for PPP dial-ins :-(( ??

4. Setup Secondary DNS server

5. In search of Solaris 2.5 Netscape Navigator 3.0 plug ins

6. sed problem?

7. Code fragments/plug-ins for solaris?

8. System Adminstration

9. Change Solaris IP Address

10. Question on IP Address Change (Solaris 2.5.1)

11. Netdynamics/Solaris IP change

12. IP address change on Solaris 2.4

13. how to change from DHCP to static IP on Solaris 8