This procedure explains how to configure a new zone with the VNIC anet resource. Note that only the steps related to network virtualization are included in the procedure. For more information about how to configure zones, see Creating and Using Oracle Solaris Zones.
Before You Begin
Ensure that your role has the appropriate rights profile to perform this procedure. See Using Rights Profiles to Perform Network Configuration.
global$ zonecfg -z zone zonecfg:zone> create -t SYSsolaris
When you create a zone, a VNIC anet resource is added to the zone by default. The lower link for the VNIC anet resource is selected automatically. You can manually set the lower link for the VNIC anet resource as described in the next step.
zonecfg:zone> select anet linkname=net0 zonecfg:zone:anet> set lower-link=NIC
zonecfg:zone:anet> set allowed-address=IP-address-of-the-anet-resource zonecfg:zone:anet> set defrouter=IP-address-of-the-default-router zonecfg:zone:anet> end
zonecfg:zone> verify zonecfg:zone> commit zonecfg:zone> exit
global$ zoneadm -z zone install global$ zoneadm -z zone boot
global$ zlogin -C zone
During the zone configuration, you can specify most of the information by selecting from a list of choices. Usually, the default options suffice. You can skip the network configuration because you have already set the allowed-address and defrouter properties for the anet resource.
In this example, zone1 is created for the virtual network with the VNIC anet resource. Note that only the zone parameters that are relevant to the creation of a virtual network are listed.
global $ zonecfg -z zone1 Use 'create' to begin configuring a new zone. zonecfg:zone1> create -t SYSsolaris zonecfg:zone1> select anet linkname=net0 zonecfg:zone1:anet> set lower-link=net0 zonecfg:zone1:anet> set allowed-address=192.0.2.10/24 zonecfg:zone1:anet> set defrouter=192.0.2.1 zonecfg:zone1:anet> end zonecfg:zone1> verify zonecfg:zone1> commit zonecfg:zone1> exit global$ zoneadm -z zone1 install . . . global$ zoneadm -z zone1 boot global$ zlogin -C zone1
Specify the information for the zone as you are prompted.