Route Resource
Overview
A virtual router network (vRouter network) mainly uses custom Linux VM instances as route devices. The vRouter VM instances provide many network services, such as DHCP, DNS, SNAT, vRouter table, elastic IP (EIP), port forwarding, load balancing, IPsec tunnel, and security group.
- vRouter image: Encapsulates many network services, and is used only to create vRouters.
- vRouter offering: Defines the resources used by a vRouter, including the CPU, memory, vRouter image, public network, and management network.
- vRouter: Acts as a custom Linux VM instance and provides network services such as DHCP, DNS, SNAT, route table, EIP, port forwarding, load balancing, IPsec tunnel, and security group.
vRouter Network Topology
- Public network
Provides virtual IPs for user VM instances that use EIP, port forwarding, load balancing, and IPsec tunnel. Generally, the public network must be accessible to the Internet.
- Management network
Manages and controls the corresponding physical resources, such as a host, backup storage, and primary storage, of whose resources can be reached by using an IP address.
- Private network
Also known as the business network or the access network and is the internal network used by VM instances.
- You can combine the public network and the management network, while
deploying the private network independently, as shown in Deployment
Mode-1.
Figure 1. Deployment Mode-1 
- You can deploy the public network, management network, and private network
separately, as shown in Deployment Mode-2.
Figure 2. Deployment Mode-2 
vRouter Network Service
The vRouter VM instances provide a collection of network services, including the DHCP, DNS, SNAT, route table, EIP, port forwarding, load balancing, IPsec tunnel, and security group.
- DHCP
- In a vRouter, the DHCP service is provided by the flat network by default.
- DNS
- A vRouter can act as a DNS server to provide the DNS service.
- The DNS address in a vRouter VM instance is the vRouter IP address. Note that the DNS address that you set is forwarded by the vRouter.
- SNAT
- A vRouter can act as a router to translate the source network address for VM instances.
- VM instances can directly access the Internet by using SNAT.
- We will introduce the vRouter table, security group, EIP, port forwarding, load balancing, and IPsec in specific sections.
Inventory
Properties
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| 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 | |
| agentPort | 0.6 | |||
| allocatorStrategy | The allocator strategy. |
|
0.6 | |
| applianceVmType | The type of special VM instance. | 0.6 | ||
| clusterUuid | The cluster UUID. | 0.6 | ||
| zoneUuid | The zone UUID. | 0.6 | ||
| cpuNum | The CPU count. | 0.6 | ||
| cpuSpeed | 0.6 | |||
| defaultL3NetworkUuid | The default L3 network UUID. | 0.6 | ||
| defaultRouteL3NetworkUuid | The UUID of the L3 network that provides default routing in a vRouter VM instance. | 0.6 | ||
| hostUuid | The host UUID. | 0.6 | ||
| lastHostUuid | The UUID of the host where the vRouter VM instance was located last time. | 0.6 | ||
| imageUuid | The image UUID. | 0.6 | ||
| rootVolumeUuid | The root volume UUID. | 0.6 | ||
| instanceOfferingUuid | The instance offering UUID. | 0.6 | ||
| managementNetworkUuid | The management network UUID. | 0.6 | ||
| publicNetworkUuid | The public network UUID. | 0.6 | ||
| memorySize | The memory size. | 0.6 | ||
| hypervisorType | The hypervisor type. | 0.6 | ||
| platform | 0.6 | |||
| state | The state. |
|
0.6 | |
| status | The status. | 0.6 | ||
| groupBy | ||||
| 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 | ||
| type | The type. |
|
0.6 |
Sample
{
"inventories": [
{
"agentPort": 7272,
"allVolumes": [
{
"actualSize": 293641216,
"createDate": "Nov 10, 2017 2:59:57 PM",
"description": "Root volume for VM[uuid:f90177b78a3d4f399f32bf84af32afde]",
"deviceId": 0,
"format": "qcow2",
"installPath": "/Cloud_ps_nxs/rootVolumes/acct-36c27e8ff05c4780bf6d2fa65700f22e/vol-47401aeef0b54ec\
f90b831f2e250c098/47401aeef0b54ecf90b831f2e250c098.qcow2",
"isShareable": false,
"lastOpDate": "Nov 10, 2017 2:59:57 PM",
"name": "ROOT-for-vrouter.l3.L3-vRouter-2.e293d6",
"primaryStorageUuid": "cae8726c90784ba0946f852952731268",
"rootImageUuid": "ef614d2e1db7536a8fb8260a05074ae4",
"size": 8589934592,
"state": "Enabled",
"status": "Ready",
"type": "Root",
"uuid": "47401aeef0b54ecf90b831f2e250c098",
"vmInstanceUuid": "f90177b78a3d4f399f32bf84af32afde"
}
],
"allocatorStrategy": "LeastVmPreferredHostAllocatorStrategy",
"applianceVmType": "vrouter",
"clusterUuid": "967a353c2893409dab9312cf3033a98c",
"cpuNum": 1,
"cpuSpeed": 0,
"createDate": "Nov 10, 2017 2:59:57 PM",
"defaultRouteL3NetworkUuid": "cdb7f3151c50453ba0e8c89356e250f6",
"hostUuid": "aec5230c3eee40e4998bec50a1c2eae8",
"hypervisorType": "KVM",
"imageUuid": "ef614d2e1db7536a8fb8260a05074ae4",
"instanceOfferingUuid": "fa550cb9bdcc4fd397ae37f9ddf4c390",
"lastHostUuid": "aec5230c3eee40e4998bec50a1c2eae8",
"lastOpDate": "Nov 16, 2017 11:07:30 AM",
"managementNetworkUuid": "cdb7f3151c50453ba0e8c89356e250f6",
"memorySize": 1073741824,
"name": "vrouter.l3.L3-vRouter-2.e293d6",
"platform": "Linux",
"publicNetworkUuid": "cdb7f3151c50453ba0e8c89356e250f6",
"rootVolumeUuid": "47401aeef0b54ecf90b831f2e250c098",
"state": "Running",
"status": "Connected",
"type": "ApplianceVm",
"uuid": "f90177b78a3d4f399f32bf84af32afde",
"vmNics": [
{
"createDate": "Nov 10, 2017 2:59:57 PM",
"deviceId": 1,
"gateway": "192.168.23.1",
"ip": "192.168.23.1",
"l3NetworkUuid": "e293d67b0e4a4b438f15b768cacb6eaf",
"lastOpDate": "Nov 10, 2017 2:59:57 PM",
"mac": "fa:63:dd:7a:56:01",
"metaData": "4",
"netmask": "255.255.255.0",
"uuid": "281f9ac039c44bb18337217543e551ea",
"vmInstanceUuid": "f90177b78a3d4f399f32bf84af32afde"
},
{
"createDate": "Nov 10, 2017 2:59:57 PM",
"deviceId": 0,
"gateway": "10.0.0.1",
"ip": "10.141.26.16",
"l3NetworkUuid": "cdb7f3151c50453ba0e8c89356e250f6",
"lastOpDate": "Nov 10, 2017 2:59:57 PM",
"mac": "fa:31:50:c4:d3:00",
"metaData": "3",
"netmask": "255.0.0.0",
"uuid": "402dc6bf37734753be3661be3d120652",
"vmInstanceUuid": "f90177b78a3d4f399f32bf84af32afde"
}
],
"zoneUuid": "e59b71e99d8a4ea1952b578388b8cd1d"
}
],
"success": true
}
Operations
QueryVirtualRouterVm
QueryVirtualRouterVm uuid=efb08e965ba4414fa7320e968178d442QueryVirtualRouterVm host.uuid=1fc14d00738e468f9aeb791516e97c6aPrimitive Fields of Query
See Appliance VM Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vmNics | VM NIC Inventory | The NICs of the vRouter VM instance. | 0.6 |
| allVolumes | Volume Inventory | The volumes of the vRouter VM instance. | 0.6 |
| host | Host Inventory | The host on which the vRouter VM instance is running. | 0.6 |
| cluster | Cluster Inventory | The cluster to which the vRouter VM instance is attached. | 0.6 |
| image | Image Inventory | The image used for creating the vRouter VM instance. | 0.6 |
| zone | Zone Inventory | The zone to which the vRouter VM instance belongs. | 0.6 |
| rootVolume | Volume Inventory | The root volume of the vRouter VM instance. | 0.6 |
| virtualRouterOffering | vRouter Offering Inventory | The vRouter offering of the vRouter VM instance. | 0.6 |
| eip | EIP Inventory | The EIP that the vRouter VM instance serves. | 0.6 |
| vip | VIP Inventory | The VIP that the vRouter VM instance serves. | 0.6 |
| portForwarding | Port Forwarding rule Inventory | The port forwarding that the vRouter VM instance serves. | 0.6 |
| loadBalancer | Load Balancer Inventory | The load balancing that the vRouter VM instance serves. | 0.6 |
ReconnectVirtualRouter
ReconnectVirtualRouter vmInstanceUuid=698c538be5414ac7b04b19f4daa29f74Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vmInstanceUuid | The UUID of the vRouter VM instance. | 0.6 | ||
| userTags | The user tags. For more information, see CreateUserTag. The Resource type is VirtualRouterVmVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The Resource type is VirtualRouterVmVO. | Yes | 0.6 | |
| timeout | Yes |
CreateVirtualRouterOffering
CreateVirtualRouterOffering name=VROffering zoneUuid=fad9475e374a471e8e95eca6177f7075 \
cpuNum=1 memorySize=1073741824 imageUuid=fd59830722741bf49d25398f34723cb8 \
managementNetworkUuid=10a60c0bc05b418c9f9f3d86ba65280aParameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| managementNetworkUuid | The management L3 network UUID. | 0.6 | ||
| zoneUuid | The zone UUID. | 0.6 | ||
| imageUuid | The image UUID. | 0.6 | ||
| publicNetworkUuid | The public L3 network UUID. | Yes | 0.6 | |
| isDefault | The default offering: vRouter. | Yes | 0.6 | |
| name | The resource name. | 0.6 | ||
| description | The detailed description of the resource. | Yes | 0.6 | |
| cpuNum | The CPU count. | 0.6 | ||
| memorySize | The memory size. | 0.6 | ||
| allocatorStrategy | The allocator strategy. | Yes |
|
0.6 |
| sortKey | The sort key. | Yes | 0.6 | |
| type | The type. | Yes |
|
0.6 |
| resourceUuid | The resource UUID. | Yes | 0.6 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterOfferingVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterOfferingVO. | Yes | 0.6 | |
| timeout | Yes |
QueryVirtualRouterOffering
QueryVirtualRouterOffering imageUuid=f354eb04fb7b3732a9a9de825d68eb5cQueryVirtualRouterOffering managementL3Network.uuid=a3b2fce8f82b4422a575220a35d6ebbdPrimitive Fields of Query
See Virtual Router Offering Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| image | Image Inventory | The image contained in the offering. | 0.6 |
| managementL3Network | L3 Network Inventory | The management L3 network contained in the offering. | 0.6 |
| publicL3Network | L3 Network Inventory | The public L3 network contained in the offering. | 0.6 |
| zone | Zone Inventory | The zone to which the offering belongs. | 0.6 |
UpdateVirtualRouterOffering
UpdateVirtualRouterOffering uuid=d8f2a1a9eb6146848943e78f7cca6a43Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| isDefault | The default offering: vRouter. | Yes | 0.6 | |
| imageUuid | The image UUID. | Yes | 0.6 | |
| uuid | The resource UUID. | 0.6 | ||
| name | The resource name. | Yes | 0.6 | |
| description | The detailed description of the resource. | Yes | 0.6 | |
| allocatorStrategy | Yes |
|
2.3 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterOfferingVO. | Yes | 0.6 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterOfferingVO. | Yes | 0.6 | |
| timeout |
QueryApplianceVm
QueryApplianceVm uuid=efb08e965ba4414fa7320e968178d442QueryApplianceVm vmNics.vmInstanceUuid=efb08e965ba4414fa7320e968178d442Primitive Fields of Query
See Appliance VM Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vmNics | VM NIC Inventory | The NICs of the appliance VM. | 0.6 |
| allVolumes | Volume Inventory | The volumes of the appliance VM. | 0.6 |
| host | Host Inventory | The host on which the appliance VM is running. | 0.6 |
| cluster | Cluster Inventory | The cluster to which the appliance VM is attached. | 0.6 |
| image | Image Inventory | The image used for creating the appliance VM. | 0.6 |
| zone | Zone Inventory | The zone to which the appliance VM belongs. | 0.6 |
| rootVolume | Volume Inventory | The root volume of the appliance VM. | 0.6 |
| virtualRouterOffering | vRouter Offering Inventory | The vRouter offering of the appliance VM. | 0.6 |
| eip | EIP Inventory | The EIP that the appliance VM serves. | 0.6 |
| vip | VIP Inventory | The VIP that the appliance VM serves. | 0.6 |
| portForwarding | Port Forwarding Rule Inventory | The port forwarding that the appliance VM serves. | 0.6 |
GetAttachablePublicL3ForVRouter
GetAttachablePublicL3ForVRouter vmInstanceUuid=698c538be5414ac7b04b19f4daa29f74Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| vmInstanceUuid | The UUID of the vRouter VM instance. | 2.2 | ||
| userTags | The user tags. For more information, see CreateUserTag. The Resource type is VirtualRouterVmVO. | Yes | 2.2 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The Resource type is VirtualRouterVmVO. | Yes | 2.2 | |
| timeout | Yes |
vRouter Route Table Inventory
CreateVRouterRouteTable
CreateVRouterRouteTable name=VRouterRouteTable1Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| name | The resource name. | 2.1 | ||
| description | The detail description of the resource. | Yes | 2.1 | |
| resourceUuid | The resource UUID. | Yes | 2.1 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
DeleteVRouterRouteTable
DeleteVRouterRouteTable uuid=c62422b8f644482ea930b84e3200ead9Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID of the vRouter route table. | 2.1 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
2.1 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
QueryVRouterRouteTable
QueryVRouterRouteTable uuid=a15ee6c9eba744308f5c32b6f93069fbQueryVRouterRouteTable attachedRouterRef.virtualRouterVmUuid=efb08e965ba4414fa7320e968178d442Primitive Fields of Query
See vRouter Route Table Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| attachedRouterRef | Attached Router Reference Inventory | ||
| attachedRouterRefs | Attached Router References Inventory | ||
| routeEntries | Router Entries Inventory |
GetVRouterRouteTable
GetVRouterRouteTable virtualRouterVmUuid=698c538be5414ac7b04b19f4daa29f74Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| virtualRouterVmUuid | The vRouter VM instance UUID. | 2.1 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
AddVRouterRouteEntry
AddVRouterRouteEntry routeTableUuid=315d780fe5ea495394d59db9a2177b19 destination=192.168.19.0/24Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| description | The detailed description of the resource. | Yes | 2.1 | |
| type | The type. You can add two types of routes: static route and black hole route. The system will automatically determine the type by judging whether to enter the next IP address. | Yes |
|
2.1 |
| routeTableUuid | The UUID of the vRouter route table. | 2.1 | ||
| destination | The destination network address, in CIDR format. If you enter a non-standard CIDR, note that the system will automatically transform it to the standard CIDR format. | 2.1 | ||
| target | The next IP address, which can be accessed directly by the vRouter VM instance. If the IP address cannot be accessed directly, the route recursion will be triggered. | Yes | 2.1 | |
| distance | The route priority. Due to the minimum route rule, if you have many route rules to match IP address, note that the minimum number of route rules will be prioritized to do the match according to the priority sequence of the route rules. | 2.1 | ||
| resourceUuid | The resource UUID. | Yes | 2.1 | |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
DeleteVRouterRouteEntry
DeleteVRouterRouteEntry uuid=92b15177f2a84ec39c962613e926c247 \
routeTableUuid=315d780fe5ea495394d59db9a2177b19Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| uuid | The UUID of the vRouter route entry. | 2.1 | ||
| routeTableUuid | The UUID of the vRouter route table. | 2.1 | ||
| deleteMode | The delete mode. For more information, see Delete Resources. | Yes |
|
2.1 |
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
QueryVRouterRouteEntry
QueryVRouterRouteEntry uuid=3a9783d1da514c7983c56040bf6b04f2QueryVRouterRouteEntry vrouterRouteTable.uuid=a15ee6c9eba744308f5c32b6f93069fbPrimitive Fields of Query
See vRouter Route Entry Inventory.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vrouterRouteTable | vRouter Route Table Inventory | The vRouter router table of the router entry. | 2.1 |
AttachVRouterRouteTableToVRouter
AttachVRouterRouteTableToVRouter virtualRouterVmUuid=698c538be5414ac7b04b19f4daa29f74 \
routeTableUuid=315d780fe5ea495394d59db9a2177b19Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| routeTableUuid | The UUID of the vRouter route table. | 2.1 | ||
| virtualRouterVmUuid | The UUID of the vRouter VM instance. | 2.1 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
DetachVRouterRouteTableFromVRouter
DetachVRouterRouteTableFromVRouter virtualRouterVmUuid=698c538be5414ac7b04b19f4daa29f74 \
routeTableUuid=315d780fe5ea495394d59db9a2177b19Parameters
| Name | Description | Optional | Valid Value | Starting Version |
|---|---|---|---|---|
| routeTableUuid | The UUID of the vRouter router table. | 2.1 | ||
| virtualRouterVmUuid | The UUID of the vRouter VM instance. | 2.1 | ||
| userTags | The user tags. For more information, see CreateUserTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| systemTags | The system tags. For more information, see CreateSystemTag. The resource type is VirtualRouterVRouterRouteTableRefVO. | Yes | 2.1 | |
| timeout | Yes |
QueryVirtualRouterVRouterRouteTableRef
QueryVirtualRouterVRouterRouteTableRef routeTableUuid=a15ee6c9eba744308f5c32b6f93069fbQueryVirtualRouterVRouterRouteTableRef vrouterRouteTable.uuid=a15ee6c9eba744308f5c32b6f93069fbPrimitive Fields of Query
See Inventory of Reference Between Virtual Router and vRouter Route Table.
Nested and Expanded Fields of Query
| Field | Inventory | Description | Starting Version |
|---|---|---|---|
| vrouterRouteTable | vRouter Route Table Inventory | 2.1 | |
| virtualRouterVm | vRouter VM Inventory | 2.1 |
Tags
System Tags
Parallel Command Level
| Tag | Description | Example | Starting Version |
|---|---|---|---|
| commandsParallelismDegree::{parallelismDegree} | The maximum number of commands that can be executed in parallel in a vRouter VM instance. | commandsParallelismDegree::100 | 0.6 |
- On a vRouter offering, you can create a system tag by using resourceType=InstanceOfferingVO.
- On a vRouter VM instance, you can create a system tag by using resourceType=VmInstanceVO.
Guest L3 Network
You can attach a vRouter offering to a guest L3 network to specify which vRouter offering to use when creating a vRouter VM instance on the guest L3 network.
CreateSystemTag resourceType=InstanceOfferingVO resourceUuid=YOUR_VR_OFFERING_UUID \
tag=guestL3Network::YOUR_L3_NETWORK_UUID