Configure the network card in a Linux server
Foreword
After the VPC network card has been added to the server in the customer center, it must be configured in the respective server. To do this, make a note of the Mac address assigned by our system to the new VPC network card.
You can use the MAC address to determine which adapter name has been assigned to the network card by the operating system. For Debian or Ubuntu-based operating systems, ens19
is often assigned for the network card that has just been added.
To do this, log in to the respective server via SSH and execute the command ip a
to display all available network cards.
ip a
// [...]
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 16:ca:8f:70:23:22 brd ff:ff:ff:ff:ff:ff:ff:ff
altname enp0s19
Use the Mac address to determine which adapter name was assigned by the operating system.
In this case, the adapter name ens19
was assigned.
Then open the network configuration in a file editor:
nano /etc/network/interfaces
Then add the configuration of the adapter with the respective adapter name that you determined in the previous step. E.g. ens19
:
# VPC Network
auto ens19
iface ens19 inet static
address 10.20.0.1/24
Please make sure that you do not assign the IP address of your VPC network twice.
Then save the changes and execute the command ifup ens19
to activate the new network card.
Repeat these steps on all servers for which you want to set up an isolated VPC network connection and assign a new IP address from the defined network range for each server.