Go to main content

Oracle® VM Server for SPARC 3.5 Administration Guide

Exit Print View

Updated: November 2017
 
 

Controlling the Amount of Physical Network Bandwidth That Is Consumed by a Virtual Network Device

The bandwidth resource control feature enables you to limit the physical network bandwidth consumed by a virtual network device. This feature is supported on a service domain that runs at least the Oracle Solaris 11 OS and is configured with a virtual switch. Oracle Solaris 10 service domains silently ignore network bandwidth settings. This feature ensures that one guest domain does not take over the available physical network bandwidth and leave none for the others.

Use the ldm add-vnet and ldm set-vnet commands to specify the bandwidth limit by providing a value for the maxbw property. Use the ldm list-bindings or the ldm list-domain -o network command to view the maxbw property value for an existing virtual network device. The minimum bandwidth limit is 10 Mbps.

Network Bandwidth Limitations

The bandwidth resource control applies only to the traffic that goes through the virtual switch. Thus, inter-vnet traffic is not subjected to this limit. If you do not have a physical backend device configured, you can ignore bandwidth resource control.

The minimum supported bandwidth limit depends on the Oracle Solaris network stack in the service domain. The bandwidth limit can be configured with any desired high value. There is no upper limit. The bandwidth limit ensures only that the bandwidth does not exceed the configured value. Thus, you can configure a bandwidth limit with a value greater than the link speed of the physical network device that is assigned to the virtual switch.

Setting the Network Bandwidth Limit

Use the ldm add-vnet command to create a virtual network device and specify the bandwidth limit by providing a value for the maxbw property.

primary# ldm add-vnet maxbw=limit if-name vswitch-name domain-name

Use the ldm set-vnet command to specify the bandwidth limit for an existing virtual network device.

primary# ldm set-vnet maxbw=limit if-name domain-name

You can also clear the bandwidth limit by specifying a blank value for the maxbw property:

primary# ldm set-vnet maxbw= if-name domain-name

The following examples show how to use the ldm command to specify the bandwidth limit. The bandwidth is specified as an integer with a unit. The unit is M for megabits-per-second or G for gigabits-per-second. The unit is megabits-per-second if you do not specify a unit.

Example 41  Setting the Bandwidth Limit When Creating a Virtual Network Device

The following command creates a virtual network device (vnet0) that has a bandwidth limit of 100 Mbps.

primary# ldm add-vnet maxbw=100M vnet0 primary-vsw0 ldg1

The following command would issue an error message when attempting to set a bandwidth limit below the minimum value, which is 10 Mbps.

primary# ldm add-vnet maxbw=1M vnet0 primary-vsw0 ldg1
Example 42  Setting the Bandwidth Limit on an Existing Virtual Network Device

The following commands sets the bandwidth limit to 200 Mbps on the existing vnet0 device.

Depending on the real-time network traffic pattern, the amount of bandwidth might not reach the specified limit of 200 Mbps. For example, the bandwidth might be 95 Mbps, which does not exceed the 200 Mbps limit.

primary# ldm set-vnet maxbw=200M vnet0 ldg1

The following command sets the bandwidth limit to 2 Gbps on the existing vnet0 device.

Because there is no upper limit on bandwidth in the MAC layer, you can still set the limit to be 2 Gbps even if the underlying physical network speed is less than 2 Gbps. In such a case, there is no bandwidth limit effect.

primary# ldm set-vnet maxbw=2G vnet0 ldg1
Example 43  Clearing the Bandwidth Limit on an Existing Virtual Network Device

The following command clears the bandwidth limit on the specified virtual network device (vnet0). By clearing this value, the virtual network device uses the maximum bandwidth available, which is provided by the underlying physical device.

primary# ldm set-vnet maxbw= vnet0 ldg1
Example 44  Viewing the Bandwidth Limit of an Existing Virtual Network Device

The ldm list-bindings command shows the value of the maxbw property for the specified virtual network device, if defined.

The following command shows that the vnet3 virtual network device has a bandwidth limit of 15 Mbps. If no bandwidth limit is set, the MAXBW field is blank.

primary# ldm ls-bindings -e -o network ldg3
NAME
ldg3

MAC
    00:14:4f:f8:5b:12

NETWORK
    NAME         SERVICE                MACADDRESS PVID|PVLAN|VIDs
    ----         -------                ---------- ---------------
    vnet3        primary-vsw0@primary   00:14:4f:fa:ba:b9 1|--|--
            DEVICE     :network@0       ID   :0
            LINKPROP   :--              MTU  :1500
            MAXBW      :15M             MODE :--
            CUSTOM     :disable
            PRIORITY   :--              COS  :--
            PROTECTION :--

        PEER                   MACADDRESS          PVID|PVLAN|VIDs
        ----                   ----------          ---------------
        primary-vsw0@primary   00:14:4f:f9:08:28   1|--|--
            LINKPROP   :--              MTU  :1500
            MAXBW      :--              LDC  :0x0
            MODE       :--

You can also use the dladm show-linkprop command to view the maxbw property value as follows:

# dladm show-linkprop -p maxbw
LINK              PROPERTY PERM VALUE  EFFECTIVE DEFAULT POSSIBLE
...
ldoms-vsw0.vport0 maxbw    rw   15     15        --      --