L2 Network
Overview
An L2 network is a layer 2 broadcast domain used for layer 2 isolation. Generally, L2 networks are identified by names of devices on the physical network.
- VLAN, VXLAN, or SDN can be used as an L2 network and can provide layer 2 isolation.
- An L2 network is used to provide layer 2 isolation for an L3 network, as shown in L2 Network.
Four Major Types of L2 Network
An L2 network supports mainly four types.
L2NoVlanNetwork
L2NoVlanNetwork indicates that VLAN settings are not used for connecting the corresponding host.
- If you set VLAN for a switch port, make sure that the switch port is in Access mode.
- If you do not set VLAN for the switch port, do not make any operation.
- If you create an L2 network, note that a bridge will be created according to the network device that you have entered.
L2VlanNetwork
L2VlanNetwork indicates that VLAN settings are used for connecting the corresponding host.
- The switch port connected by the host must be in Trunk mode.
- The virtual LAN can be divided logically. Notice that it can support 1-4094 subnets.
- If you create an L2 network, notice that a VLAN device will be created according to the network device that you have entered. In addition, a bridge will be created according to the VLAN device.
VxlanNetwork
VxlanNetwork indicates that the VXLAN network is created by using the VNI specialized by VxlanNetworkPool of the Software SDN type.
- VxlanNetwork is created according to VxlanNetworkPool of the Software SDN type.
- Each VxlanNetwork corresponds to a VNI specialized by VxlanNetworkPool of the Software SDN type.
- VxlanNetwork can be used for creating an L3 network.
HardwareVxlanNetwork
HardwareVxlanNetwork indicates that the VXLAN network is created by using the VNI specialized by VxlanNetworkPool of the Hardware SDN type.
- HardwareVxlanNetwork is created according to VxlanNetworkPool of the Hardware SDN type.
- Each HardwareVxlanNetwork corresponds to a VNI specialized by VxlanNetworkPool of the Hardware SDN type.
- HardwareVxlanNetwork can be used for creating an L3 network.
- When you add NoVlanNetWork or VlanNetwork, enter the NIC name.
- In CentOS 7, the NIC name in the ethX format will be changed after the system reboots. In addition, the NIC sequence will also be randomly changed. We recommend that you change the NIC name of each compute node (especially for VM instances with multiple NICs) to a non-ethX format, such as em01.
Relationship Between L2 Network and Cluster/L3 Network/VM Instance
The relationship between L2 network and cluster/L3 network/VM instance is as follows:
- If you attached an L2 network to a cluster whereas the L2 network was not attached to a host, you could not add the host to the cluster.
- If you did not attach an L2 network to a cluster and the L2 network was not attached to a host, you could not attach the L2 network to the cluster.
- If you attached an L2 network to a host whereas the corresponding L2 network devices were inconsistently connected to other hosts in a cluster, note that the VM instance IP that you created would not work normally.
- You can use one L2 network to create multiple child L3 networks. If you select the HarewareVxlanNetwork L2 network to create a private network, you can only create a flat network and corresponding network services. vRouter network cannot be created by using the HarewareVxlanNetwork L2 network.
- If you delete an L2 network, notice that the corresponding L3 network will also be deleted, and that the VM NIC in the L3 network will be deleted as well.
- If you delete an L2 network, you will also delete the vRouter, VPC vRouter, and vRouter offering in the L2 network.
- If you delete the corresponding L2 network of a public network, notice that all network services of the corresponding router will be deleted, including the vRouter, VPC vRouter, vRouter offering, virtual IP, elastic IP, port forwarding, load balancing, IPsec tunnel, and Netflow.
- You can create multiple VxlanNetworks by using a VXLAN Pool of the Software SDN type. These VxlanNetworks can be applied to the flat network, vRouter network, or VPC network respectively.
- VM instances in VxlanNetwork cannot be accessed through the Internet. To access these VM instances through the Internet, use an elastic IP or port forwarding.
- You can also create multiple HardwareVxlanNetworks by using a VXLAN Pool of the Hardware SDN type. These HardwareVxlanNetworks can currently be applied to flat networks.
Inventory
Properties
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| attachedCidrs | 4.8.0 | |||
| vni | 4.8.0 | |||
| poolUuid | 4.8.0 | |||
| vlan | 4.8.0 | |||
| uuid | The UUID. For more information, see Resource Property. | 0.6 | ||
| name | The name. For more information, see Resource Property. | 0.6 | ||
| description | The description. For more information, see Resource Property. | Yes | 0.6 | |
| zoneUuid | The UUID of the parent zone. For more information, see Zone. | 0.6 | ||
| physicalInterface | The physical interface. For more information, see Physical Interface. | 0.6 | ||
| type | The L2 network type. |
|
0.6 | |
| attachedClusterUuids | The clusters to which the L2 network is attached. For more information, see Attach Cluster. | 0.6 | ||
| createDate | The creation date. For more information, see Resource Property. | 0.6 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 0.6 | ||
| attachedVtepRefs | For more information, see attachedVtepRefs Inventoy. | 4.8.0 | ||
| attachedVxlanNetworkRefs | For more information, see attachedVxlanNetworkRefs Inventoy. | 4.8.0 | ||
| attachedVniRanges | For more information, see attachedVniRanges Inventoy. | 4.8.0 |
Sample
{
"inventories": [
{
"attachedClusterUuids": [
"553c2fd2a67b4b89a6240541959b861f"
],
"createDate": "Mar 10, 2018 2:35:14 PM",
"description": "",
"lastOpDate": "Mar 10, 2018 2:35:14 PM",
"name": "L2Network-1",
"physicalInterface": "eth0",
"type": "L2NoVlanNetwork",
"uuid": "dde9685e3ba944bea8c643fe64200750",
"zoneUuid": "fa18454182eb41749797f824c00cfccf"
}
],
"success": true
}
Physical Interface
A physical interface is a string, such as eth0. The string contains information about the related L2 network in the data center. Normally, different types of the L2 network and different types of hypervisors have different physical interfaces. This is because the hypervisors use their own notations to describe L2 networks, and an L2 network can be simultaneously attached to multiple clusters of different hypervisor types.
Assume that a data center has an L2 network (L2 Network A). L2 Network A can be used across two clusters: the KVM cluster and the VMware cluster. In the KVM cluster, L2 Network A is realized by an Ethernet device in Linux operating system. In this example, assume that each KVM instance can connect to L2 Network A by using eth0. In the VMware cluster, L2 Network A is realized by vSwitch. In this example, assume that the VMware cluster can connect to L2 Network A by using vswitch0. In this regard, the entire topology can be shown as L2 Network Topology.
Many operations seemingly applied to zones and clusters are actually delegated to hosts. Here, when L2 Network A is attached to the KVM cluster and the VMware cluster, ZStack Cloud must understand how the hypervisor in these clusters use the notations to describe the L2 network. That is, eth0 on the KVM host represents the L2 network, while vswitch0 on the VMware host also represents the L2 network. Therefore, the name of a physical interface can also reflect different hypervisors.
Attach Cluster
Attaching a cluster is to associate an L2 network with the sibling clusters in the same zone. Attaching a cluster provides a flexible solution to maintain the relation between hosts and L2 networks in a data center, as shown in Attach Cluster.
Assume that the network topology in your data center is as the above. The eth0s of the hosts in all clusters are on the same L2 network (L2 Network1), while eth1s of the hosts in Cluster1 and Cluster3 are on another L2 network (L2 Network2). To describe this topology in ZStack Cloud, you can attach L2 Network1 to all the three clusters, and attach only L2 Network2 to Cluster1 and Cluster3.
Several months later, due to some business needs, you can make some modifications to the network topology. You need to unplug the Ethernet cables connected by eth1s of the hosts in Cluster3 from the rack switch. Then, you will no longer connect Cluster3 with L2 Network2. You can detach L2 Network2 from Cluster3, and notify ZStack Cloud of the network topology change, as shown in Modify the Attached Cluster.
L2NoVlanNetwork
L2NoVlanNetwork is a basic type of L2 network. NoVlan in L2NoVlanNetwork does not mean that you cannot use the VLAN technology. Contrarily, it simply means that ZStack Cloud will not take the initiative to use VLAN to create a layer 2 broadcast domain. The following two topologies can help you better understand the L2NoVlanNetwork.
As shown in Configuration of L2NoVlanNetwork 1.
In the figure above, both Port 5 and Port 12 in L2 Switch are untagged with VLAN 10 (access port with VLAN 10 in Cisco term), and connect to eth0 on Host1 and Host2 respectively. This is an effective configuration for L2NoVlanNetwork. You can use physicalInterface = eth0 to create an L2NoVlanNetwork, and attach it to Cluster.
As shown in Configuration of L2NoVlanNetwork 2.
In the figure above, both Port 5 and Port 12 in L2 Switch are tagged with VLAN 10 (trunk port with VLAN 10 in Cisco term), and connect to eth0.10 (a pre-created VLAN device) on Host1 and Host2 respectively. This is also an effective configuration for L2NoVlanNetwork. You can use physicalInterface = eth0.10 to create an L2NoVlanNetwork, and attach it to Cluster.
That is, one L2NoVlanNetwork corresponds to a pre-created layer 2 broadcast domain. ZStack Cloud will not create any new broadcast domain for an L2NoVlanNetwork.
L2NoVlanNetwork KVM Specifications
When you attach an L2NoVlanNetwork to a KVM cluster, the physicalInterface must be the Ethernet device name in a Linux operating system, such as eth0, eth0.10, and em1. When you create a bridge in ZStack Cloud by running the brctl command, note that the physicalInterface will be used as the device name. The pseudo codes are as follows:
Assuming physicalInterface = eth0
brctl create br_eth0
brctl addif br_eth0 eth0
L2NoVlanNetwork Inventory Sample
{
"inventories": [
{
"attachedClusterUuids": [
"967a353c2893409dab9312cf3033a98c"
],
"createDate": "Oct 30, 2017 1:53:20 PM",
"description": "",
"lastOpDate": "Oct 30, 2017 1:53:20 PM",
"name": "L2NoVlan",
"physicalInterface": "eth0",
"type": "L2NoVlanNetwork",
"uuid": "5f0391e0c7ed45dba5ee5ed9c638f146",
"zoneUuid": "e59b71e99d8a4ea1952b578388b8cd1d"
}
],
"success": true
}
L2VlanNetwork
L2VlanNetwork is an L2 network that ZStack Cloud will actively create a layer 2 broadcast domain by using VLAN. According to the different hypervisor types in a cluster, ZStack Cloud will use different methods to create layer 2 broadcast domains for L2 networks. Compared with l2Network inventory, an L2VlanNetwork has the following additional property.
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vlan | The VLAN ID for creating a layer 2 broadcast domain. | [0, 4095] | 0.6 |
When you attach an L2VlanNetwork to a cluster, note that ZStack Cloud will create a VLAN device on the host in the cluster. To make this operation take effect, make sure that the switch port to which the Ethernet device specified by physicalInterface connects has a VALN tag.
As shown in Configuration of L2VlanNetwork.
In the figure above, both Port 5 and Port 12 of L2 Switch are tagged with VLAN 10. You can use physicalInterface = eth0 and vlan = 10 to create an L2VlanNetwork, and attach it to Cluster.
L2VlanNetwork KVM Specifications
When you attach L2VlanNetwork to a KVM cluster, note that ZStack Cloud will create a VLAN device and a bridge on all hosts in a cluster. The pseudo codes are as follows:
Assuming physicalInterface = eth0, vlan = 10
vconfig add eth0 10
brctl create br_eth0_10
brctl addif br_eth0_10 eth0.10
L2VlanNetwork Inventory Sample
{
"inventories": [
{
"attachedClusterUuids": [],
"createDate": "Oct 30, 2017 1:41:19 PM",
"description": "",
"lastOpDate": "Oct 30, 2017 1:41:19 PM",
"name": "L2Vlan",
"physicalInterface": "eth0",
"type": "L2VlanNetwork",
"uuid": "ae97ba4adcb7404690344dde407b429c",
"vlan": 2222,
"zoneUuid": "e59b71e99d8a4ea1952b578388b8cd1d"
}
],
"success": true
}
attachedVtepRefs Inventoy
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| hostUuid | The host UUID. | 4.8.0 | ||
| vtepIp | 4.8.0 | |||
| port | 4.8.0 | |||
| type | The type of l2 network. | 4.8.0 | ||
| createDate | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| lastOpDate | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| poolUuid | 4.8.0 |
attachedVxlanNetworkRefs Inventoy
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vni | 4.8.0 | |||
| poolUuid | 4.8.0 | |||
| uuid | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| name | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| description | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| zoneUuid | The UUID of the parent zone. For more information, see Zone. | 4.8.0 | ||
| physicallnterface | The physical interface. For more information, see Physical Interface. | 4.8.0 | ||
| type | The type of l2 network. | 4.8.0 | ||
| createDate | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| lastOpDate | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| attachedClusterUuids | 4.8.0 |
attachedVniRanges Inventoy
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| name | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| description | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| startVni | 4.8.0 | |||
| endVni | 4.8.0 | |||
| createDate | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| lastOpDate | The UUID. For more information, see Resource Property. | 4.8.0 | ||
| l2NetworkUuid | The l2 network UUID. | 4.8.0 |
PhysicalSwitch Inventory
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID. For more information, see Resource Property. | 5.4.0 | ||
| description | The description. For more information, see Resource Property. | Yes | 5.4.0 | |
| name | The name. For more information, see Resource Property. | 5.4.0 | ||
| sdnControllerUuid | The SDN controller UUID. | 5.4.0 | ||
| groupBy | Groups rows into subgroups based on values of columns or expressions. This field is equivalent to the Group By clause in MySQL, such as groupBy=type. | Yes | 5.4.0 | |
| tagUuid | 5.4.0 | |||
| createDate | The creation date. For more information, see Resource Property. | 5.4.0 | ||
| lastOpDate | The last operation date. For more information, see Resource Property. | 5.4.0 | ||
| softwareVersion | The software version. | 5.4.0 | ||
| mac | 5.4.0 | |||
| mode | 5.4.0 | |||
| ports | 5.4.0 | |||
| ip | 5.4.0 | |||
| systemTags | The system tags. For more information, see CreateSystemTag. | Yes | 5.4.0 | |
| userTags | The user tags. The For more information, see CreateUserTag. | Yes | 5.4.0 |
Sample
{
"inventories": [
{
"createDate": "Oct 11, 2025 11:12:38 AM",
"ip": "172.25.1.152",
"lastOpDate": "Oct 11, 2025 11:12:38 AM",
"mac": "c0:e3:fb:65:ab:d1",
"mode": "CE6881-48S6CQ",
"name": "huawei_152",
"ports": [
{
"createDate": "Oct 11, 2025 11:12:38 AM",
"lastOpDate": "Oct 11, 2025 11:12:38 AM",
"name": "100GE1/0/1",
"portType": "IFMIPHYTYPE100GE",
"sdnControllerUuid": "4d81cdfcfa1748caaecaa4285cebe383",
"switchUuid": "b9d708c427c630b1b9fffe2d989c3a48",
"uuid": "db6003d18fe339909a31863b31846a08"
},
{
"createDate": "Oct 11, 2025 11:12:38 AM",
"ethTrunkName": "Eth-Trunk10",
"lastOpDate": "Oct 11, 2025 11:12:38 AM",
"name": "10GE1/0/11",
"portType": "IFMIPHYTYPE10GE",
"sdnControllerUuid": "4d81cdfcfa1748caaecaa4285cebe383",
"switchUuid": "b9d708c427c630b1b9fffe2d989c3a48",
"uuid": "21ce670921443be5ba7a1a028f290718"
}
],
"sdnControllerUuid": "4d81cdfcfa1748caaecaa4285cebe383",
"softwareVersion": "V200R021C00SPC200",
"uuid": "b9d708c427c630b1b9fffe2d989c3a48"
}
],
"success": true
}
Operations
CreateL2TfNetwork
Creates a tungsten fabric network. For example,
CreateL2TfNetwork name=testtf zoneUuid=b3a3bf9d1b1b44ca8631ffa3538bc59d \
physicalInterface=eth0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| ipPrefix | The IP address prefix. | Yes | 4.8.0 | |
| ipPrefixLength | The IP address prefix length. | Yes | 4.8.0 | |
| name | The resource name. | 4.8.0 | ||
| description | The detailed description of the resource. | Yes | 4.8.0 | |
| zoneUuid | The zone UUID. | 4.8.0 | ||
| physicalInterface | The physical interface. | 4.8.0 | ||
| type | The type. | Yes | 4.8.0 | |
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 4.8.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 4.8.0 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 4.8.0 | |
| vSwitchType | The vSwitch type. | Yes |
|
4.8.0 |
| timeout | Yes |
CreateL2HardwareVxlanNetwork
Creates a hardware VXLAN network. For example,
CreateL2HardwareVxlanNetwork name=test-hardvxlan zoneUuid=b3a3bf9d1b1b44ca8631ffa3538bc59d
physicalInterface=eth0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vni | The VNI number. | Yes | 3.7 | |
| poolUuid | The VXLAN resource pool UUID. | 3.7 | ||
| name | The resource name. | 3.7 | ||
| description | The detailed description of the resource. | Yes | 3.7 | |
| zoneUuid | The zone UUID. | 3.7 | ||
| physicalInterface | The physical interface. | 3.7 | ||
| type | The type. | Yes | 3.7 | |
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 3.7 | |
| tagUuids | The tag UUID list. | Yes | 3.7 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 3.7 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 3.7 | |
| vSwitchType | The vSwitch type. | Yes |
|
0.6 |
| isolated | Yes | 5.0.0 | ||
| pvlan | Yes | 5.0.0 | ||
| h3cTenantUuid | Yes | 5.4.0 | ||
| vlan | Yes | 5.4.0 |
When you create a L2 network in ZStack Cloud, you can record the Huawei iMaster VPC UUID associated with the hardware VXLAN network by adding the huaweiVpcUuid option to SystemTags.
- Format:
huaweiVpcUuid::{%s} - Example:
huaweiVpcUuid:: bf4eb98c0bb74441a652715f1c9a065d
- Format:
When you create a L2 network in ZStack Cloud, you can record the Huawei iMaster tenant UUID associated with the hardware VXLAN network by adding the huaweiTenantUuid option to SystemTags.
- Format:
huaweiTenantUuid::{%s} - Example:
huaweiTenantUuid:: e9218d9e4a2e4a029d33ce6a683d44e8
- Format:
CreateL2HardwareVxlanNetworkPool
Creates a L2 hardware VXLAN network pool. For example,
CreateL2HardwareVxlanNetworkPool name=test-hardvlanpool sdnControllerUuid=0b2231798a5c3971811ca4c9647776b8 zoneUuid=b3a3bf9d1b1b44ca8631ffa3538bc59d
physicalInterface=eth0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| sdnControllerUuid | The SDN controller UUID. | 4.8.0 | ||
| name | The resource name. | 4.8.0 | ||
| description | The detailed description of the resource. | Yes | 4.8.0 | |
| zoneUuid | The zone UUID. | 4.8.0 | ||
| physicalInterface | The physical interface. | 4.8.0 | ||
| type | The type. | Yes | 4.8.0 | |
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 4.8.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 4.8.0 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 4.8.0 | |
| vSwitchType | The vSwitch type. | Yes |
|
4.1.2 |
| tagUuid | The tag UUID list. | Yes | 4.8.0 | |
| isolated | Yes | 4.8.0 | ||
| pvlan | Yes | 4.8.0 | ||
| startVlan | Yes | 5.4.0 | ||
| endVlan | Yes | 5.4.0 |
CreateL2VxlanNetwork
Creates a VXLAN network. For example,
CreateL2VxlanNetwork name=L2VXLAN zoneUuid=e59b71e99d8a4ea1952b578388b8cd1d \
physicalInterface=eth0 poolUuid=1cac60dd6f124861aa99d85f51a9b4fe
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| poolUuid | Yes | 4.8.0 | ||
| name | The common L2 network name. | 0.6 | ||
| description | The detailed description of the common L2 network. | Yes | 0.6 | |
| zoneUuid | The zone UUID. | 0.6 | ||
| physicalInterface | The physical interface. | 0.6 | ||
| poolUuid | The VXLAN pool UUID. | 0.6 | ||
| vni | The VXLAN network ID. | Yes | 0.6 | |
| type | The type. | Yes | 0.6 | |
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| vSwitchType | The vSwitch type. | Yes |
|
4.8.0 |
| timeout | Yes |
QueryL2VxlanNetwork
Queries a VXLAN network. For example,
QueryL2VxlanNetwork uuid=6e287827ec1f4927a90637e7c96ca92e
QueryL2VxlanNetwork zone.uuid=e59b71e99d8a4ea1952b578388b8cd1d
Primitive Fields of Query
See L2 VxlanNetwork Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| cluster | Cluster Inventory. | All clusters to which the L2 network is attached. | 0.6 |
| l3Network | L3 Network Inventory. | The L3 network that belongs to the L2 network. | 0.6 |
| vxlanPool | VXLAN Pool Inventory | The VXLAN pool of the L2 network. | 0.6 |
| zone | Zone Inventory. | The parent zone. | 0.6 |
CreateL2VxlanNetworkPool
Creates a VXLAN pool. For example,
CreateL2VxlanNetworkPool name=testvxlan zoneUuid=8abab36040884e6fbec05fa70c5ef873 \
physicalInterface=eth0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The VXLAN pool name. | 0.6 | ||
| description | The detailed description of the VXLAN pool. | Yes | 0.6 | |
| zoneUuid | The zone UUID. | 0.6 | ||
| physicalInterface | The physical interface. | 0.6 | ||
| type | The type. | Yes | 0.6 | |
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| vSwitchType | The vSwitch type. | Yes |
|
4.8.0 |
| timeout | Yes |
QueryL2VxlanNetworkPool
Queries a VXLAN pool. For example,
QueryL2VxlanNetworkPool uuid=064a634df0b742e89d088655454ce63d
QueryL2VxlanNetworkPool zone.uuid=8abab36040884e6fbec05fa70c5ef873
Primitive Fields of Query
See L2 VxlanNetworkPool Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| attachedVniRanges | Attached VNI Range Inventory | 0.6 | |
| attachedVtepRefs | Attached VTEP Reference Inventory | 0.6 | |
| attachedVxlanNetworkRefs | Attached VxlanNetwork Reference Inventory | 0.6 | |
| cluster | Cluster Inventory | All clusters to which the L2 network is attached. | 0.6 |
| l2VxlanNetwork | L2VxlanNetwork Inventory | 0.6 | |
| l3Network | L3 Network Inventory | The L3 network that belongs to the L2 network. | 0.6 |
| vniRange | VNI Range Inventory | 0.6 | |
| vtep | VTEP Inventory | The VXLAN tunnel endpoint. | 0.6 |
| zone | Zone Inventory | The parent zone. | 0.6 |
CreateL2VlanNetwork
Creates an L2 VLAN network. For example,
CreateL2VlanNetwork name=testvlan zoneUuid=8abab36040884e6fbec05fa70c5ef873 \
physicalInterface=eth0 vlan=2637
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vlan | 0.6 | |||
| name | The L2 VLAN network name. | 0.6 | ||
| description | The detailed description of the L2 VLAN network. | Yes | 0.6 | |
| zoneUuid | The zone UUID. | 0.6 | ||
| physicalInterface | The physical interface. | 0.6 | ||
| type | Yes | 0.6 | ||
| vSwitchType | The vSwitch type. | Yes |
|
4.8.0 |
| resourceUuid | The resource UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| isolated | Yes | 5.0.0 | ||
| timeout | Yes |
When you create an L2 VLAN network in ZStack Cloud, you can enable SR-IOV by adding the enableSRIOV option to SystemTags.
- Format of the enableSRIOV option:
enableSRIOV - Example:
enableSRIOV
- Format of the enableSRIOV option:
QueryL2VlanNetwork
Queries an L2 VLAN network. For example,
QueryL2VlanNetwork physicalInterface=eth0
QueryL2VlanNetwork zone.cluster.zoneUuid=8abab36040884e6fbec05fa70c5ef873
Primitive Fields of Query
See L2 VLAN Network Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| l3Network | L3 Network Inventory | The L3 network that belongs to the L2 network. | 0.6 |
| cluster | Cluster Inventory | All clusters to which the L2 network is attached. | 0.6 |
| zone | Zone Inventory | The parent zone. | 0.6 |
CreateL2NoVlanNetwork
Creates a common L2 network. For example,
CreateL2NoVlanNetwork name=management-network physicalInterface=eth0 \
zoneUuid=9a94e647a9f64bb392afcdc5396cc1e4
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The common L2 network name. | 0.6 | ||
| description | The detailed description of the common L2 network. | Yes | 0.6 | |
| zoneUuid | The zone UUID. | 0.6 | ||
| physicalInterface | The physical interface. | 0.6 | ||
| type | The type. | Yes | 0.6 | |
| vSwitchType | The vSwitch type. | Yes |
|
4.8.0 |
| isolated | Yes | 5.3.20 | ||
| pvlan | Yes | 5.3.20 | ||
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| tagUuids | The tag UUID list. | Yes | 4.8.0 | |
| timeout | Yes |
When you create a normal L2 network in ZStack Cloud, you can enable SR-IOV by adding the enableSRIOV option to SystemTags.
- Format of the enableSRIOV option:
enableSRIOV - Example:
enableSRIOV.
- Format of the enableSRIOV option:
DeleteL2Network
Deletes an L2 network. For example,
DeleteL2Network uuid=a5535531eb7346ce89cfd7e643ad1ef8
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The L2 network UUID. | 0.6 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
QueryL2Network
Queries an L2 network. For example,
QueryL2Network physicalInterface=eth0
QueryL2Network l3Network.ipRanges.startIp=192.168.0.2
Primitive Fields of Query
See L2 Network Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| l3Network | L3 Network Inventory | The L3 network that belongs to the L2 network. | 0.6 |
| cluster | Cluster Inventory | All clusters to which the L2 network is attached. | 0.6 |
| zone | Zone Inventory | The parent zone. | 0.6 |
DetachL2NetworkFromCluster
Detaches an L2 network from a cluster. For example,
DetachL2NetworkFromCluster clusterUuid=2379a0d00ae242df91189f6d7d9e23e3 \
l2NetworkUuid=cc42d175ed9649558af69b8a0b824b9a
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| l2NetworkUuid | The L2 network UUID. | 0.6 | ||
| clusterUuid | The cluster UUID. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
ChangeL2NetworkVlanId
Changes the VLAN ID of an L2 network. For example,
ChangeL2NetworkVlanId uuid=808756594f2f3ce8bc33ca92499b7653 vlan=1
Parameters
| Name | Description | Optional | Valid Values | Starting Version |
|---|---|---|---|---|
| uuid | The L2 network UUID. | 5.1.0 | ||
| vlan | The VLAN ID. | Yes | 5.1.0 | |
| type | The L2 network type. | Yes | 5.1.0 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 5.1.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 5.1.0 | |
| tagUuid | The tag UUID list. | Yes | 5.1.0 | |
| timeout | Yes | 5.1.0 |
UpdateL2Network
Updates an L2 network. For example,
UpdateL2Network uuid=cc42d175ed9649558af69b8a0b824b9a
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The L2 network UUID. | 0.6 | ||
| name | The common L2 network name. | Yes | 0.6 | |
| description | The detailed description of the common L2 network. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
GetL2NetworkTypes
Obtains an L2 network type. Sample response:
{
"l2NetworkTypes": [
"VxlanNetworkPool",
"VxlanNetwork",
"L2NoVlanNetwork",
"L2VlanNetwork"
]
}
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
AttachL2NetworkToCluster
Attaches an L2 network to a cluster. For example,
AttachL2NetworkToCluster clusterUuid=2379a0d00ae242df91189f6d7d9e23e3 \
l2NetworkUuid=cc42d175ed9649558af69b8a0b824b9a
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| l2NetworkUuid | The L2 network UUID. | 0.6 | ||
| clusterUuid | The cluster UUID. | 0.6 | ||
| l2ProviderType | The L2 provider type. | Yes |
|
4.8.0 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
CreateVniRange
Creates a VNI range. For example,
CreateVniRange name=vni startVni=8034 endVni=9322 l2NetworkUuid=1cac60dd6f124861aa99d85f51a9b4fe
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The VNI range name. | 0.6 | ||
| description | The detailed description of the VNI range. | Yes | 0.6 | |
| startVni | 0.6 | |||
| endVni | 0.6 | |||
| l2NetworkUuid | The VXLAN pool UUID. | 0.6 | ||
| resourceUuid | The resource UUID. If specified, the image will use the specified value as the UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The user tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
DeleteVniRange
Deletes a VNI range. For example,
DeleteVniRange uuid=d0b6064810d945c582448fed6cb98d54
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The VNI range UUID. | 0.6 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
0.6 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 0.6 | |
| timeout | Yes |
QueryVniRange
Queries a VNI range. For example,
QueryVniRange uuid=d0b6064810d945c582448fed6cb98d54
QueryVniRange vxlanPool.uuid=1cac60dd6f124861aa99d85f51a9b4fe
Primitive Fields of Query
See VNI Range Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vxlanPool | VXLAN Pool Inventory | 0.6 |
UpdateVniRange
Updates a VNI range. For example,
UpdateVniRange uuid=d0b6064810d945c582448fed6cb98d54
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The VNI range UUID. | 3.3.0 | ||
| name | Yes | 3.3.0 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 3.3.0 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 3.3.0 | |
| timeout | Yes |
QueryPhysicalSwitch
Queries a physical switch. For example,
QueryPhysicalSwitch
Primitive Fields of Query
GetVSwitchTypes
Get the VSwitch type. For example,
GetVSwitchTypes name=test-vswitchtype zoneUuid=b3a3bf9d1b1b44ca8631ffa3538bc59d \
physicalInterface=eth0
Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is L2NetworkVO. | Yes | 4.8.0 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is L2NetworkVO. | Yes | 4.8.0 | |
| timeout | Yes |
Tags
You can create a user tag on an L2 network by using resourceType=L2NetworkVO. For example,
CreateUserTag resourceType=L2NetworkVO tag=publicL2 \
resourceUuid=cff4be8694174b0fb831a9fe53b1d62b
