By utilizing vRack, our VLAN (Virtual LAN) technology, you are able to route traffic privately between your OVHcloud services. In this article, we cover setting up vRack so that you may utilize this amazing feature.
- Enabling the Private Network
- Creating a VLAN
- Connecting a New Instance to vRack
- Connecting an Existing Instance to a Private Network
Enabling the Private Network
To begin, we will need to enable the private network. Log in to the OVHcloud Manager and click Public Cloud in the top-left corner of the page. Then, on the following screen, click the arrow button next to project name in the top-left corner of the screen. Now select the project on which you would like to enable private networking over vRack.
From this page, click the Private network (vRack) button under the "Network" menu on the left-hand sidebar.
Click the To get started, create a vRack button. This will open a pop-up where you will be given the choice of using an existing vRack or creating a new one. In our example, we have elected to use an existing private network. Once you have made a selection, click the Create button.
Note: If you decide to create a new private network, please check out our Getting Started with vRack article.
You have now enabled vRack for your project. In the next section, we will create a VLAN (Virtual Local Area Network) to which our instances will be linked.
Creating a VLAN
Immediately after you have created a vRack, you will be redirected to the screen to add a private network. If you have clicked off the page, simply click the Private network (vRack) button again to return to the page.
Now click the Add Private Network button to be taken to the following page:
You can choose to assign your private network manually or using DHCP. In our example, we will use DHCP. If you wish to use a static network, you can set this up in the OVHcloud API. Next, you have the option to choose a VLAN tag between 2 and 4000 by selecting the Set a VLAN ID checkbox for your vRack. This allows you to tag your traffic for private networking, ensuring that services on the same VLAN IDs will receive traffic and services not on the same VLAN IDs will not. In this example, we have selected the number 10 for our VLAN ID.
Proceed to select the region for your VLAN and give your new private network a name. Finally, once you have confirmed that the settings are correct, click the Send button.
Note: The network may take a few minutes to fully provision.
In the next section, we will cover how to connect a new instance to the newly created VLAN; if you have a preexisting instance, skip ahead to the Connecting an Existing Instance to a Private Network section.
Connecting a New Instance to vRack
For an in-depth look at creating an instance, please check out our How to Deploy a Public Cloud Instance article.
When you get to Part 4 of the instance creation menu, select the private network you wish to add to your public cloud instance.
Use the "Private network attached" drop-down to select the VLAN (in our case, "0010 - OVHcloud Network") to which you would like the instance to be linked when it is created.
If you have completed these steps, skip ahead to the Setting up the Server's Private NIC section. If you need to attach a preexisting instance to a newly created VLAN, the next section pertains to you.
Connecting an Existing Instance to a Private Network
To connect an existing instance to a private network, first, click the Instances button under the "Compute" menu on the left-hand sidebar.
Click on the "Name" of the instance you would like to network. On the instance's "Dashboard" tab, click the ellipsis (...) next to "Private networks" and select the Attach a network option from the drop-down menu.
Now select the private network you wish to attach to your instance from the drop-down menu.
Click the Attach button and your private network will be attached to your instance. You will not need to do any setup in the OS.
Note: If you are trying to connect your public cloud with a Dedicated Server you will need to make sure they are using the same VLAN ID. For more information, please check out our Configuring vRack for Dedicated Server article.
Utilizing vRack is an excellent way to securely and efficiently connect OVHcloud services. After completing this article, multiple instances should be connected via vRack.