JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Using Virtual Networks in Oracle Solaris 11.1     Oracle Solaris 11.1 Information Library
search filter icon
search icon

Document Information

Preface

1.  Network Virtualization and Resource Management in Oracle Solaris

2.  Creating and Administering Virtual Networks in Oracle Solaris

Configuring the Components of Network Virtualization

How to Configure VNICs and Etherstubs

How to Configure VNICs With VLAN IDs

Building Virtual Networks

How to Configure a Zone for the Virtual Network

How to Reconfigure a Zone to Use a VNIC

How to Create a Private Virtual Network

Other Administrative Tasks for VNICs

Modifying the VLAN ID of a VNIC

Modifying VNIC MAC Addresses

Migrating VNICs

Displaying VNIC Information

How to Delete a VNIC

3.  Managing Network Resources in Oracle Solaris

4.  Monitoring Network Traffic and Resource Usage in Oracle Solaris

Index

Other Administrative Tasks for VNICs

This section describes tasks you can perform on VNICs after performing basic configuration. This section covers the following topics:


Note - VNICs can be configured as VLANs. A parallel subcommand, dladm modify-vlan, enables you to modify direct VLANs that have been created with the dladm create-vlan command.. You must use the correct subcommand depending on whether you are modifying VLANs or VNICs configured as VLANs. Use the modify-vlan subcommand on VLANs displayed by the dladm show-vlan subcommand. Use the modify-vnic subcommand on VNICs, including those with VLAN IDs,, displayed by the dladm show-vnic subcommand. To modify direct VLANs, see Modifying VLANs in Managing Oracle Solaris 11.1 Network Performance.


Two types of VNIC modification are available:

You can modify the following attributes: the VLAN ID, the MAC address, and the underlying link. Modifying the underlying link means moving a VNIC to another datalink. The following sections discuss these modifications in detail.

Modifying the VLAN ID of a VNIC

To change a VNIC's VLAN ID, use one of the following commands:

Modifying VNIC MAC Addresses

VNICs have unique MAC addresses. To modify these addresses, use one of the following commands as appropriate to your specific circumstances:

You can modify a VNIC's VLAN ID and MAC address with a single command. However, be careful about using commands to modify multiple VNIC attributes globally, which might cause unexpected behavior. Changing multiple attributes one VNIC at a time is preferable to changing multiple attributes of a group of VNICs all at the same time.

The following example shows the output before and after you modify a VNIC's VLAN ID and MAC address:

# dladm show-vnic vnic0
LINK      OVER     SPEED  MACADDRESS        MACADDRTYPE    VID
vnic0     net0     1000   2:8:20:ec:c4:1d   random         0
# dladm modify-vnic -m random -v 123 vnic0
# dladm show-vnic vnic0
LINK      OVER     SPEED  MACADDRESS        MACADDRTYPE    VID
vnic0     net0     1000   2:8:20:0:1:2      random         123

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 link can be a physical link, a link aggregation, or an etherstub.

To successfully migrate VNICs, the underlying 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 VNICs remain connected to the network.

Certain hardware-dependent properties might change after a VNIC migration, such as the datalink state, link speed, MTU size, and so on. The values of these properties are inherited from the datalink to which the VNICs are migrated.

You can also migrate VNICs globally or selectively. Global migration means that you migrate all the VNICs over a datalink to another datalink. To perform a global migration, you only need to specify the source datalink and the target datalink. The following example moves all the VNICs from ether0 to net1:

# dladm modify-vnic -l net1 -L ether0

where


Note - You must specify the destination datalink before the source datalink.


To perform selective VNIC migration, you specify the VNICs that you want to move. The following example moves selected VNICs from net0 to net1:

# dladm modify-vnic -l net1 vnic0,vnic1,vnic2

Note - The -L option is restricted to global modification only.


While migrating a group of VNICs, you can also modify their VLAN IDs at the same time. However, to assign new VLAN IDs, you must migrate the VNICs one at a time, as shown in the following example:

# dladm modify-vnic -l net1 -v 123 vnic0
# dladm modify-vnic -l net1 -v 456 vnic1
# dladm modify-vnic -l net1 -v 789 vnic2

The effects of migration on the MAC address depend on whether the VNIC is using a factory MAC address from the source datalink.

Randomly assigned MAC addresses are unaffected and are retained by their respective VNICs after migration.

The following example shows how to migrate multiple VNICs. Note that the VNICs are using randomly assigned MAC addresses. Thus, these addresses are unchanged after migration.

# dladm show-vnic
LINK      OVER     SPEED  MACADDRESS        MACADDRTYPE    VID
vnic1     net0     1000   2:8:20:c2:39:38   random         0
vnic2     net0     1000   2:8:20:5f:84:ff   random         0

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

Displaying VNIC Information

To obtain information about the VNICs on your system, use the dladm show-vnic command.

# dladm show-vnic
LINK      OVER     SPEED         MACADDRESS          MACADDRTYPE
vnic1     net0     1000 Mbps     2:8:20:c2:39:38     random
vnic2     net0     1000 Mbps     2:8:20:5f:84:ff     random

VNICs are also datalinks. Thus, you can also use any dladm command that shows information about datalinks to include information about VNICs if these exist on the system. For example, dladm show-link includes VNICs on the list. Or, you can use the dladm show-linkprop command to check the properties of VNICs. To obtain property information about a single VNIC, specify the VNIC when you display link properties:

# dladm show-linkprop [-p property] vnic

How to Delete a VNIC

This procedure explains how to delete a VNIC configuration from the system. The steps assume that the VNIC is attached to a zone. You must be in the global zone to perform this procedure.

  1. Because the VNIC is attached to a zone, halt the zone.
    global# zoneadm -z zone halt

    Note - To determine the links used by a zone, use the dladm show-link command.


  2. Remove or detach the VNIC from the zone.
    global# zonecfg -z zone remove net physical=vnic
  3. Delete the VNIC from the system.
    global# dladm delete-vnic vnic
  4. Reboot the zone.
    global# zonecfg -z zone boot

Example 2-5 Deleting a VNIC From the System

In this example, vnic1 is removed from zoneB and from the system.

Global# dladm show-link
LINK            CLASS   MTU    STATE   OVER
net0            phys    1500   up      --
net2            phys    1500   up      --
net1            phys    1500   up      --
net3            phys    1500   up      --
zoneA/net0      vnic    1500   up      net0
zoneB/net0      vnic    1500   up      net0
vnic0           vnic    1500   up      net1
zoneA/vnic0     vnic    1500   up      net1
vnic1           vnic    1500   up      net1
zoneB/vnic1     vnic    1500   up      net1

Global# zoneadm -z zoneB halt
Global# zonecfg -z zoneB remove net physical=vnic1
Global# dladm delete-vnic vnic1
Global# zonecfg -z zoneB reboot