OpenSolaris - Bringing a Solaris network interface up after a cable has been disconnected

Tutorial Icon: 
If a Solaris network interface gets disconnected and you cannot reconnect to the network it is often necessary to bring the interface up and down to regain connection. This tutorial demonstrates the process of plumbing and unplumbing an interface, this is Sun's terminology for bringing the interface up (plumb) and bringing the interface down (unplumb).

First we need to unplumb the interface:

ifconfig ce0 unplumb

Next we can bring the interface backup online using:

ifconfig ce0 plumb up

You then need to re-assign the IP and the Netmask to the interface since once we unplumbed the interface the it clears it of any address info.

ifconfig ce0 192.168.1.x netmask 255.255.255.0

This will only allow you to communicate on the local segment. To add a default gateway we need to issue:

route add -net 0.0.0.0 192.168.x.x

Hopefully, this tutorial will spare you from rebooting your Sun box when a link goes down.