|Skip Navigation Links|
|Exit Print View|
|Oracle VM Server for SPARC 3.0 Administration Guide Oracle VM Server for SPARC|
In the Oracle Solaris 10 OS, the virtual switch (vsw) is a layer-2 switch, which also can be used as a network device in the service domain. The virtual switch can be configured to act only as a switch between the virtual network (vnet) devices in the various logical domains but with no connectivity to a network outside the box through a physical device. In this mode, creating the vsw as a network device and enabling IP routing in the service domain enables virtual networks to communicate outside the box using the service domain as a router. This mode of operation is very essential to provide external connectivity to the domains when the physical network adapter is not GLDv3-compliant.
The advantages of this configuration are:
The virtual switch does not need to use a physical device directly and can provide external connectivity even when the underlying device is not GLDv3-compliant.
The configuration can take advantage of the IP routing and filtering capabilities of the Oracle Solaris OS.
The following diagram shows how a virtual switch can be used to configure Network Address Translation (NAT) in a service domain to provide external connectivity for guest domains.
Figure 8-5 Virtual Network Routing
If assigning an address, ensure that the virtual switch has a unique MAC address.
primary# ldm add-vsw [mac-addr=xx:xx:xx:xx:xx:xx] primary-vsw0 primary
See How to Configure the Virtual Switch as the Primary Interface for more information about creating the virtual switch.
See How to Configure the Virtual Switch as the Primary Interface for more information about configuring the virtual switch device for DHCP.
For more information about IP routing, see Packet Forwarding and Routing on IPv4 Networks in System Administration Guide: IP Services.
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 8-6 Virtual Network Routing
primary# dladm create-etherstub stub0
primary# ldm add-vsw net-dev=stub0 primary-stub-vsw0 primary
primary# dladm create-vnic -l stub0 vnic0
primary# ipadm create-ip vnic0 primary# ipadm create-addr -T static -a 192.168.100.1/24 vnic0/v4static
See Setting IP Interface Properties in Connecting Systems Using Fixed Network Configuration in Oracle Solaris 11.1 and Packet Forwarding and Routing on IPv4 Networks in System Administration Guide: IP Services.