The virtual-switching datalink property controls the switching between VMs over the same physical port through the following possible values:
local – Enables the network traffic between VMs over the same physical NIC to be exchanged internally. This is the default mode.
remote – Enables the network traffic between VMs over the same physical NIC to be exchanged through the external switch.
auto – Uses LLDP to determine whether reflective relay is supported on the external switch. If reflective relay is supported on the external switch, network traffic between VMs is exchanged through the external switch. Otherwise, network traffic between VMs is exchanged internally.
The next sections explain each property value further.
The following figure shows a virtual network setup where the server is connected to a switch, but where network traffic is internal.
This scenario would be typical of a configuration where the VMs are running services for the same customer. Communication between the two zones can occur internally without any restrictions. In this case, the virtual-switching is set to local:
$ dladm show-linkprop -p virtual-switching net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net4 virtual-switching rw local local local local,remote,auto
Figure 14 Internal Communication Between Zones
The following figure shows a virtual network setup where the server is connected to a switch, but where communication between VMs passes through the external switch.
This setup is deployed when different VMs run services for different customers. In such cases, the external switch is configured to control and isolate network traffic for the different VMs. The example assumes that reflective relay is supported on the switch and properly configured before the virtual-switching property is set to remote:
$ dladm set-linkprop -p virtual-switching=remote net5 $ dladm show-linkprop -p virtual-switching net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 virtual-switching rw remote remote local local,remote,auto
Figure 15 Communication Between Zones by Using an External Switch
Setting the virtual-switching property to auto works depending on the ability of the switch to support reflective relay. If the support is present, then LLDP automatically configures network traffic exchange as either internal or external that uses the external switch.
To use the auto value, ensure the following first:
The LLDP package is installed.
$ pkg info lldp
The LLDP service is online.
$ svcs lldp STATE STIME FMRI online Jul_13 svc:/network/lldp:default
The dot1-tlv property is set to evb and the mode property is set to both for the NIC.
$ lldpadm show-agentprop -p mode,dot1-tlv net5 AGENT PROPERTY PERM VALUE DEFAULT POSSIBLE net5 mode rw both disable txonly,rxonly,both,disable net5 dot1-tlv rw evb none none,vlanname,pvid,linkaggr,pfc, appln,evb,etscfg,etsreco,all
After the preceding requirements are met, you can use the auto option:
$ dladm set-linkprop -p virtual-switching=auto net5 $ dladm show-linkprop -p virtual-switching net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 virtual-switching rw auto remote local local,remote,auto