Previous page

Next page

Locate page in Contents

Print this page

Attaching/detaching LAN/VLAN adapters to/from a network bridge.

Linux Available on Linux only.

First, create a network bridge (if you haven't done so already) using the add call.

Use net_vlanType as a data type for the net_device element. To attach an adapter to a bridge, populate the following input parameters:

id -- the name of a physical LAN or VLAN adapter that you would like to plug into the bridge (e.g. eth0, eth1.5).

network_id -- a Virtuozzo virtual network ID that you would like to attach the network adapter to. If an adapter is already connected to a bridge and you pass a different network ID, the adapter will be disconnected from the old bridge and connected to the new bridge. To detach an adapter from a bridge, leave the network_id element empty.

vlan_id -- the VLAN adapter ID. When attaching/detaching a physical network adapter, leave the element empty (but still include it because it is mandatory according to the schema).

base_device_id -- the name of the physical network adapter with which the VLAN adapter is associated. When attaching/detaching a physical adapter, leave the element empty.

Example:

Connecting the physical network adapter eht0 to the bridge vznet6.

Input

<packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0">

<target>vzanetworkm</target>

<data>

<vzanetworkm>

<set>

<net_device xsi:type="ns2:net_vlanType">

<ns2:id>eth0</ns2:id>

<ns2:network_id>dnpuZXQ2</ns2:network_id>

<ns2:vlan_id/>

<ns2:base_device_id/>

</net_device>

</set>

</vzanetworkm>

</data>

</packet>

Example 2

Connecting the VLAN adapter eth1.5 to the bridge vznet6.

Input

<packet xmlns:ns2="http://www.swsoft.com/webservices/vzl/4.0.0/networkm" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="4.0.0">

<target>vzanetworkm</target>

<data>

<vzanetworkm>

<set>

<net_device xsi:type="ns2:net_vlanType">

<ns2:id>eth1.5</ns2:id>

<ns2:network_id>dnpuZXQ2</ns2:network_id>

<ns2:vlan_id>5</ns2:vlan_id>

<ns2:base_device_id>eth1</ns2:base_device_id>

</net_device>

</set>

</vzanetworkm>

</data>

</packet>

Please send us your feedback on this help page