You can use LLDP for the automatic configuration of communication between VMs. LLDP configures the exchange of network traffic to be internal or external based on whether the external switch supports reflective relay. To use LLDP, set the vswitchmode datalink property to auto. First, you must ensure the following:
The LLDP package is installed.
To check whether the LLDP package is installed, use the following command:
# pkg info lldp
The LLDP service is online.
To check whether the LLDP service is online, use the following command:
# svcs lldp STATE STIME FMRI online Jul_13 svc:/network/lldp:default
EVB is enabled in the dot1-tlv TLV unit.
LLDP mode is both for the NIC.
In the example, to check whether EVB is enabled in the dot1-tlv TLV unit and the LLDP mode is both, you would use the following command:
# 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
To set the vswitchmode datalink property to auto:
# dladm set-linkprop -p vswitchmode=auto net5
When you set the vswitchmode datalink property to auto, you can use the output of the dladm show-linkprop command to check whether the communication between the VMs is internal or through an external switch.
# dladm show-linkprop -p vswitchmode net5 LINK PROPERTY PERM VALUE EFFECTIVE DEFAULT POSSIBLE net5 vswitchmode rw auto remote local local,remote,auto
Since the value of the EFFECTIVE field of the output is remote, LLDP has enabled reflective relay on the external switch and the communication between the VMs is through the external switch.
For more information about LLDP, see Chapter 5, Exchanging Network Connectivity Information With Link Layer Discovery Protocol, in Managing Network Datalinks in Oracle Solaris 11.2 .