Solaris: (Hot-)Add a new ip address to a zone without reboot

Written by - 2 comments

Published on - Listed in Solaris Unix Network


The following steps explain how to add an additional IP address to a Solaris zone without having to reboot the zone.

1. Edit the zone configuration with zonecfg
Add a new net section with the new ip address (192.168.56.44) and the interface of the zone (see ifconfig -a for the interface name of the zone).

# zonecfg -z zone01
zonecfg:zone01> add net
zonecfg:zone01:net> set address=192.168.56.44
zonecfg:zone01:net> set physical=z01ipmp0
zonecfg:zone01:net> end
zonecfg:zone01> verify
zonecfg:zone01> commit
zonecfg:zone01> exit

This prepares the zone to use the additional ip address on the mentioned interface.

2. Add the ip address with ifconfig

ifconfig z01ipmp0 addif 192.168.56.44 netmask + broadcast + zone zone01 up
Created new logical interface z01ipmp0:2
Setting netmask of z01ipmp0:2 to 255.255.255.0

 

To remove an additional ip address from a Solaris zone, do the following steps:

1. Remove the ip address with ifconfig:

ifconfig z01ipmp0 removeif 192.168.56.44

2. Remove the ip address from the Solaris zone configuration:

# zonecfg -z zone01
zonecfg:zone01> remove net address=192.168.56.44
zonecfg:zone01> verify
zonecfg:zone01> commit
zonecfg:zone01> exit


Add a comment

Show form to leave a comment

Comments (newest first)

Claudio from Switzerland wrote on Jul 22nd, 2013:

All commands are run on the global.


Alexander from Sardinien wrote on Jul 22nd, 2013:

Would be worthwhile to add, that the ifconfig command is run in the global zone
Or, is it? :-)


RSS feed

Blog Tags:

  AWS   Android   Ansible   Apache   Apple   Atlassian   BSD   Backup   Bash   Bluecoat   CMS   Chef   Cloud   Coding   Consul   Containers   CouchDB   DB   DNS   Database   Databases   Docker   ELK   Elasticsearch   Filebeat   FreeBSD   Galera   Git   GlusterFS   Grafana   Graphics   HAProxy   HTML   Hacks   Hardware   Icinga   Influx   Internet   Java   KVM   Kibana   Kodi   Kubernetes   LVM   LXC   Linux   Logstash   Mac   Macintosh   Mail   MariaDB   Minio   MongoDB   Monitoring   Multimedia   MySQL   NFS   Nagios   Network   Nginx   OSSEC   OTRS   Office   OpenSearch   PGSQL   PHP   Perl   Personal   PostgreSQL   Postgres   PowerDNS   Proxmox   Proxy   Python   Rancher   Rant   Redis   Roundcube   SSL   Samba   Seafile   Security   Shell   SmartOS   Solaris   Surveillance   Systemd   TLS   Tomcat   Ubuntu   Unix   VMWare   VMware   Varnish   Virtualization   Windows   Wireless   Wordpress   Wyse   ZFS   Zoneminder