Adding network interface to a running solaris zone

At some point you may have a solaris non-global zone up and running but are not able to take it down to add a network interface. For the longest time I thought in order to make any config change to a local zone would require the zone to be halted. Not the case any more with Solaris 10.

If you are wanting to add a permanent network interface to the zone, you still must use zonecfg to configure the zone so that once it does reboot the interface will be there. From the global zone do:

zonecfg -z <zonename>
add net
set address=<NEW IP>
set physical=<INTERFACE>
end
verify
commit

So the zone config is set, let’s add the interface now to the running zone. Again from the global zone, do:

ifconfig <INTERFACE> addif <NEWIP> netmask <NEWNETMASK> zone <zonename> up

That’s it. You local zone should now be available on the new IP address. If you run ifconfig -a you should see the new interface associated with your zone.

 

Author: TheUnknown on May 16, 2012
Category: SUN Solaris, Zones
Tags: , ,

Leave a Reply

You must be logged in to post a comment.

Last articles