Add IP to Solaris zone

This is a procedure to dynamically add an IP addresse to a running Solaris zone without rebooting.

Log on the global zone as root
Plumb the next available virtual interface

# ifconfig vnet0:7 plumb

Configure IP settings for that new interface specifying the zone name
# ifconfig vnet0:7 123.123.123.123 netmask 255.255.255.0 zone samtl111

Activate the interface
# ifconfig vnet0:7 up

Starting from the point, the IP is set to the zone samtl111, however you now need to modify the zone configuration to make sure it is set.
# zonecfg -z samtl282
zonecfg:samtl111> add net
zonecfg:samtl111:net>set address=123.123.123.123
zonecfg:samtl111:net>set physical=vnet0
zonecfg:samtl111:net>end
zonecfg:samtl111>commit
zonecfg:samtl111>exit
#
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License