Configuring VLAN on LDOM – Oracle Solaris

Oracle VM for SPARC also known as LDOM is a hypervisor used to virtualize the Oracle Solaris environment on T & M series Oracle/ Fujitsu Hardware.  This article will walk through to configure the VNIC with specific VLAN number for guest LDOMs. Before getting into the VLAN part, you must understand the virtual networking on LDOM. Oracle VM for SPARC supports 802.1Q VLAN-Tagging. There are two important components used in LDOM networking.

  1. Virtual Switches
  2. Virtual network interfaces.

The virtual switch is similar to an ethernet switch and functionality also similar to that. Virtual switches are configured in control domain and service domain to provide the network connectivity to LDOM guests. Virtual network interfaces aka VNIC are similar to the physical ethernet card. Each guest domain should have VNIC to communicate with external world or communicate with other systems on the network. So, we are plugging the one end virtual cable with virtual switch and other ends with guest domain’s VNIC  virtually.

 

Like physical networking world, How are we going to configure the VLAN?

VLAN is a virtual LAN which is used to segregate the multiple networks traffics to reduce the network collision. In LDOM virtual switch, we do have parameters like PVID  (Port VLAN id)& VID (VLAN id).  PVID=1 & VID=1 are reserved.

Let’s look at closer how the PVID & VID works.

 

1.Login to control domain and list the LDOM network services.

#  ldm ls-services
VSW
NAME             LDOM             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE   INTER-VNET-LINK
primary-vsw0     primary          00:14:4f:f8:4a:c0 net0      0    switch@0              1               1                         1500         on
primary-vsw1     primary          00:14:4f:fb:61:fd net1      1    switch@1              1               1                         1500         on

2. Assuming that guest domain has two VNET without any PVID & VID assigned to it

 ldm ls-bindings guestldom1
NETWORK
NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID 
INKPROP
uavnet998-pri    primary-vsw0                0               00:14:4f:g8:05:05                 
uavnet998-svc    primary-vsw1                1               00:14:4f:g9:1f:a7                 

3. Let’s set the PVID for those virtual network interfaces to allow vlan 510.

# ldm set-vnet pvid=510 uavnet998 guestldom1
# ldm set-vnet pvid=510 uavnet998-svc guestldom1

4. List the LDOM bindings for “guestldom1”

NETWORK
NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID 
INKPROP
uavnet998        primary-vsw0                0               00:14:4f:g8:05:05        510      
uavnet998-svc    primary-vsw1                1               00:14:4f:g9:1f:a7        510      

 

5, If you would like to add new VNET with specific PVID, use the following commands.

# ldm add-vnet pvid=510 uavnet998-pri  primary-vsw0  guestldom1
# ldm add-vnet pvid=510 uavnet998-svc  primary-vsw1  guestldom1

 

Now “guestldom1” have access to VLAN 510 and you no need to tag this VLAN under operating system to use. You can just plumb the interface and assign an IP from VLAN 510 range.

Example:

vnet0: flags=108001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP,PHYSRUNNING> mtu 1500 index 2
inet 192.168.96.22 netmask ffffff00 broadcast 192.168.96.255

Look at the interface name. It just plumbed and without any vlan tagging.

LDOM oracle VM for SPARC - Networking PVID VID
LDOM oracle VM for SPARC – Networking PVID VID

 

If you have requirment where guest domain should have access to multiple VLAN id’s, then you need to assign vid and tag the VLAN on guest LDOM.

1. Set the VID for the existing interface using the following command.

# ldm set-vnet vid=233 uavnet998 guestldom1
# ldm set-vnet vid=233 uavnet998-svc guestldom1

 

2. List the LDOM bindings.

~# ldm ls-bindings guestldom1
NETWORK
NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID 
INKPROP
uavnet998        primary-vsw0                0               00:14:4f:g8:05:05        510  233 
uavnet998-svc    primary-vsw1                1               00:14:4f:g9:1f:a7        510  233 

 

3. If you would like to add new interface with VID, use the following command.

# ldm set-vnet vid=233 uavnet998 guestldom1
# ldm set-vnet vid=233 uavnet998-svc guestldom1

Here you could see that PVID & VID both exist. To access VLAN 233, you need to tag interface in guest LDOM OS. But you must tag the VLAN in guest OS for VID.

Here is the example of tagging VLAN number.
Example:

vnet233001: flags=108001000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,IPMP,PHYSRUNNING> mtu 1500 index 2
inet 192.168.97.24 netmask ffffff00 broadcast 192.168.97.255

vnet233001 = > “VLAN Number” + “00” + “vnic instance number”.

 

4. If you want to tag multiple VLAN numbers, just use a comma after the VLAN number.

# ldm set-vnet vid=233,433 uavnet998 guestldom1
# ldm set-vnet vid=233,433 uavnet998-svc guestldom1
# ldm ls-bindings guestldom1
NETWORK
NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID                  MTU   MAXBW      LINKPROP
uavnet998        primary-vsw0                0               00:14:4f:g8:05:05        510  233,433                                
uavnet998-svc    primary-vsw1                1               00:14:4f:g9:1f:a7        510  233,433                                

 

You could also add interface with multiple VLAN ids.

# ldm set-vnet vid=233,433 uavnet998 guestldom1
# ldm set-vnet vid=233,433 uavnet998-svc guestldom1

 

Hope this article is informative to you. Share it!  Comment it !! Be Sociable !!!

VMTURBO-CLOUD-CAPACITY

Leave a Reply

Your email address will not be published. Required fields are marked *