To effectively use VDC, we need to create a network configuration that meets our expectations. One of the most popular configurations is a network that allows servers in it to be connected to the internet while also providing access to those servers from the internet.
An example configuration of such a network looks like this:
VDC (Public NET):
In our Client Panel, the ready configuration will look as follows:
To achieve this configuration, we need to perform the following steps.
From the left-hand menu, select Resources, then from the submenu, choose Virtual DC, and then click on the Add New VDC button.
In the form, select the location where you want to create your network, and then give it a name. In our example, it will be VDC (Public NET)
.
After creating the network, click on its name or Details button to enter the network configurator.
Then, add a subnet by clicking on the Add Subnet button.
In the form, give our subnet a name. In our example, it will be Subnet (Public)
. Then, provide the private addressing (i.e., the range of private IP addresses that will be assigned to our servers) and select the option Yes
from the Subnet with public addressing menu.
With the subnet ready, we need to add a gateway to it. To do this, click on the Gateway button.
Give our gateway a name. In our example, it will be Gateway
. Then, select the Direct Gateway option from the Type field because we want to be able to access our servers from the internet.
To ensure communication between a private network and the internet, we need to create a routing table. To do this, click on the Add Routing Table button.
In the form, name your table. In our example, we will name it Route table #1
.
Next, add a routing rule to the table. To do this, click on the Route Rule button.
In the form, assign the rule to the gateway. In our example, the gateway is named Gateway
. We also need to provide a Destination, in this case we enter the value 0.0.0.0/0
.
To make our network work, we still need to connect the routing table to the subnet. To do this, click on the button shown below.
In the form, select the routing table previously configured. In our example, this was the table Route table #1
.
This completes the configuration as shown in the first image. The last step is to add servers to the network.
To do this, in the server configurator, select the subnet VDC (Public NET)
> Subnet (Public)
- the server will be automatically connected to our network and
in addition to the public IP address, it will also have a private IP address of our VDC network.