Virtual network interface is a software-only interface that does not have any hardware associated with it. This interface does not send or receive any data because there is no physical hardware associated with it. This interface provides a datalink provider interface (DLPI) and identifies itself with an IP address with a private media type. The virtual network interface is configured by using the ipadm command.
The virtual network interface can handle both IPv4 and IPv6 packets. By default, the interface is enabled for both IPv4 and IPv6 addresses when the interface is created. The virtual network interfaces are persistent.
This interface is useful in hosting an IP address when you use it in conjunction with the usesrc interface property of the IP interface. The virtual interface is also useful in hosting a virtual IP address that is used for Integrated Load Balancer (ILB) in the Direct Server Return (DSR) mode. A back end server in an ILB set up needs to have the virtual IP (VIP) address of an ILB rule hosted by a virtual interface so that the server accepts packets from client destined to the VIP. For more information about ILB, see Configuring ILB for High Availability By Using the DSR Topology in Configuring an Oracle Solaris 11.3 System as a Router or a Load Balancer.
You can create a virtual network interface by using the ipadm create-vni command.Example 40 Creating a Virtual Network Interfaces for ILB in DSR mode
Assume that you have an ILB DSR set up with a virtual server IP address 192.0.2.200 and the VIP needs to be hosted in each of the back end servers. You can create the virtual network interface to host the VIP in the back end servers.
# ipadm create-vni vip0 # ipadm create-addr -T static -a 192.0.2.200/32 vip0/v4
In this example, a back end server accepts ILB forwarded packets from a client to the VIP 192.0.2.200.