Question : How to set certain netmask for a non global zone ?
Answer :
To define a certain netmask for a non global zone, use zonecfg command. The network address is one of:
- a valid IPv4 address, optionally followed by “/” and a prefix length.
- a valid IPv6 address, which must be followed by “/” and a prefix length.
Steps to follow
1. On the global zone, enter the zone configuration mode :
global_zone # zonecfg -z zone01 zonecfg:zone01> add net zonecfg:zone01:net> set address=192.168.0.10/24 zonecfg:zone01:net> set physical=eri0 zonecfg:zone01:net> end zonecfg:zone01> exit
2. Verify the zone configuration :
global_zone # zonecfg -z zone02 info
3. To check and verify the settings you can use ifconfig within the non global zone :
zone01 # ifconfig -a