Setting primary ip address with ifconfig

Hello,
I have a server with two ip addresses. I need to make the ip address that's currently the secondary the primary. How do I use the ifconfig command and primary option?
Thanks.

OS ?

Persistent or temporary change?

Solaris 9 and persistent.

I solved my own problem. (pretty rare, huh? :slight_smile: ) Since I didn't know the correct usage of the primary option with ifconfig, I went onto the box through the currently primary interface which I wanted to be the secondary and did an ifconfig interface down. Then I went in on the secondary interface which I wanted to be the primary and brought the other back up. Seems logical that if there are two interfaces and one goes down, the remaining one becomes the primary. Hope this helps someone else in the world :smiley:

That's the best way to learn.

Actually that is exactly what IPMP is for. However there are several ways to use it. In your case you want active-passive, in some scenarios active-active is also used.

You should note however that manual interventions with ifconfig are non-persistent, in addition to the ifconfig, you swap the contents of /etc/hostname.<ifname> files.

Post back if you want the steps for the active-passive IPMP configuration, to do this automagically, or if you'd prefer to have a go yourself then I think it's in the "system administration collection" on http://docs.sun.com

Thanks, I'll check out docs.sun.com.