|Skip Navigation Links
|Exit Print View
|Oracle VM Server for SPARC 3.0 Administration Guide Oracle VM Server for SPARC
The Oracle VM Server for SPARC software supports 802.1Q VLAN-Tagging in the network infrastructure.
The virtual switch (vsw) and virtual network (vnet) devices support switching of Ethernet packets based on the virtual local area network (VLAN) identifier (ID) and handle the necessary tagging or untagging of Ethernet frames.
You can create multiple VLAN interfaces over a vnet device in a guest domain. Use the Oracle Solaris 10 ifconfig command or the Oracle Solaris 11 dladm and ipadm commands to create a VLAN interface over a virtual network device. The creation method is the same as the method used to configure a VLAN interface over any other physical network device. The additional requirement in the Logical Domains environment is that you must assign the vnet to the corresponding VLANs using the Logical Domains Manager CLI commands. Refer to the ldm(1M) for complete information about the Logical Domains Manager CLI commands.
Similarly, you can configure VLAN interfaces over a virtual switch device in the service domain. VLAN IDs 2 through 4094 are valid; VLAN ID 1 is reserved as the default-vlan-id.
When you create a vnet device on a guest domain, you must assign it to the required VLANs by specifying a port VLAN ID and zero or more VLAN IDs for this vnet, using the pvid= and vid= arguments to the ldm add-vnet command. This configures the virtual switch to support multiple VLANs in the Logical Domains network and switch packets using both MAC address and VLAN IDs in the network.
Similarly, any VLANs to which the vsw device itself should belong, when created as a network interface, must be configured in the vsw device using the pvid= and vid= arguments to the ldm add-vsw command.
You can change the VLANs to which a device belongs using ldm set-vnet or ldm set-vsw command.
The PVID indicates a VLAN to which the virtual network device needs to be a member, in untagged mode. In this case, the vsw device provides the necessary tagging or untagging of frames for the vnet device over the VLAN specified by its PVID. Any outbound frames from the virtual network that are untagged are tagged with its PVID by the virtual switch. Inbound frames tagged with this PVID are untagged by the virtual switch, before sending it to the vnet device. Thus, assigning a PVID to a vnet implicitly means that the corresponding virtual network port on the virtual switch is marked untagged for the VLAN specified by the PVID. You can have only one PVID for a vnet device.
The corresponding virtual network interface, when configured without a VLAN ID and using only its device instance, results in the interface being implicitly assigned to the VLAN specified by the virtual network's PVID.
For example, if you were to create vnet instance 0, using one of the following commands, and if the pvid= argument for the vnet has been specified as 10, the vnet0 interface would be implicitly assigned to belong to VLAN 10. Note that the following commands show the vnet0 interface names, which pertains to Oracle Solaris 10. For Oracle Solaris 11, use the generic name instead, such as net0.
Oracle Solaris 10 OS. Use the ifconfig command.
# ifconfig vnet0 plumb
Oracle Solaris 11 OS. Use the ipadm command.
# ipadm create-ip net0
The VID indicates the VLAN to which a virtual network device or virtual switch needs to be a member, in tagged mode. The virtual network device sends and receives tagged frames over the VLANs specified by its VIDs. The virtual switch passes any frames that are tagged with the specified VID between the virtual network device and the external network.
For example, configure VLAN 21 as untagged and VLAN 20 as tagged. Assign the virtual network (vnet) to three VLANs. Configure VLAN 20 as untagged and VLAN 21 and 22 as tagged.
# ldm add-vsw net-dev=nxge0 pvid=21 vid=20 primary-vsw0 primary # ldm add-vnet pvid=20 vid=21,22 vnet01 primary-vsw0 ldom1
This example assumes that the instance number of these devices is 0 in the domains, and the VLANs are mapped to these subnets:
Subnet 192.168.1.0 (netmask: 255.255.255.0)
Subnet 192.168.2.0 (netmask: 255.255.255.0)
Subnet 192.168.3.0 (netmask: 255.255.255.0)
primary# ifconfig vsw0 plumb primary# ifconfig vsw0 192.168.2.100 netmask 0xffffff00 broadcast + up primary# ifconfig vsw20000 plumb primary# ifconfig vsw20000 192.168.1.100 netmask 0xffffff00 broadcast + up
primary# dladm create-vlan -l vsw0 -v20 primary# ipadm create-ip net0 primary# ipadm create-addr -T static -a 192.168.2.100/24 net0/ipv4 primary# ipadm create-ip net20000 primary# ipadm create-addr -T static -a 192.168.1.100/24 net20000/ipv4
ldom1# ifconfig vnet0 plumb ldom1# ifconfig vnet0 192.168.1.101 netmask 0xffffff00 broadcast + up ldom1# ifconfig vnet21000 plumb ldom1# ifconfig vnet21000 192.168.2.101 netmask 0xffffff00 broadcast + up ldom1# ifconfig vnet22000 plumb ldom1# ifconfig vnet22000 192.168.3.101 netmask 0xffffff00 broadcast + up
For more information about how to configure VLAN interfaces in the Oracle Solaris 10 OS, refer to Administering Virtual Local Area Networks in System Administration Guide: IP Services.
ldom1# dladm create-vlan -l net0 -v21 ldom1# ipadm create-ip net0 ldom1# ipadm create-addr -T static -a 192.168.1.101/24 net0/ipv4 ldom1# ipadm create-ip net21000 ldom1# ipadm create-addr -T static -a 192.168.2.101/24 net21000/ipv4 ldom1# ipadm create-ip net22000 ldom1# ipadm create-addr -T static -a 192.168.3.101/24 net22000/ipv4
For more information about how to configure VLAN interfaces in the Oracle Solaris 11 OS, refer to Administering VLANs in Managing Oracle Solaris 11.1 Network Performance.
Be careful when using the Oracle Solaris JumpStart feature to install a guest domain over the network when the installation server is in a VLAN. This feature is only supported on Oracle Solaris 10 systems. Specify the VLAN ID that is associated with the installation server as the PVID of the virtual network device, and do not configure any tagged VLANs (vid) for that virtual network device. You must do this because OBP is not aware of VLANs and cannot handle VLAN-tagged network packets. The virtual switch handles the untagging and tagging of packets to and from the guest domain during network installation. After the network installation completes and the Oracle Solaris OS boots, you can configure the virtual network device to be tagged in that VLAN. You can then add the virtual network device to additional VLANs in tagged mode.
For more information about using the Oracle Solaris JumpStart feature to install a guest domain, see How to Use the Oracle Solaris JumpStart Feature on an Oracle Solaris 10 Guest Domain.
For example, if the install server is in VLAN 21, configure the virtual network initially as follows:
primary# ldm add-vnet pvid=21 vnet01 primary-vsw0 ldom1
primary# ldm set-vnet pvid= vid=21, 22, 23 vnet01 primary-vsw0 ldom1