Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018

How to Configure a Zone for the Virtual Network

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 Chapter 1, How to Plan and Configure Non-Global Zones in Creating and Using Oracle Solaris Zones.

  1. Become an administrator.

    For more information, see Using Your Assigned Administrative Rights in Securing Users and Processes in Oracle Solaris 11.3.

  2. Create the zone.
    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.

  3. Select the default VNIC anet resource of the zone and set the lower link.
    zonecfg:zone> select anet linkname=net0
    zonecfg:zone:anet> set lower-link=NIC
  4. Configure the IP address and the default router for the anet resource of the zone.
    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
  5. Verify and commit the changes that you have implemented and then exit the zone.
    zonecfg:zone> verify
    zonecfg:zone> commit
    zonecfg:zone> exit
  6. Install and boot the zone.
    global# zoneadm -z zone install
    global# zoneadm -z zone boot
  7. Log in to the zone and complete the zone configuration.
    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.

Example 6  Configuring a Zone for the Virtual Network

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=
zonecfg:zone1:anet> set defrouter=
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. For more information about zone configuration, see Creating and Using Oracle Solaris Zones.