Wed 12 Dec 2007
Adding interfaces to a running Solaris 10 Zone
Posted by asxinu under Solaris 10, bigadmin, ifconfig, zones
No Comments
This bit was pulled from the bigadmin document Spotlight on Solaris Zones Feature by Amy Rich.
The ifconfig utility has been modified in order to configure and view interfaces based on zone granularity as well, but interfaces can only be plumbed or unplumbed from the global zone. To place an IP interface inside a zone from the global zone:
ifconfigzone { | } ifconfig hme0:3 plumb 192.168.1.8 netmask 255.255.255.0 zone myzone up
To print the list of IP interfaces limited to the global zone from the global zone, use ifconfig -aZ. Using ifconfig -a shows network interfaces for all zones.
ifconfig -a
lo0: flags=1000849
mtu 8232 index 1
inet 192.168.1.7 netmask ff000000
lo0:1: flags=1000849
mtu 8232 index 1
zone myzone
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843
mtu 1500 index 2
inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:9e:b5:40
hme0:1: flags=1000843
mtu 1500 index 2
zone myzone
inet 192.168.1.7 netmask ffffff00 broadcast 192.168.1.255
ifconfig -aZ
lo0: flags=1000849
mtu 8232 index 1
inet 192.168.1.7 netmask ff000000
hme0: flags=1000843
mtu 1500 index 2
inet 192.168.1.4 netmask ffffff00 broadcast 192.168.1.255
ether 8:0:20:9e:b5:40
