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.
primary# ldm add-vsw net-dev=nxge0 pvid=21 vid=20 primary-vsw0 primary 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 net0 -v20 vlan20 primary# ipadm create-ip vlan20 primary# ipadm create-addr -T static -a 192.168.1.100/24 vlan20/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 Oracle Solaris Administration: 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 Chapter 3, Configuring Virtual Networks by Using Virtual Local Area Networks, in Managing Network Datalinks in Oracle Solaris 11.2 .