On the High Grade & SCALE ranges, it is not possible to manage additional IPs in bridged mode (via virtual MACs). It is therefore necessary to configure additional IPs in routed mode or via the vRack.
This guide explains how to configure the network on VMware ESXi.
Requirements
- a public block of IP addresses in your account, with a minimum of four addresses
- your chosen private IP address range
- a vRack-compatible dedicated server connected to the appropriate vRack
- a vRack service activated in your account
- access to the OVHcloud Control Panel
Instructions
Identify your vNICs
You will need to identify which NICs are public and which are private to complete the later steps in this guide. You will need to follow the next step in command mode (shell).
To begin, use the following command:
[root@ns1011868:~] esxcli network nic list
In the output displayed, focus on the NICs with a Link Status of "Up" and their MAC addresses, as shown in the example below.
Navigate to your OVHcloud Control Panel.
- Select
Bare Metal Cloud
. - Click on the
Dedicated Servers menu
. - Select your server.
- Click the
Network Interfaces
tab.
At the bottom of this screen, look at the list of Network Interfaces, focusing on the Type and MAC Address columns.
Compare these MAC addresses to those in the output in the previous step to determine which two NICs are public and which two are private.
In the examples in this guide:
- the public interfaces are
vmnic0
andvmnic5
; - the private interfaces are on
vmnic3
andvmnic4
.
Additional IP via vRack
Original configuration
Use the following command to see the current status of your vSwitch
[root@ns1017852:~] esxcli network vswitch standard list
The output will show one of your public NICs in the Uplinks line.
Explanations
You need to:
- create the aggregate on the public vSwitch
- create the vSwitch for the vRack
- create a port group
- create VMs using the new port group as the network interface.
Configure ESXi
1. Creating the aggregate in LACP mode on the vSwitch that carries the public interfaces
Use the following commands:
[root@ns1011868:~] esxcli network vswitch standard uplink add --uplink-name=vmnic5 --vswitch-name=vSwitch0
[root@ns1011868:~] esxcli network vswitch standard policy failover set -l iphash -v vSwitch0
[root@ns1011868:~] esxcli network vswitch standard policy failover get -v vSwitch0
The output should show both of your public NICs in the Standby Adapters line.
Then use the following commands:
[root@ns1011868:~] esxcli network vswitch standard policy failover set -a vmnic0 -v vSwitch0
[root@ns1011868:~] esxcli network vswitch standard policy failover get -v vSwitch0
The output should show one of the public NICs as Active.
2. Creating vSwitch and vRack aggregation on private interfaces
Use the following commands:[root@ns1011868:~] esxcli network vswitch standard add --vswitch-name=vRackvSwitch
[root@ns1011868:~] esxcli network vswitch standard uplink add --uplink-name=vmnic3 --vswitch-name=vRackvSwitch
[root@ns1011868:~] esxcli network vswitch standard uplink add --uplink-name=vmnic4 --vswitch-name=vRackvSwitch
[root@ns1011868:~] esxcli network vswitch standard policy failover set -l iphash -v vRackvSwitch
[root@ns1011868:~] esxcli network vswitch standard policy failover get -v vRackvSwitch
The output will show your private NICs as Standby Adapters:
3. Creating a port group for the new “vRackvSwitch” vSwitch
Use the following command:[root@ns1011868:~] esxcli network vswitch standard portgroup add --portgroup-name=portgroupvRackvSwitch --vswitch-name=vRackvSwitch
4. VM configuration
The VMs must have the new portgroupvRackvSwitch
port group in the network interface.
From the OVHcloud Control Panel, click Network
and vRack private network
.
Move your IP range to your vRack.
Once completed, it should look like this.
Configure a usable IP address
In the case of vRack, the first address and the last two addresses in a given IP block are always reserved for the network address, its gateway and its broadcast address respectively. This means that the first usable address is the second address in the block, as shown below:
46.105.135.96 # Reserved: network address
46.105.135.97 # First usable IP
46.105.135.98
46.105.135.99
46.105.135.100
46.105.135.101
46.105.135.102
46.105.135.103
46.105.135.104
46.105.135.105
46.105.135.106
46.105.135.107
46.105.135.108
46.105.135.109 # Last usable IP
46.105.135.110 # Reserved: network gateway
46.105.135.111 # Reserved: network broadcast
To configure the first usable IP address, you must edit the network configuration file as shown below. In this example, we use a subnet mask of 255.255.255.240.
The subnet mask used in this example is appropriate for our IP block. Your subnet mask may differ depending on the size of your block.
Additionally, in this example we are using ens18
for our interface name in this example. To check the name of your interface, use the ip add
command.
Configuration example of a client VM on Debian
File contents /etc/network/interfaces
:
auto lo ens18
iface lo inet loopback
iface ens18 inet static
address 46.105.135.97
netmask 255.255.255.240
gateway 46.105.135.110