Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SK-1968 - Customer/Internal Feedback - Update on network configurations for vrack on SD #7653

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
566fca8
guide and screenshot update
Mar 12, 2025
fb1a1ca
guide update
Mar 12, 2025
cb8c7cf
update file
Mar 13, 2025
fcf9146
update FR & EN files for configuring vrack on SD
Mar 18, 2025
6dcf4c4
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
dfb2f7a
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
e93a4c9
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
9670f13
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
1040770
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
2d8b30a
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
0fe9b35
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
26b732f
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
ed747d2
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
16436e3
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
17e9019
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
cf0e72d
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
5bd6028
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
2019b02
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
a76f15a
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
db3219b
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
44e44c4
Update pages/bare_metal_cloud/dedicated_servers/vrack_configuring_on_…
Jessica41 Mar 19, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
title: 'Configuring the vRack on your dedicated servers'
excerpt: 'Find out how to configure the vRack on two or more dedicated servers'
updated: 2024-10-17
updated: 2025-03-17
---

## Objective
Expand Down Expand Up @@ -56,9 +56,9 @@ For example purposes, the configuration details below will have the IP address r
You can use any private IP range of your choice and any address within that range.
>

#### GNU/Linux configurations
#### Identifying the vRack interface <a name="vrack-interface"></a>

The network interface names of your servers are not always the same. Whenever used in the following examples, replace NETWORK_INTERFACE with the appropriate interface name.
The network interface names of your servers are not always the same.

The sure way to verify the correct interface for the vRack is to check the tab `Network interfaces`{.action} of your server in the [OVHcloud Control Panel](/links/manager). In the table at the bottom, take note of the MAC address which is also the **Name** of the **Private** interface.

Expand All @@ -70,30 +70,40 @@ Once connected to your server via SSH, you can list your network interfaces with
ip a
```

In the line that begins with ```link ether```, you can verify that this interface matches the **Private** interface listed in your [OVHcloud Control Panel](/links/manager). Use this interface name to replace `NETWORK_INTERFACE` in the configurations below (example: `eno2`).
In the line that begins with ```link ether```, you can verify that this interface matches the **Private** interface listed in your [OVHcloud Control Panel](/links/manager). Use this interface name to replace `NETWORK_INTERFACE` in the configurations below (example: `eth1`).

```console
link ether f0:00:00:ef:0e:f0
```

For example purposes, we will use the IP address range of `192.168.0.0/16` (**Subnet mask**: `255.255.0.0`).


#### GNU/Linux configurations

##### **Debian 12**

Using a text editor of your choice, open the network configuration file located in `/etc/netplan/` for editing. Here the file is called `50-cloud-init.yaml`.

```bash
editor /etc/netplan/50-cloud-init
sudo nano /etc/netplan/50-cloud-init.yaml
```

Add the IP configuration to the existing one after the line `ethernets`:
Add the following lines to the existing configuration after the line `version: 2`. Replace `NETWORK_INTERFACE` and `IP_ADDRESS/PREFIX` with your own values.

```yaml
ethernets:
NETWORK_INTERFACE:
dhcp4: no
dhcp4: false
addresses:
- 192.168.0.1/16
- IP_ADDRESS/PREFIX
```

**Example**

![netplan config](images/netplan_configuration.png){.thumbnail}


> [!warning]
>
> It is important to respect the alignment of each element in `yaml` files as represented in the example above. Do not use the tab key to create your spacing. Only the space key is needed.
Expand All @@ -104,7 +114,7 @@ Save your changes to the config file and exit the editor.
Apply the configuration:

```bash
netplan apply
sudo netplan apply
```

Repeat this process for your other server(s) and assign an unused IP address from your private range. Once you have done this, your servers will be able to communicate with each other on the private network.
Expand All @@ -114,24 +124,28 @@ Repeat this process for your other server(s) and assign an unused IP address fro
Using a text editor of your choice, open the network configuration file located in `/etc/network/interfaces.d` for editing. Here the file is called `50-cloud-init`.

```bash
editor /etc/network/interfaces.d/50-cloud-init
sudo nano /etc/network/interfaces.d/50-cloud-init
```

Add the following lines:
Add the following lines to the existing configuration, replace `NETWORK_INTERFACE`, `IP_ADDRESS` and `NETMASK` with your own values:

```console
auto NETWORK_INTERFACE
iface NETWORK_INTERFACE inet static
address 192.168.0.1
netmask 255.255.0.0
address IP_ADDRESS
netmask NETMASK
```

**Example**

![debian config](images/debian_configuration.png){.thumbnail}

Save your changes to the config file and exit the editor.

Restart the networking service to apply the configuration:

```bash
systemctl restart networking
sudo systemctl restart networking
```

Repeat this process for your other server(s) and assign an unused IP address from your private range. Once you have done this, your servers will be able to communicate with each other on the private network.
Expand All @@ -141,19 +155,23 @@ Repeat this process for your other server(s) and assign an unused IP address fro
Using a text editor of your choice, open the network configuration file located in `/etc/netplan/` for editing. Here the file is called `50-cloud-init.yaml`.

```bash
editor /etc/netplan/50-cloud-init.yaml
sudo nano /etc/netplan/50-cloud-init.yaml
```

Add the IP configuration to the existing one after the line `ethernets`:
Add the following lines to the existing configuration after the line `version: 2`. Replace `NETWORK_INTERFACE`and `IP_ADDRESS/PREFIX` with your own valueS.

```yaml
ethernets:
NETWORK_INTERFACE:
dhcp4: no
dhcp4: false
addresses:
- 192.168.0.1/16
- IP_ADDRESS/PREFIX
```

**Example**

![netplan config](images/netplan_configuration.png){.thumbnail}

> [!warning]
>
> It is important to respect the alignment of each element in `yaml` files as represented in the example above. Do not use the tab key to create your spacing. Only the space key is needed.
Expand All @@ -164,46 +182,158 @@ Save your changes to the config file and exit the editor.
Apply the configuration:

```bash
netplan apply
sudo netplan apply
```

Repeat this process for your other server(s) and assign an unused IP address from your private range. Once you have done this, your servers will be able to communicate with each other on the private network.

##### **CentOS**
##### **CentOS, AlmaLinux and RockyLinux**

Once you have identified your private network interface, use the following command to create a network configuration file.

Replace `NETWORK_INTERFACE` with your own value.

```bash
sudo touch /etc/sysconfig/network-scripts/ifcfg-NETWORK_INTERFACE
```

Using a text editor of your choice, open the file `/etc/sysconfig/network-scripts/ifcfg-NETWORK_INTERFACE`.
For example, if the private interface is named `eth1`, we have the following:

```bash
editor /etc/sysconfig/network-scripts/ifcfg-NETWORK_INTERFACE
sudo touch /etc/sysconfig/network-scripts/ifcfg-eth1
```

Add these lines:
Next, use a text editor of your choice to edit this file.

```bash
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth1
```

Add these lines, replacing `NETWORK_INTERFACE`, `IP_ADDRESS` and `NETMASK` with your own values:

```console
DEVICE=NETWORK_INTERFACE
BOOTPROTO=static
IPADDR=192.168.0.1
NETMASK=255.255.0.0
IPADDR=IP_ADDRESS
NETMASK=NETMASK
ONBOOT=yes
TYPE=Ethernet
```

**Example**

![centos config](images/centos_alma_configuration.png){.thumbnail}

Save your changes to the config file and exit the editor.

Restart the networking service to apply the changes:

```bash
systemctl restart networking
sudo systemctl restart networking
```

On **CentOS 8** use this command:
On **CentOS 8, AlmaLinux and RockyLinux** use this command:

```bash
systemctl restart NetworkManager.service
sudo systemctl restart NetworkManager.service
```

Repeat this process for your other server(s) and assign an unused IP address from your private range. Once you have done this, your servers will be able to communicate with each other on the private network.

##### Fedora

Once you have identified the name of your private interface (as explained [here](#vrack-interface)), verify that is it connected. In our example, our interface is called `eno2`:

```bash
$ nmcli device status

DEVICE TYPE STATE CONNECTION
eno1 ethernet connected cloud-init eno1
lo loopback connected (externally) lo
eno2 ethernet disconnected --
```

If the `STATE` of the `DEVICE` appears as `disconnected`, it must be connected in before configuring the IP.

When adding an **ethernet** connection, we have to create a configuration profile which we then assigned to a device.

Run the following command, replacing `INTERFACE_NAME` and `CONNECTION_NAME` with your own values.

In our example, we named our configuration profile `private-interface`.

```bash
nmcli connection add type ethernet con-name CONNECTION_NAME ifname INTERFACE_NAME
```

**example**

```bash
nmcli connection add type ethernet con-name private-interface ifname eno2
```

Check that the interface has been connected correctly:

```bash
$ nmcli device status

DEVICE TYPE STATE CONNECTION
eno1 ethernet connected cloud-init eno1
eno2 ethernet connected private-interface
lo loopback connected (externally) lo
```

Once this is done, a new configuration file named *xxxxxxxxxx.nmconnection* will be created in the folder `/etc/NetworkManager/system-connections`.

```bash
[user@server ~]$ cd /etc/NetworkManager/system-connections
[user@server system-connections]$ ls
cloud-init-eno1.nmconnection private-interface.nmconnection
```

You can then edit this file using the `nmcli` handler, replacing `IP_ADDRESS`, `PREFIX` and `CONNECTION_NAME` with your own values.

- Add your IP:

```bash
nmcli connection modify CONNECTION_NAME IPv4.address IP_ADDRESS/PREFIX
```

**example**

```bash
nmcli connection modify private-interface IPv4.address 192.168.0.1/16
```

- Change the configuration from **auto** to **manual**:

```bash
sudo nmcli connection modify CONNECTION_NAME IPv4.method manual
```

**example**

```bash
sudo nmcli connection modify private-interface IPv4.method manual
```

- Make the configuration persistent:

```bash
sudo nmcli con mod CONNECTION_NAME connection.autoconnect true
```

**example**

```bash
sudo nmcli con mod private-interface connection.autoconnect true
```

Reboot your network with the following command:

```bash
sudo systemctl restart NetworkManager
```

#### Windows configuration

For example purposes, the following configurations will use the IP address range of `192.168.0.0/16` (**Subnet mask**: `255.255.0.0`).
Expand Down Expand Up @@ -246,4 +376,4 @@ Repeat this process for your other server(s) and assign an unused IP address fro

[Creating multiple vLANs in a vRack](/pages/bare_metal_cloud/dedicated_servers/creating-multiple-vlans-in-a-vrack)

Join our [community of users](/links/community).
Join our [community of users](/links/community).
Loading