Oracle® VM Server for SPARC 3.2 Administration Guide

Exit Print View

Updated: May 2015
 
 

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 11-4  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 11-5  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 11-6  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 11-7  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 vnet0 virtual network device has a bandwidth limit of 15 Mbps. If no bandwidth limit is set, the MAXBW field is blank.

primary# ldm list-bindings
...
VSW
  NAME         MAC               NET-DEV   ID   DEVICE   LINKPROP
   primary-vsw0 00:14:4f:f9:95:97 net0      0    switch@0 1
 
   DEFAULT-VLAN-ID PVID VID       MTU   MODE   INTER-VNET-LINK
   1               1              1500         on
 
   PEER       MAC               PVID VID MTU  MAXBW  LINKPROP INTERVNETLINK
   vnet0@ldg1 00:14:4f:fb:b8:c8 1        1500 15
 
...
 
   NAME             STATE      FLAGS   CONS    VCPU  MEMORY   UTIL  UPTIME
   ldg1             bound      ------  5000    8     2G
 
   NETWORK
      NAME             SERVICE                     ID   DEVICE     
      vnet0            primary-vsw0@primary        0    network@0
 
      MAC               MODE   PVID VID     MTU   MAXBW      LINKPROP
      00:14:4f:fb:b8:c8 1                   1500  15

      PEER                        MAC               MODE   PVID VID
      primary-vsw0@primary        00:14:4f:f9:95:97  1
 
      MTU   MAXBW      LINKPROP         
      1500

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

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