How to Set Up a Virtual Switch to Enable NAT to Domains (Oracle Solaris 11)

  1. Create an Oracle Solaris 11 etherstub device.
    primary# dladm create-etherstub stub0
  2. Create a virtual switch that uses stub0 as the physical back-end device.
    primary# ldm add-vsw net-dev=stub0 primary-stub-vsw0 primary
  3. Create a VNIC on the stub0 device.
    primary# dladm create-vnic -l stub0 vnic0
  4. Configure vnic0 as the network interface.
    primary# ipadm create-ip vnic0
    primary# ipadm create-addr -T static -a 192.168.100.1/24  vnic0/v4static
  5. Enable IPv4 forwarding and create NAT rules to provide external connectivity to the domains.