ZStack Cloud VPC network supports both IPv4 and IPv6 protocols and
users can choose to use IPv4, IPv6, or IPv4+IPv6 dual-stack networks as needed. This
chapter introduces the basic deployment of IPv4 and IPv6 VPC networks in detail.
IPv4 Basic Deployment
About this task
IPv4, also known as the Internet Protocol version 4, with a 32-bit long address, is
the most widely used version of the inter-networking protocol today. ZStack Cloud VPC network supports IPv4 protocol and this chapter
will introduce the basic deployment of IPv4 VPC network in detail.
Assume that the customer environment is as follows:
Public Network
Public Network
Configuration
NIC
em1
VLAN ID
No VLAN
IP Range
10.108.10.100~10.108.10.200
Netmask
255.0.0.0
Gateway
10.0.0.1
DHCP IP
10.108.10.101
Management Network
Management
Network
Configuration
NIC
em2
VLAN ID
No VLAN
IP Range
192.168.29.10~192.168.29.20
Netmask
255.255.255.0
Gateway
192.168.29.1
Note:
For security and stability reasons, we recommend that you deploy
an independent management network and separate it from the
public networks.
The management network we mentioned here is the same as that in
ZStack Cloud. That is, the management
network is the network used to manage hosts, primary storages,
and backup storages. If a management network was created before,
you can use it directly.
VPC Network-1
Private Network
Configuration
NIC
em1
VLAN ID
2800
IP CIDR
192.168.10.0/24
Gateway
192.168.10.1
DHCP IP
192.168.10.2
VPC Network-2
Private Network
Configuration
NIC
em1
VLAN ID
2900
IP CIDR
192.168.11.0/24
Gateway
192.168.11.1
DHCP IP
192.168.11.2
To deploy a VPC Network in the Cloud, follow these steps:
Create an L2 public network and attach it to the corresponding cluster.
Create an L3 public network.
Create an L2 management network and attach it to the corresponding
cluster.
Create an L3 management network.
Add a vRouter image.
Create a vRouter offering.
Create a VPC vRouter from the vRouter offering you created in the preceding
step.
Create an L2 private network and attach it to the corresponding cluster.
This L2 private network is used to create an L3 VPC network (VPC
Network-1).
Create an L3 VPC network (VPC Network-1).
Create an L2 private network and attach it to the corresponding cluster.
This L2 private network is used to create an L3 VPC network (VPC
Network-2).
Create an L3 VPC network (VPC Network-2).
Use VPC Network-1 and VPC Network-2 to create VM-1 and VM-2,
respectively.
Test the connectivity between VPC Network-1 and VPC Network-2.
Procedure
Create an L2 public network and attach it to the corresponding cluster.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > L2 Network Resources > L2 Network. On the L2 Network page, click
Create L2 Network. Then, the Create L2
Network page is displayed. On the displayed page, set the
following parameters:
Zone: By default, the current zone is
displayed.
Name: Set the name as L2-Public
Network.
Description: Optional. Enter a description
for the L2 network.
Type: Select
L2NoVlanNetwork.
Cluster: Select a cluster to be attached, for
example, Cluster-1.
Network Acceleration
Mode: You can use different technologies to improve
network performance of the L2 network. In this scenario, select
Normal.
NIC Name: Enter a NIC name for the L2
network. For example, em1.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > L3 Network Resources > Public Network. On the Public Network page, click
Create Public Network. The Create
Public Network page is displayed. On the displayed page, set
the following parameters:
Name: Set the name as L3-Public
Network.
Description: Optional. Enter a description
for the public network.
L2 Network: Select the existing L2-Public
Network.
Network Address Type: Select
IPv4.
Network Range Method: Select IP
Range.
Start IP: Set a start IP address for the
network range, for example, 10.108.10.100.
End IP: Set an end IP address for the network
range, for example, 10.108.10.200.
Netmask: Set a netmask for the network range,
for example, 255.0.0.0.
Gateway: Set a gateway for the network range,
for example, 10.0.0.1.
IP Allocation Policy: Optional. After the
DHCP service is enabled, IP addresses can be assigned according to
the following three allocation policies:
Random: The system randomly assigns
IP addresses from the network range.
Allocate in Order:
The system assigns all available IP addresses from
the network range in ascending order. Released IP
addresses are assigned in the next allocation.
Example: Assume that the network range is
192.168.0.101~192.168.0.120, within
which 192.168.0.101~192.168.0.108 are
allocated. If 192.168.0.106 is released, it
will be assigned first in the next allocation.
Allocate in Cycle:
The system assigns available IP addresses to VM
instances from the network range in ascending order.
Released IP addresses are assigned when currently
available IP addresses are used up.
Example: Assume that the network range is
192.168.0.101~192.168.0.120, within
which 192.168.0.101~192.168.0.108 are
allocated. If 192.168.0.106 is released, it
will be assigned after 192.168.0.120 is
used.
DHCP Service: Choose
whether to enable the DHCP service.
Note:
The DHCP service is a built-in distributed service of
the Cloud, which assigns IP addresses only to resources
in the Cloud and does not conflict with your existing
DHCP server.
By default, the DHCP service is enabled so that IP
addresses are automatically assigned to resources in the
Cloud. You can customize a DHCP IP or use the DHCP IP
that the system assigned according to the IP allocation
policy.
If you disable this option, IP addresses are not
automatically assigned to resources that use this
network. Therefore, you need to manually assign IP
addresses to these resources. In addition, you cannot
specify a DHCP IP. Neither can the system allocate
one.
DHCP IP:
Optional. Set an IP address for the DHCP server, for
example, 10.108.10.101.
Note:
A DHCP IP is an IP address used by the DHCP
service to assign IP addresses to resources that
use this L3 network.
If you create an L3 network for the first time
with the DHCP service enabled, or if you add the
first network range to an L3 network with the DHCP
service enabled, you can customize the DHCP
IP.
If the L3 network has a DHCP IP, you cannot
customize the DHCP IP when you add a network
range.
The DHCP IP can be in or outside the added IP
range, but it must be an unoccupied IP address in
the CIDR block of the added IP range
The IP range determined by the start IP and end
IP cannot contain the link-local address
169.254.0.0/16.
If you select random as the IP allocation policy
and this field is left blank, the system randomly
assigns IP addresses from the added network
range.
If you select allocate in order/allocate in
cycle as the IP allocation policy and this field
is left blank, the system uses the start IP
address in the network range as the DHCP IP.
DNS: Optional. Add a DNS server to provide
domain name resolution services for the public network, for example,
114.114.114.114.
Figure 2. Create L3-Public Network
Create an L2 management network and attach it to the corresponding
cluster.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > L2 Network Resources > L2 Network. On the L2 Network page, click
Create L2 Network. Then, the Create L2
Network page is displayed. On the displayed page, set the
following parameters:
Zone: By default, the current zone is
displayed.
Name: Set the name as L2-Management
Network.
Description: Optional. Enter a description
for the L2 network.
Type: Select L2NoVlanNetwork.
Cluster: Select a cluster to be attached, for
example, Cluster-1.
Network Acceleration Mode: You can use
different technologies to improve network performance of the L2
network. In this scenario, select
Normal.
NIC Name: Enter a NIC name for the L2
network. For example, em2.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > Dedicated Network > Management Network. On the Management Network page, click
Create Management Network. Then, the
Create Management Network page is displayed. On the
displayed page, set the following parameters:
Name: Set the name as L3-Management
Network.
Description: Optional. Enter a description
for the management network.
L2 Network: Select the existing
L2-Management Network.
Network Range Method: Select IP
Range.
Start IP: Set a start IP address for the
network range, for example, 192.168.29.10.
End IP: Set an end IP address for the network
range, for example, 192.168.29.20.
Netmask: Set a netmask for the network range,
for example, 255.255.255.0.
Gateway: Set a gateway for the network range,
for example, 192.168.29.1.
Figure 4. Create L3-Management Network
Add a vRouter image.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > vRouter > vRouter Image. On the vRouter Image page, click Add
vRouter Image. Then, the Add vRouter Image page is
displayed.
Set the following parameters:
Name: Enter a name for the vRouter image.
Description: Optional. Enter a description for the
vRouter image.
Image Usage: Specify what the vRouter image is used
for. Here, select VPC vRouter.
CPU Architecture: Select a CPU architecture for the
vRouter image. VPC vRouters created from the vRouter image inherit this CPU
architecture.
Backup Storage: Select a backup storage to store the
vRouter image.
Image Path: Enter a URL or upload a local file.
URL: Enter the download URL of the vRouter
image.
ZStack Cloud provides you
with dedicated VPC vRouter images (KVM). You can download the
latest vRouter images from the official website.
Local File: Upload a vRouter image file that
can directly be accessed by the current browser.
Note:
You can upload the vRouter image to an ImageStore or
Ceph backup storage.
A local browser will serve as a transmission relay used
for uploading the vRouter image. Do not refresh or stop
the current browser, nor stop your management node.
Otherwise, you will fail to add the vRouter image.
Create a vRouter offering.
On the displayed page, set the following parameters:
Zone: By default, the current zone is displayed.
Name: Enter a name for the vRouter offering.
Description: Optional. Enter a description for the
vRouter offering.
CPU: Set the number of CPU cores for a
vRouter.
Note: Currently, a vRouter can have up to 240 CPU cores. In an
actual production environment, we recommend that you set more than 8 CPU
cores for a vRouter.
Memory: Set the memory size for a vRouter. Unit: MB, GB,
and TB. In an actual production environment, we recommend that the memory size
greater than 8 GB.
Image: Select a vRouter image you added
before.
Note: If
the L3 public network in the vRouter offering has a network range of the
IPv6 type, when you create a VPC vRouter, you must use the vRouter image of
version 3.10.0 or later.
Management Network: Select an L3 management network you
created before.
A management network is used by the management node to deploy and
configure resources such as hosts and VPC vRouters.
If a system network is used to manage physical resources, select the
system network as the management network.
If you use a public network to manage physical resources, select the
public network as the management network.
Public Network: Select a public network you created
before.
vRouters created from this vRouter offering can provide VPC network
services.
Figure 5. Create vRouter Offering
Create a VPC vRouter from the vRouter offering you created in the preceding
step.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > vRouter > VPC vRouter. On the VPC vRouter page, click
Create VPC vRouter. Then, the Create
VPC vRouter page is displayed. On the displayed page, set the
following parameters:
On the displayed page, set the following parameters:
Name: Enter a name for the VPC vRouter.
Description: Optional. Enter a description for the VPC
vRouter.
vRouter Offering: Select a vRouter offering you created
before.
Note: A VPC vRouter created from a vRouter offering has a public
network and a management network.
Cluster: Optional. Specify a cluster for the host on
which the VPC vRouter is to be started.
Storage Allocation Policy: Specify how the Cloud
allocates a primary storage. The following two policies are supported:
System Allocation: The
Cloud allocates a primary storage according to the preconfigured
policy.
Custom: Select a primary storage as needed.
Primary
Storage: Select a primary storage for the VPC
vRouter.
Host: Optional. Select a host on which the VPC vRouter is
started.
Default IPv4/IPv6 Address: Optional. Specify a default IP
address for the VPC vRouter. If not specified, the Cloud allocates one
automatically.
Assign Management Network IP: Optional. Assign a
management network IP to the VPC vRouter.
Note: To assign a management network
IP, make sure that the management network used by the VPC vRouter is
separated from the public network the VPC vRouter uses. If the VPC vRouter
uses a same network both as its management network and public network, you
cannot assign a management network IP.
DNS: Optional. Set the DNS service for the VPC vRouter.
If not specified, 223.5.5.5 will be used.
Note:
You can set an IPv4 DNS or IPv6 DNS as needed. For example, you can
set the IPv4 DNS to 223.5.5.5 or IPv6 DNS to 240C::6644.
Services in the VPC vRouter can access the public network services
via DNS. You can also specify the other DNS address if
necessary.
For VM instances created by using a VPC network, the DNS is the
gateway of the VPC network. The VM traffics are forwarded by a VPC
vRouter.
CPU Pinning: Associate the
virtual CPUs (vCPUs) of a VPC vRouter with host pCPUs stringently and allow you
to allocate specific pCPUs for the VPC vRouter, thus improving VPC vRouter performances.
Note:
Pinning Format
In the left input box, set a vCPU range. In the right input
box, set a pCPU range. Range format: integer, hyphen(-), and
caret (^). Use commas to separate them.
The vCPU range depends on the vRouter offering attached to
the VPC vRouter.
The pCPU range depends on the pCPU quantity of the selected
cluster or host.
Example: In the left input box, enter 1. In the right input box,
enter 0-3,^2. This example indicates that vCPU 1 is stringently
associated with pCPU 0, pCPU 1, and pCPU 3, while ^ represents that
vCPU 2 is excluded.
Figure 6. Create VPC vRouter
Create an L2 private network and attach it to the corresponding cluster. This
L2 private network is used to create an L3 VPC network (VPC Network-1).
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > L2 Network Resources > L2 Network. On the L2 Network page, click
Create L2 Network. Then, the Create L2
Network page is displayed. On the displayed page, set the
following parameters:
Zone: By default, the current zone is
displayed.
Name: Set the name as L2-Private
Network.
Description: Optional. Enter a description
for the L2 network.
Type: Select L2VlanNetwork.
Cluster: Select a cluster to be attached, for
example, Cluster-1.
Network Acceleration Mode: You can use
different technologies to improve network performance of the L2
network. In this scenario, select
Normal.
VLAN ID: Enter 2800.
NIC Name: Enter a NIC name for the L2
network. For example, em1.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > L3 Network Resources > VPC Network. On the VPC Network page, click
Create VPC Network. The Create VPC
Network page is displayed. On the displayed page, set the
following parameters:
Name: Set the name as VPC
Network-1.
Description: Optional. Enter a description
for the VPC network.
L2 Network: Select the existing L2-Private
Network.
VPC vRouter: Optional. Select the existing
VPC vRouter.
Network Address Type: Select
IPv4.
Network Range Method: Select
CIDR.
CIDR: Set a CIDR block for the VPC network,
for example, 192.168.10.0/24.
Gateway: Set a gateway for the VPC network,
for example, 192.168.10.1.
IP Allocation Policy: Optional. After the
DHCP service is enabled, IP addresses can be assigned according to
the following three allocation policies:
Random: The system randomly assigns
IP addresses from the network range.
Allocate in Order:
The system assigns all available IP addresses from
the network range in ascending order. Released IP
addresses are assigned in the next allocation.
Example: Assume that the network range is
192.168.0.101~192.168.0.120, within
which 192.168.0.101~192.168.0.108 are
allocated. If 192.168.0.106 is released, it
will be assigned first in the next allocation.
Allocate in Cycle:
The system assigns available IP addresses to VM
instances from the network range in ascending order.
Released IP addresses are assigned when currently
available IP addresses are used up.
Example: Assume that the network range is
192.168.0.101~192.168.0.120, within
which 192.168.0.101~192.168.0.108 are
allocated. If 192.168.0.106 is released, it
will be assigned after 192.168.0.120 is
used.
DHCP Service: Choose whether to enable the
DHCP service.
Note:
The DHCP service is a built-in distributed service of
the Cloud, which assigns IP addresses only to resources
in the Cloud and does not conflict with your existing
DHCP server.
By default, the DHCP service is enabled so that IP
addresses are automatically assigned to resources in the
Cloud. You can customize a DHCP IP or use the DHCP IP
that the system assigned according to the IP allocation
policy.
If you disable this option, IP addresses are not
automatically assigned to resources that use this
network. Therefore, you need to manually assign IP
addresses to these resources. In addition, you cannot
specify a DHCP IP. Neither can the system allocate
one.
DHCP IP: Optional. Set an IP address
for the DHCP server, for example, 192.168.10.2.
Note:
A DHCP IP is an IP address used by the DHCP
service to assign IP addresses to resources that
use this L3 network.
If you create an L3 network for the first time
with the DHCP service enabled, or if you add the
first network range to an L3 network with the DHCP
service enabled, you can customize the DHCP
IP.
If the L3 network has a DHCP IP, you cannot
customize the DHCP IP when you add a network
range.
The DHCP IP can be in or outside the added IP
range, but it must be an unoccupied IP address in
the CIDR block of the added IP range
The IP range determined by the start IP and end
IP cannot contain the link-local address
169.254.0.0/16.
If you select random as the IP allocation policy
and this field is left blank, the system randomly
assigns IP addresses from the added network
range.
If you select allocate in order/allocate in
cycle as the IP allocation policy and this field
is left blank, the system uses the start IP
address in the network range as the DHCP IP.
DNS: Optional.
Figure 8. Create VPC Network-1
Create an L2 private network and attach it to the corresponding cluster. This
L2 private network is used to create an L3 VPC network (VPC Network-2).
Create an L3 VPC network (VPC Network-2).
Use VPC Network-1 and VPC Network-2 to create VM-1 and VM-2,
respectively.
On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Click Create VM Instance. Use the
existing VPC Network-1 and VPC Network-2 to create VM-1
and VM-2, respectively.
Test the connectivity between VPC Network-1 and VPC Network-2.
Expected result: VPC Netowrk-1 and VPC Network-2 can communicate with each
other.
To test the connectivity, follow these steps:
Log in to VM-1, use the ping command to ping
VM-2.Figure 9. VM-1 Ping VM-2
Log in to VM-2, use the ping command to ping
VM-1.Figure 10. VM-2 ping VM-1
What to do next
So far, we have introduced the basic deployment of IPv4
VPC network.
IPv6 Basic Deployment
About this task
IPv6, also known as Internet Protocol version 6, with an address length of 128 bits,
not only solves the problem of insufficient IPv4 address, but it also clears the
barrier for multiple access devices to connect to the Internet. ZStack Cloud VPC network supports IPv6 protocol and this chapter
will introduce the basic deployment of IPv6 VPC network in detail.
Assume that the customer environment is as follows:
Public Network
Public Network
Configuration
NIC
em1
VLAN ID
No VLAN
IP Range
10.108.10.100~10.108.10.200
Netmask
255.0.0.0
Gateway
10.0.0.1
DHCP IP
10.108.10.101
Note: The public network used to create the VPC vRouter supports
both IPv4 and IPv6 networks. In this scenario, we use IPv4 as an
example.
Management Network
Management
Network
Configuration
NIC
em2
VLAN ID
No VLAN
IP Range
192.168.29.10~192.168.29.20
Netmask
255.255.255.0
Gateway
192.168.29.1
Note:
The management network used to create the VPC vRouter supports
IPv4 network only.
For security and stability reasons, we recommend that you deploy
an independent management network and separate it from the
public networks.
The management network we mentioned here is the same as that in
ZStack Cloud. That is, the management
network is the network used to manage hosts, primary storages,
and backup storages. If a management network was created before,
you can use it directly.
VPC Network-1
VPC Network
Configuration
NIC
em1
VLAN ID
2800
IP CIDR
234e:0:4569::/64
DHCP IP
234e:0:4569::2
VPC Network-2
VPC Network
Configuration
NIC
em1
VLAN ID
2900
IP CIDR
234e:0:456a::/64
DHCP IP
234e:0:456a::2
To deploy a VPC network in the Cloud, follow these steps:
Create an L2 public network and attach it to the corresponding cluster.
Create an L3 public network.
Create an L2 management network and attach it to the corresponding
cluster.
Create an L3 management network.
Add a vRouter image.
Create a vRouter offering.
Create a VPC vRouter from the vRouter offering you created in the preceding
step.
Create an L2 private network and attach it to the corresponding cluster.
This L2 private network is used to create an L3 VPC network.
Create L3 VPC networks and attach it to the VPC vRouter.
Use two VPC networks to create VM instances respectively.
Obtain the IPv6 address of the VM instances.
Test the connectivity between two VPC networks.
Procedure
Create an L2 public network and attach it to the corresponding cluster.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > L2 Network Resources > L2 Network. On the L2 Network page, click
Create L2 Network. Then, the Create L2
Network page is displayed. On the displayed page, set the
following parameters:
Zone: By default, the current zone is
displayed.
Name: Set the name as L2-Public
Network.
Description: Optional. Enter a description
for the L2 network.
Type: Select
L2NoVlanNetwork.
Cluster: Select a cluster to be attached, for
example, Cluster-1.
Network Acceleration
Mode: You can use different technologies to improve
network performance of the L2 network. In this scenario, select
Normal.
NIC Name: Enter a NIC name for the L2
network. For example, em1.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > L3 Network Resources > Public Network. On the Public Network page, click
Create Public Network. The Create
Public Network page is displayed. On the displayed page, set
the following parameters:
Name: Set the name as L3-Public
Network.
Description: Optional. Enter a description
for the public network.
L2 Network: Select the existing L2-Public
Network.
Network Address Type: Select
IPv4.
Network Range Method: Select IP
Range.
Start IP: Set a start IP address for the
network range, for example, 10.108.10.100.
End IP: Set an end IP address for the network
range, for example, 10.108.10.200.
Netmask: Set a netmask for the network range,
for example, 255.0.0.0.
Gateway: Set a gateway for the network range,
for example, 10.0.0.1.
IP Allocation Policy: Optional. After the
DHCP service is enabled, IP addresses can be assigned according to
the following three allocation policies:
Random: The system randomly assigns
IP addresses from the network range.
Allocate in Order:
The system assigns all available IP addresses from
the network range in ascending order. Released IP
addresses are assigned in the next allocation.
Example: Assume that the network range is
192.168.0.101~192.168.0.120, within
which 192.168.0.101~192.168.0.108 are
allocated. If 192.168.0.106 is released, it
will be assigned first in the next allocation.
Allocate in Cycle:
The system assigns available IP addresses to VM
instances from the network range in ascending order.
Released IP addresses are assigned when currently
available IP addresses are used up.
Example: Assume that the network range is
192.168.0.101~192.168.0.120, within
which 192.168.0.101~192.168.0.108 are
allocated. If 192.168.0.106 is released, it
will be assigned after 192.168.0.120 is
used.
DHCP Service: Choose
whether to enable the DHCP service.
Note:
The DHCP service is a built-in distributed service of
the Cloud, which assigns IP addresses only to resources
in the Cloud and does not conflict with your existing
DHCP server.
By default, the DHCP service is enabled so that IP
addresses are automatically assigned to resources in the
Cloud. You can customize a DHCP IP or use the DHCP IP
that the system assigned according to the IP allocation
policy.
If you disable this option, IP addresses are not
automatically assigned to resources that use this
network. Therefore, you need to manually assign IP
addresses to these resources. In addition, you cannot
specify a DHCP IP. Neither can the system allocate
one.
DHCP IP:
Optional. Set an IP address for the DHCP server, for
example, 10.108.10.101.
Note:
A DHCP IP is an IP address used by the DHCP
service to assign IP addresses to resources that
use this L3 network.
If you create an L3 network for the first time
with the DHCP service enabled, or if you add the
first network range to an L3 network with the DHCP
service enabled, you can customize the DHCP
IP.
If the L3 network has a DHCP IP, you cannot
customize the DHCP IP when you add a network
range.
The DHCP IP can be in or outside the added IP
range, but it must be an unoccupied IP address in
the CIDR block of the added IP range
The IP range determined by the start IP and end
IP cannot contain the link-local address
169.254.0.0/16.
If you select random as the IP allocation policy
and this field is left blank, the system randomly
assigns IP addresses from the added network
range.
If you select allocate in order/allocate in
cycle as the IP allocation policy and this field
is left blank, the system uses the start IP
address in the network range as the DHCP IP.
DNS: Optional. Add a DNS server to provide
domain name resolution services for the public network, for example,
114.114.114.114.
Create an L2 management network and attach it to the corresponding
cluster.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > L2 Network Resources > L2 Network. On the L2 Network page, click
Create L2 Network. Then, the Create L2
Network page is displayed. On the displayed page, set the
following parameters:
Zone: By default, the current zone is
displayed.
Name: Set the name as L2-Management
Network.
Description: Optional. Enter a description
for the L2 network.
Type: Select L2NoVlanNetwork.
Cluster: Select a cluster to be attached, for
example, Cluster-1.
Network Acceleration Mode: You can use
different technologies to improve network performance of the L2
network. In this scenario, select
Normal.
NIC Name: Enter a NIC name for the L2
network. For example, em2.
On the main menu of ZStack Cloud,
choose Resource Center > Network Resource > Dedicated Network > Management Network. On the Management Network page, click
Create Management Network. Then, the
Create Management Network page is displayed. On the
displayed page, set the following parameters:
Name: Set the name as L3-Management
Network.
Description: Optional. Enter a description
for the management network.
L2 Network: Select the existing
L2-Management Network.
Network Range Method: Select IP
Range.
Start IP: Set a start IP address for the
network range, for example, 192.168.29.10.
End IP: Set an end IP address for the network
range, for example, 192.168.29.20.
Netmask: Set a netmask for the network range,
for example, 255.255.255.0.
Gateway: Set a gateway for the network range,
for example, 192.168.29.1.
Add a vRouter image.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > vRouter > vRouter Image. On the vRouter Image page, click Add
vRouter Image. Then, the Add vRouter Image page is
displayed.
Set the following parameters:
Name: Enter a name for the vRouter image.
Description: Optional. Enter a description for the
vRouter image.
Image Usage: Specify what the vRouter image is used
for. Here, select VPC vRouter.
CPU Architecture: Select a CPU architecture for the
vRouter image. VPC vRouters created from the vRouter image inherit this CPU
architecture.
Backup Storage: Select a backup storage to store the
vRouter image.
Image Path: Enter a URL or upload a local file.
URL: Enter the download URL of the vRouter
image.
ZStack Cloud provides you
with dedicated VPC vRouter images (KVM). You can download the
latest vRouter images from the official website.
Local File: Upload a vRouter image file that
can directly be accessed by the current browser.
Note:
You can upload the vRouter image to an ImageStore or
Ceph backup storage.
A local browser will serve as a transmission relay used
for uploading the vRouter image. Do not refresh or stop
the current browser, nor stop your management node.
Otherwise, you will fail to add the vRouter image.
Create a vRouter offering.
On the displayed page, set the following parameters:
Zone: By default, the current zone is displayed.
Name: Enter a name for the vRouter offering.
Description: Optional. Enter a description for the
vRouter offering.
CPU: Set the number of CPU cores for a
vRouter.
Note: Currently, a vRouter can have up to 240 CPU cores. In an
actual production environment, we recommend that you set more than 8 CPU
cores for a vRouter.
Memory: Set the memory size for a vRouter. Unit: MB, GB,
and TB. In an actual production environment, we recommend that the memory size
greater than 8 GB.
Image: Select a vRouter image you added
before.
Note: If
the L3 public network in the vRouter offering has a network range of the
IPv6 type, when you create a VPC vRouter, you must use the vRouter image of
version 3.10.0 or later.
Management Network: Select an L3 management network you
created before.
A management network is used by the management node to deploy and
configure resources such as hosts and VPC vRouters.
If a system network is used to manage physical resources, select the
system network as the management network.
If you use a public network to manage physical resources, select the
public network as the management network.
Public Network: Select a public network you created
before.
vRouters created from this vRouter offering can provide VPC network
services.
Figure 12. Create vRouter Offering
Create a VPC vRouter from the vRouter offering you created in the preceding
step.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > vRouter > VPC vRouter. On the VPC vRouter page, click
Create VPC vRouter. Then, the Create
VPC vRouter page is displayed. On the displayed page, set the
following parameters:
Name: Enter a name for the VPC vRouter.
Description: Optional. Enter a description
for the VPC vRouter.
vRouter Offering: Select a vRouter offering
you created before.
Cluster: Optional. Specify a cluster for the
host on which the VPC vRouter is to be started.
Storage Allocation Policy: Specify how the
Cloud allocates a primary storage. The following two policies are
supported:
System
Allocation: The Cloud allocates a primary
storage according to the preconfigured policy.
Custom: Select a primary storage as
needed.
Primary
Storage: Select a primary storage for
the VPC vRouter.
Host: Optional. Select a host on which the
VPC vRouter is started.
Default IPv6 Address: Optional. Specify a
default IP address for the VPC vRouter. If not specified, the Cloud
allocates one automatically.
Assign Management Network IP: Optional.
Assign a management network IP to the VPC vRouter.
Note: To assign a
management network IP, make sure that the management network
used by the VPC vRouter is separated from the public network the
VPC vRouter uses. If the VPC vRouter uses a same network both as
its management network and public network, you cannot assign a
management network IP.
DNS: Optional. Set the DNS service for the
VPC vRouter. In this scenario, specify 240C::6644.
Note:
You can set an IPv4 DNS or IPv6 DNS as needed. For
example, you can set the IPv4 DNS to 223.5.5.5 or
IPv6 DNS to 240C::6644.
Services in the VPC vRouter can access the public
network services via DNS. You can also specify the other
DNS address if necessary.
For VM instances created by using a VPC network, the DNS
is the gateway of the VPC network. The VM traffics are
forwarded by a VPC vRouter.
CPU Pinning:
Associate the virtual CPUs (vCPUs) of a VPC vRouter with host pCPUs
stringently and allow you to allocate specific pCPUs for the VPC
vRouter, thus improving VPC vRouter performances.
Note:
Pinning Format
In the left input box, set a vCPU range. In the
right input box, set a pCPU range. Range format:
integer, hyphen(-), and caret (^). Use commas to
separate them.
The vCPU range depends on the vRouter offering
attached to the VPC vRouter.
The pCPU range depends on the pCPU quantity of
the selected cluster or host.
Example: In the left input box, enter 1. In the right
input box, enter 0-3,^2. This example indicates that
vCPU 1 is stringently associated with pCPU 0, pCPU 1,
and pCPU 3, while ^ represents that vCPU 2 is
excluded.
Figure 13. Create VPC vRouter
Create an L2 private network and attach it to the corresponding cluster. This
L2 private network is used to create an L3 VPC network.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > L2 Network Resources > L2 Network. On the L2 Network page, click
Create L2 Network. Then, the Create L2
Network page is displayed. On the displayed page, set the
following parameters:
Zone: By default, the current zone is
displayed.
Name: Set the name as L2-VPC-1.
Description: Optional. Enter a description
for the L2 network.
Type: Select L2VlanNetwork.
Cluster: Select a cluster to be attached, for
example, Cluster-1.
Network Acceleration
Mode: You can use different technologies to improve
network performance of the L2 network. In this scenario, select
Normal.
VLAN ID: Enter 2800.
NIC Name: Enter a NIC name for the L2
network. For example, em1.
Figure 14. Create L2-VPC-1
Similarly, Create L2-VPC-2 and attach it to the corresponding
cluster.
Create L3 VPC networks and attach it to the VPC vRouter.
On the main menu of ZStack Cloud, choose Resource Center > Network Resource > L3 Network Resources > VPC Network. On the VPC Network page, click
Create VPC Network. The Create VPC
Network page is displayed. On the displayed page, set the
following parameters:
Name: Set the name as L3-VPC-1.
Description: Optional. Enter a description
for the VPC network.
L2 Network: Select the existing
L2-VPC-1.
VPC vRouter: Optional. Select the existing
VPC vRouter.
Network Address Type: Select
IPv6.
Network Range Method: Select
CIDR.
IP Configuration Mode: Select
Stateful-DHCP.
Stateful-DHCP: The interface address and other parameters
are all configured through DHCP. The IP range method
supports stateful DHCP.
Stateless-DHCP: The interface address is automatically
derived from the route advertisement prefix and the
interface Mac address. Other parameters are configured
through DHCP.
SLAAC: The interface address is automatically derived from
the prefix of the route advertisement that also contains
other parameters.
CIDR: Set a CIDR block for the VPC network,
for example, 234e:0:4569::/64.
DHCP Service: Choose whether to enable the
DHCP service.
Note:
The DHCP service is enabled by default. This service
automatically assigns an IP address to a VM instance.
You can specify an IP address for the DHCP server. If
you do not specify, the system assigns a random IP
address for the DHCP server.
If you disable the DHCP service, no IP address is
automatically assigned to VM instances in the public
network. You need to manually configure IP addresses for
the VM instances.
DHCP IP: Optional. Set an IP address
for the DHCP server, for example, 234e:0:4569::2.
Note:
When you create an L3 network and enable the
DHCP service for the first time, or when you add
the first network range for an L3 network that has
the DHCP service enabled, you can specify an IP
address for the DHCP server.
If a DHCP IP is specified for an L3 network, you
cannot specify another DHCP IP when you add a
network range for the network.
The DHCP IP must be within the CIDR block and
must not be in use.
If not specified, the system would randomly
specify a DHCP IP within the added IP range for
the DHCP server.
The first IP address in the CIDR block is
predefined as the default gateway and cannot be
used as a DHCP server IP.
DNS: Provide DNS services for an L3 network.
Here, you can specify a DNS address such as 240C::6666.
Figure 15. Create L3-VPC-1
Similarly, create L3-VPC-2 and attach it to the VPC vRouter.
Use two VPC networks to create VM instances respectively.
On the main menu of ZStack Cloud, choose Resource Center > Resource Pool > Virtual Resource > VM Instance. Click Create VM Instance. Use the
existing L3-VPC-1 and L3-VPC-2 to create VM-1 and
VM-2, respectively.
Obtain the IPv6 address of the VM instances.
You need to manually obtain the IP address of the IPv6 VM instance. Launch
the console of the two VM instances and run the following command to obtain
the IP
address:
[root@localhost~]# dhclient -6 eth0 //eth0 indicates the NIC name
[root@localhost~]# ifconfig
Note: FE80-started
address is the link-local address.
Figure 16. Obtain IP Address In this scenario, the obtained IP addresses are as follows:
VM-1 IP address: 234e:0:4569::42:e4a6
VM-2 IP address: 234e:0:456a::1a:ebe9
Test the connectivity between two VPC networks.
Expected result: L3-VPC-1 and L3-VPC-2 can communicate with each other.
To test the connectivity, follow these steps:
Log in to VM-1, use the ping command to ping
VM-2.Figure 17. VM-1 ping VM-2
Log in to VM-2, use the ping command to ping
VM-1.Figure 18. VM-2 ping VM-1
What to do next
So far, we have introduced the basic deployment of IPv6
VPC network.