Go to main content

Oracle® VM Server for SPARC 3.5 Administration Guide

Exit Print View

Updated: November 2017
 
 

Configuring NAT on an Oracle Solaris 11 System

The Oracle Solaris 11 network virtualization features include etherstub, which is a pseudo network device. This device provides functionality similar to physical network devices but only for private communications with its clients. This pseudo device can be used as a network back-end device for a virtual switch that provides the private communications between virtual networks. By using the etherstub device as a back-end device, guest domains can also communicate with VNICs on the same etherstub device. Using the etherstub device in this way enables guest domains to communicate with zones in the service domain. Use the dladm create-etherstub command to create an etherstub device.

The following diagram shows how virtual switches, etherstub devices, and VNICs can be used to set up Network Address Translation (NAT) in a service domain.

Figure 15  Virtual Network Routing

image:Shows Oracle Solaris 11 virtual network routing as described in the text.

You might consider using persistent routes. For more information, see Troubleshooting Issues When Adding a Persistent Route in Troubleshooting Network Administration Issues in Oracle Solaris 11.3 and Creating Persistent (Static) Routes in Configuring and Managing Network Components in Oracle Solaris 11.3.

How to Set Up a Virtual Switch to Provide External Connectivity 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.

    See Customizing IP Interface Properties and Addresses in Configuring and Managing Network Components in Oracle Solaris 11.3 and Packet Forwarding and Routing on IPv4 Networks in Oracle Solaris Administration: IP Services.