I am trying to change the IP address in Solaris, but am failing to do so.

The IP address needs to be a fixed number, like

I have tried changing the IP address in /etc/hosts which I changed the hostname and the IP address, but when I try ping the computer name, it says:

Ping request could not find host SolarisTest. Please check the name and try again.

I have done what they told me to try on this site. But still stuck.

They say to do this: "If using Solaris 9 or above, users may need to edit the IP address in /etc/inet/ipnodes" which I did, and the file looks exactly the same as the /etc/hosts/ file. I already changed the IP address in the /etc/hosts/ file.

  • Please can someone show me how to change the IP address on Solaris 11?


I have tried ifconfig -a and it showed me the old IP address and I changed /etc/hosts/ to show - so I have no idea why it is always changing.

2nd Edit

This link also shows stuff about how to change the IP address, as I have tried that as well, and also got nowhere.

  • If ifconfig still shows the old address, you didn't follow that article you link to. /etc/hosts is only for host name resolution (like DNS). It has no bearing on what IP addresses are affected to local interfaces.
    – Mat
    Aug 2, 2012 at 10:26
  • @Mat Well I carried on doing more research into this, and saw this to try: sudo #ifconfig hme0 netmask up and it still didn't work. In fact it showed this error: ifconfig: could not create address: No such interface - Does that mean that the interface is wrong? What is the interface?
    – Kevdog777
    Aug 2, 2012 at 10:29
  • 1
    docs.oracle.com/cd/E19963-01/html/821-1458/fpcwh.html#scrolltoc - Solaris has extensive documentation, you should go ahead and browse the introductory parts. If you blindly type commands found on random blogs, you're likely to lock yourself out of your box at one point or another :-)
    – Mat
    Aug 2, 2012 at 12:31
  • Thank you @Mat. I have given up trying, both myself and my colleague and I have tried. So he suggested I try from scratch and redo the installation ... at least from there I can configure it properly.
    – Kevdog777
    Aug 2, 2012 at 13:06
  • 1

3 Answers 3


According to the Solaris 11 network interfaces manual in chapter 8 “Configuring an IP Interface”:

ipadm create-addr -T static -a eth0/staticip

eth0 is the name of the Ethernet interface (listed by ipadm show-if). staticip is a name that you can choose.

  • Thank you for the answer, but I have just tried this on the interface version (using Terminal) and I got this returned: ipadm: cannot create address: Persistent operation on temporary object - What does that mean?
    – Kevdog777
    Aug 6, 2012 at 8:47

Assuming you are on Solaris 11:

I believe the above answer is too simplistic.

I've got a feeling that your current IP address is obtained via DHCP and now you want to switch to a fixed address ?

First you need to disable Network Automagic. (it will get in your way if all you want is a static IP address). Do it like this:

netadm enable -p ncp DefaultFixed

Next step is that you must explicitly create an IP interface. (because you've disabled network automagic). Do it like this:

ipadm create-ip net0

Now go ahead and assign a static IP address on that IP interface:

ipadm create-addr -T static -a net0/v4

That's it. No need to reboot.

I don't know what netmask you want to use so the "/24" (equivalent of mask is a guess. The "v4" means that you want to create an IPv4 address as opposed to a IPv6 address.

  • Thank you for this, but it is all sorted now. I used the GUI to do it all. But it looks like this would've worked too!
    – Kevdog777
    Aug 20, 2012 at 14:47

I know you already sorted it out a long time ago using the GUI but, for the record, the way to overcome from the command line the issue you experienced :

# ipadm create-addr -T static -a net0/v4static
ipadm: cannot create address: Persistent operation on temporary object

is to turn interface persistence on by recreating it:

# ipadm show-if -o all net0
net0       ip       down     no     bm4---------  ----       --
# ipadm delete-ip net0
# ipadm create-ip net0
# ipadm create-addr -T static -a net0/v4static
# ipadm show-if -o all net0
net0       ip       down     no     bm46--------  46--       --
# ifconfig net0
net0: flags=100001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,PHYSRUNNING> mtu 1500 index 6
        inet netmask ffffff00 broadcast
        ether 0:14:4f:12:34:56 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.