Big Bubbles (no troubles)

What sucks, who sucks and you suck

Virtual IPs on OpenIndiana

Recently I needed to add a second IP address (“virtual IP”, “floating IP” or “IP alias” in other jargon) to the primary network interface of my OpenIndiana-based NAS server. Turns out the traditional Solaris way no longer quite works if you’re using NWAM:

# ifconfig rge0:1 plumb
# ifconfig rge0:1 192.168.1.30 netmask 255.255.255.0 broadcast + up
# tail /var/adm/messages
Jan 22 21:29:32 server1 nwamd[509]: [ID 188115 daemon.error] 1: nwamd_ncu_handle_if_state_event: address 192.168.1.30 not managed by nwam added, removing it

(I know, I know; I went with NWAM because at install time, it seemed to be The Future so I thought I’d better get used to it. If you stick with traditional static interface configuration via the network/physical:default service, you probably won’t have this issue.)

The workaround is to create a virtual NIC (VNIC) on top of your physical interface using the Crossbow goodness, and then assign the IP to that:

# dladm create-vnic -t -l rge0 test1
# ipadm create-addr -t -T static -a 192.168.1.30/24 test1/temp
# ipadm show-addr

(I used the -t ‘transient’ option because I didn’t need this configuration to persist after reboot. test1 and temp are just arbitrary labels for your new VNIC and address.) Still not sure about NWAM, but I kinda like this method.

Putting this here because it seems extraordinarily badly documented (i.e. not very Googleable).