Go to main content

Managing Network Virtualization and Network Resources in Oracle® Solaris 11.3

Exit Print View

Updated: April 2018
 
 

Migrating VNICs

You can move one or more VNICs from one underlying datalink to another underlying datalink without deleting and reconfiguring the VNICs. The underlying datalink can be a physical link, a link aggregation, or an etherstub.

You usually migrate a VNIC in any of the following situations:

  • When you need to replace the existing NIC with a new NIC

  • When the target NIC has more bandwidth than the existing NIC

  • When the target NIC implements certain features in hardware, such as a large receive offload (LRO), a large segment offload (LSO), and checksum

To successfully migrate VNICs, the target datalink to which the VNICs are moved must be able to accommodate the datalink properties of the VNICs. If those properties are not supported, then migration fails and the user is notified. After a successful migration, all the applications that use the VNICs continue to operate normally, provided that the target datalink is connected to the network.

Certain hardware-dependent properties might change after a VNIC migration, such as the datalink state, link speed, and MTU size. The values of these properties are inherited from the datalink to which the VNICs are migrated. You can migrate all the VNICs that are configured over a datalink or selectively migrate the specified VNICs. You can also migrate the VNICs and modify their VLAN IDs simultaneously.

To migrate all the VNICs configured over the source link to the target link, use the following command syntax:

# dladm modify-vnic –l target-link –L source-link
–l target-link

Refers to the link over which the VNICs are migrated

–L source-link

Refers to the link over which the VNICs were previously configured

Example 23  Migrating All the VNICs From a Source Link to a Target Link

In this example, all the VNICs from the source link ether0 are moved to the target link net1.

# dladm modify-vnic -l net1 -L ether0
# dladm show-vnic
LINK      OVER      SPEED         MACADDRESS         MACADDRTYPE        IDS 
vnic0     net1      1000         2:8:20:c2:39:38     random             VID:321
vnic1     net1      1000         2:8:20:5f:84:ff     random             VID:656  
vnic2     net1      1000         2:8:20:5f:84:ff     random             VID:0 

To migrate the specified VNICs configured over the source link to the target link, use the following command syntax:

# dladm modify-vnic –l target-link VNIC,VNIC,[...]

To perform selective VNIC migration, you need to specify only the target link.

Example 24  Migrating Specified VNICs From a Source Link to a Target Link

In this example, vnic0, vnic1, and vnic2 are selectively moved to the target link net1 from the source link net0.

# dladm modify-vnic -l net1 vnic0,vnic1,vnic2
# dladm show-vnic
LINK      OVER      SPEED         MACADDRESS         MACADDRTYPE        IDS 
vnic0     net1      1000         2:8:20:c2:39:38     random             VID:321
vnic1     net1      1000         2:8:20:5f:84:ff     random             VID:656  
vnic2     net1      1000         2:8:20:5f:84:ff     random             VID:0 
vnic3     net0      1000         2:8:20:5f:84:ff     random             VID:345 

To modify the VLAN IDs of the VNICs configured over the source link and migrate them to the target link simultaneously, use the following command syntax:

# dladm modify-vnic –l target-link –v vid VNIC

To assign new VLAN IDs, you must migrate the VNICs one at a time.

Example 25  Migrating and Modifying the VLAN IDs of VNICs

In this example, vnic0, vnic1, and vnic2 are migrated to the target datalink net1. With the migration, the VLAN IDs of all the VNICs are also modified simultaneously.

# dladm modify-vnic -l net1 -v 123 vnic0
# dladm modify-vnic -l net1 -v 456 vnic1
# dladm modify-vnic -l net1 -v 789 vnic2
# dladm show-vnic
LINK      OVER      SPEED         MACADDRESS         MACADDRTYPE        IDS 
vnic0     net1      1000         2:8:20:c2:39:38     random             VID:123
vnic1     net1      1000         2:8:20:5f:84:ff     random             VID:456  
vnic2     net1      1000         2:8:20:5f:84:ff     random             VID:789 

When you migrate VNICs from the source link to the target link, randomly assigned MAC addresses are unaffected and retained by their respective VNICs after migration. See Example 25, Migrating and Modifying the VLAN IDs of VNICs.

However, the MAC address will change if the VNIC is using a factory MAC address from the source link. If you do not specify a MAC address during migration, the factory MAC address of the VNIC is replaced by a randomly assigned MAC address. If you specify a MAC address with –m during migration, the factory MAC address of the VNIC is replaced by the specified MAC address.

You have multiple MAC addresses associated with VNICs created by kernel zones. When you migrate VNICs created by kernel zones, all the multiple MAC addresses associated with VNICs are migrated to the target NIC.