Summary:
Configures traffic shaping on a Virtuozzo network.
Request specification:
Name |
Min/Max |
Type |
Description |
|
|
|
|
|
|
|
|
|
|
Network traffic shaping configuration information. |
|
|
|
|
|
Returns:
OK/Error.
Description:
The set_config
call allows to perform the following tasks:
Traffic shaping configuration data is stored in a file on the Hardware Node. When you call set_config
, the old information contained in the file is deleted first and then the new information completely replaces it. This means that if you you don't want to loose the information contained in the file already, you must first retrieve it using the get_config
call , update or add new entries to the retrieved structure, and then pass the structure to set_config
.
For more information on Virtuozzo network shaping, please refer to Virtuozzo User's Guide.
Example 1:
Adding a network class and assigning the IP addresses in the range from 192.168.0.0
to 192.168.255.255
to it. At the same time, setting the traffic rate values for the new class and a bandwidth limit for the etho
network interface.
<packet version="4.0.0" id="2">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<set_config>
<net_config>
<range>
<class_id>1</class_id>
<ip_address>
<ip>192.168.0.0</ip>
<netmask>255.255.0.0</netmask>
</ip_address>
</range>
<class>
<id>1</id>
<rate>8</rate>
<totalrate>1000</totalrate>
</class>
<interface>
<net_device_id>etho</net_device_id>
<bandwidth>102400</bandwidth>
</interface>
</net_config>
</set_config>
</vzanetworkm>
</data>
</packet>
Example 2
Turning traffic shaping on.
<packet version="4.0.0" id="2">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<set_config>
<net_config>
<shaping/>
</net_config>
</set_config>
</vzanetworkm>
</data>
</packet>
Example 3
Turning traffic shaping off.
<packet version="4.0.0" id="2">
<target>vzanetworkm</target>
<data>
<vzanetworkm>
<set_config>
<net_config/>
</set_config>
</vzanetworkm>
</data>
</packet>