Assigning Temp IP inside zones

I want to assign ip to a zone , but i dont want that ip to be retained when the zone is rebooted , is there a way to do it ?

Thx

You have to remove the zone IP before it is rebooted. You can do it via a script before your actual reboot etc

You can also control a zone IP from the global zone with the ifconfig command. i.e. boot the zone without an IP set then add it dynamically.

Are you assigning the IP to some physical interface or virtual interface? If you simply assign the IP with the help of ifconifig and if you do not place the entry into the /etc/hosts then next time when zone is going to start it shouldn�t take the IP

kumarmani: the OP is using Solaris zones. Only virtual interfaces are supported (this changed very recently but I doubt it's the case here).
They are normally configured, including IP settings, using zonecfg, not ifconfig.
/etc/hosts is never used to automatically configure a zone IP.

Not true Kurmani!As long as zonecfg was used to create the IP virtually, /etc/hosts will not come into picture with zones as you think so.. :rolleyes:

Yes, i missed the point. What happen if you later remove the IP from the zone xml file, which keep the configuration from /etc/zones/<zone name>.xml and delete the IP from <network address="172.24.2.157" physical="bge0"/>
------------------------------------------------------

We can not leave the network address blank, zone will not able to boot, but we can replace this with some ip like 0.0.0.0. and once we are inside the zone we can change it to the require IP . Isn't?

You could try not setting the IP address but the hostname in the net config of the zone.
Then, you could change the IP address in the DNS whenever you want and no change will be required to the zone configuration.

I don't remember right now but I guess that the zone must be rebooted to take the new IP.

Try it on and let me know.

Regards,

Leandro.