By utilizing vRack, our VLAN (Virtual LAN) technology, you can route traffic privately between your OVHcloud services. In this article, we will cover setting up a subinterface on Ubuntu 16.04.
- Creating a Subinterface in Ubuntu 16.04
Note: Game Dedicated Servers do not come with a private NIC and, therefore, cannot utilize vRack.
Creating a Subinterface in Ubuntu 16.04
Let's start by finding the name of the private ethernet interface. Use the
ip command to display a list of the server's network interfaces:
$ ip addr list
Note: The private ethernet interface is the one that is NOT configured with the WAN (Wide Area Network) IP address.
The name of our private ethernet interface is:
With the name of the private ethernet interface, let's create a subinterface. Use a text editor of your choice to edit the network configuration file:
$ sudo vi /etc/network/interfaces
Add the following to the file to create a subinterface and assign it a private IP address on the private ethernet interface. Adjusting the items in red according to your specifications.
Note: Any server connected to vRack with a private IP address (in the following ranges: 10.0.0.0/8, 172.16.0.0/12, or 192.168.0.0/16), on the same subnet, and using the same VLAN ID will be able to connect over vRack. In our example, we are using 192.168.0.0/16 (Subnet mask: 255.255.0.0).
auto eth1.99 iface eth1.99 inet static address 192.168.0.1 netmask 255.255.0.0 vlan-raw-device eth1
.99 denotes the VLAN ID we have chosen, this is used to tag traffic. You can choose any VLAN ID between 2 and 4000, however, any servers you wish to privately connect together must use the same VLAN ID.
Next, use the
systemctl command to restart networking:
$ sudo systemctl restart networking
Lastly, use the
ifconfig command to confirm the configuration of the subinterface.
eth1.99 Link encap:Ethernet HWaddr ac:1f:6b:01:45:fb inet addr:192.168.0.1 Bcast:192.168.255.255 Mask:255.255.0.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20 errors:0 dropped:0 overruns:0 frame:0 TX packets:75 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1732 (1.7 KB) TX bytes:6042 (6.0 KB) Memory:fb100000-fb11ffff
Repeat these steps on the other server(s) using Ubuntu 16.04 with a different IP address but within the same subnet (e.g., if you used our example, any IP between 192.168.0.2-192.168.255.254).
After completing this, ping one server from another using the private IP address to verify that the servers are successfully connected via vRack.
Utilizing vRack is an excellent way to securely and efficiently connect OVHcloud services. After completing this article, you should know how to connect an Ubuntu 16.04 machine to vRack.