HowTo: Change IP Address in Solaris 10 without reboot

Adding or editing the IP address on a Solaris 10 server is different from the previous versions of the OS (Solaris 9, Solaris 8 etc).

In the previous versions of the Solaris Operating System, you need to edit the /etc/hosts file and add/edit the entry for the IP address and the hostname.

Example:

192.168.1.1   sun1

However, in Solaris 10, you should edit the /etc/hosts file (a symlink to /etc/inet/hosts file) and the  /etc/inet/ipnodes file and add an entry for IP address and hostname.

Once done, restart the Network service using

# svcadm restart network/physical

or reboot the server for the changes to take effect.

Although, the /etc/inet/ipnodes files is primarily for IPv6 only, without adding an entry to the file, the IP address (IPv4) doesn't become active. This seems to be a known problem but the good news is this is now fixed in the Solaris 10 U4 (08/07 build).

Also, ensure that the /etc/netmasks file with the network ID and the netmask.

Comments

7 responses to “HowTo: Change IP Address in Solaris 10 without reboot”

  1. Larry Breyer Avatar
    Larry Breyer

    You make no mention of /etc/defaultrouter. Why is that?

  2. admin Avatar
    admin

    You need to change the Default router only if the gateway changes. In other words, if the server is moved to a new subnet with a new Gateway then yes, default router needs to be changed.

    I’ve written a seperate article for that

    http://www.itsyourip.com/networking/howto-change-the-default-gateway-or-default-router-in-sun-solaris/

    May be I should add a note to this article. Thanks for that. I’ll do that!

  3. Ifeatu Avatar
    Ifeatu

    Great, please modify the permissions on the hosts file to read & write before you start editing the file.

  4. Makakut Avatar

    Hi

    I had to change only netmask on my solaris 10 server. I entered the command like above: svcadm restart network/physical. Before I did it, I had changed mask on file /etc/netmasks. After I entered YOur’s command nothing change. So I had to entered this:

    ifconfig bge0 IP_address netmask NET_MASK

    and this help :)))

  5. Zeekndtroy Avatar
    Zeekndtroy

    Hi Makakut,

    If you do that, you will only make the IP address to change temporarily, it will revert back when you do a reboot

  6. Ahmer Avatar
    Ahmer

    you need to change /etc/netmask
    and then run that command only write network address. network address dot zero’s in place of node address.

  7. Jonn DeMain Avatar

    I need some help with dual stacking a Solaris 10 box is this possible and if so can someone please give me a good link to use so that I may read the procedures

Leave a Reply

Your email address will not be published. Required fields are marked *