<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="/default.xsl"?>
<fr:tree xmlns:fr="http://www.forester-notes.org" xmlns:html="http://www.w3.org/1999/xhtml" xmlns:xml="http://www.w3.org/XML/1998/namespace" root="false" base-url="/">
  <fr:frontmatter>
    <fr:authors>
      <fr:author>
        <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
      </fr:author>
    </fr:authors>
    <fr:date>
      <fr:year>2019</fr:year>
      <fr:month>2</fr:month>
      <fr:day>22</fr:day>
    </fr:date>
    <fr:uri>https://xw.is/0010/</fr:uri>
    <fr:display-uri>0010</fr:display-uri>
    <fr:route>/0010/</fr:route>
    <fr:title text="Solaris › Solaris 11 zones virtual networking with NAT"><fr:link href="/solaris-index/" title="Solaris" uri="https://xw.is/solaris-index/" display-uri="solaris-index" type="local">Solaris</fr:link> › <fr:link href="/solaris11/" title="Oracle Solaris 11" uri="https://xw.is/solaris11/" display-uri="solaris11" type="local">Solaris 11</fr:link> zones virtual networking with NAT</fr:title>
  </fr:frontmatter>
  <fr:mainmatter>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:date>
          <fr:year>2019</fr:year>
          <fr:month>2</fr:month>
          <fr:day>22</fr:day>
        </fr:date>
        <fr:title text="Prepare the Solaris global zone">Prepare the <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link> global zone</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Prepare the global zone; <html:code>net2</html:code> is the interface connected to the Internet.</html:p>
        <html:pre>dladm create-etherstub ether0
dladm create-vnic -l ether0 vnic0
ipadm create-ip vnic0
ipadm create-addr -T static -a 10.0.0.1/8 vnic0/v4
routeadm -u -e ipv4-forwarding
ipadm set-ifprop -p forwarding=on -m ipv4 net2
ipadm set-ifprop -p forwarding=on -m ipv4 vnic0
echo "map net2 10.0.0.0/8 -&gt; 0/32 portmap tcp/udp auto" &gt; /etc/ipf/ipnat.conf
echo "map net2 10.0.0.0/8 -&gt; 0/32" &gt;&gt; /etc/ipf/ipnat.conf
svcadm enable network/ipfilter </html:pre>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:date>
          <fr:year>2019</fr:year>
          <fr:month>2</fr:month>
          <fr:day>22</fr:day>
        </fr:date>
        <fr:title text="Prepare the non-global zones">Prepare the non-global zones</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>Prepare the zone; <html:code>for-sysroot</html:code> is the zone name.</html:p>
        <html:pre>dladm create-vnic -l ether0 vnic1
zonecfg -z for-sysroot "create; set ip-type=exclusive; add net; set physical=vnic1; end; commit"
zoneadm -z for-sysroot install
zoneadm -z for-sysroot boot
zlogin -C for-sysroot</html:pre>
        <html:p>In <fr:link href="/sysconfig.1M" title="sysconfig(1M)" uri="https://xw.is/sysconfig.1M" display-uri="sysconfig.1M" type="local">sysconfig(1M)</fr:link> set up <html:code>vnic1/v4 10.0.0.2/8</html:code> with <html:code>10.0.0.1</html:code> as default router.</html:p>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false">
      <fr:frontmatter>
        <fr:authors>
          <fr:author>
            <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
          </fr:author>
        </fr:authors>
        <fr:date>
          <fr:year>2019</fr:year>
          <fr:month>2</fr:month>
          <fr:day>22</fr:day>
        </fr:date>
        <fr:title text="Revert (optional)">Revert (optional)</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <html:p>If you want to revert the previous steps, do the following.</html:p>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>2</fr:month>
              <fr:day>22</fr:day>
            </fr:date>
            <fr:title text="Delete the non-global zone">Delete the non-global zone</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Delete the zone.</html:p>
            <html:pre>zoneadm -z for-sysroot shutdown
zoneadm -z for-sysroot uninstall -F
zonecfg -z for-sysroot delete -F
dladm delete-vnic vnic</html:pre>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="false">
          <fr:frontmatter>
            <fr:authors>
              <fr:author>
                <fr:link href="/aram/" title="Aram Hăvărneanu" uri="https://xw.is/aram/" display-uri="aram" type="local">Aram Hăvărneanu</fr:link>
              </fr:author>
            </fr:authors>
            <fr:date>
              <fr:year>2019</fr:year>
              <fr:month>2</fr:month>
              <fr:day>22</fr:day>
            </fr:date>
            <fr:title text="Restore the global zone">Restore the global zone</fr:title>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Restore the global zone to its original state.</html:p>
            <html:pre>routeadm -u -d ipv4-forwarding
ipadm delete-addr vnic0/v4
ipadm delete-ip vnic0
dladm delete-vnic vnic0
dladm delete-etherstub ether0
ipadm set-ifprop -p forwarding=off -m ipv4 net2
svcadm disable network/ipfilter
rm /etc/ipf/ipnat.conf</html:pre>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
  </fr:mainmatter>
  <fr:backmatter>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="References">References</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Context">Context</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Backlinks">Backlinks</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Related">Related</fr:title>
      </fr:frontmatter>
      <fr:mainmatter>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://xw.is/solaris11/</fr:uri>
            <fr:display-uri>solaris11</fr:display-uri>
            <fr:route>/solaris11/</fr:route>
            <fr:title text="Oracle Solaris 11">Oracle Solaris 11</fr:title>
            <fr:taxon>Release</fr:taxon>
            <fr:meta name="external">https://www.oracle.com/solaris/solaris11/</fr:meta>
            <fr:meta name="external">https://docs.oracle.com/cd/E37838_01/html/E60973/index.html</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Solaris 11 is the <fr:link href="https://www.theregister.com/2017/01/18/solaris_12_disappears_from_oracles_roadmap/" type="external">final</fr:link> major version of the <fr:link href="/solaris/" title="Solaris" uri="https://xw.is/solaris/" display-uri="solaris" type="local">Solaris</fr:link> operating system. The current minor version is <fr:link href="https://docs.oracle.com/cd/E37838_01/html/E60973/index.html" type="external">Solaris 11.4</fr:link>.
</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://xw.is/solaris/</fr:uri>
            <fr:display-uri>solaris</fr:display-uri>
            <fr:route>/solaris/</fr:route>
            <fr:title text="Solaris">Solaris</fr:title>
            <fr:taxon>Software</fr:taxon>
            <fr:meta name="external">https://www.oracle.com/solaris</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Proprietary Unix operating system originally developed by <fr:link href="/sun/" title="Sun Microsystems" uri="https://xw.is/sun/" display-uri="sun" type="local">Sun Microsystems</fr:link>.</html:p>
          </fr:mainmatter>
        </fr:tree>
        <fr:tree show-metadata="true" expanded="false" toc="false" numbered="false">
          <fr:frontmatter>
            <fr:authors />
            <fr:uri>https://xw.is/sysconfig.1M</fr:uri>
            <fr:display-uri>sysconfig.1M</fr:display-uri>
            <fr:route>/sysconfig.1M</fr:route>
            <fr:title text="sysconfig(1M)">sysconfig(1M)</fr:title>
            <fr:taxon>Manual</fr:taxon>
            <fr:meta name="external">https://docs.oracle.com/cd/E23824_01/html/821-1462/sysconfig-1m.html</fr:meta>
          </fr:frontmatter>
          <fr:mainmatter>
            <html:p>Unconfigure or reconfigure a Solaris instance.</html:p>
          </fr:mainmatter>
        </fr:tree>
      </fr:mainmatter>
    </fr:tree>
    <fr:tree show-metadata="false" hidden-when-empty="true">
      <fr:frontmatter>
        <fr:authors />
        <fr:title text="Contributions">Contributions</fr:title>
      </fr:frontmatter>
      <fr:mainmatter />
    </fr:tree>
  </fr:backmatter>
</fr:tree>
