Configure network card under Debian
Foreword
In this article we explain how to configure an additional network card under Debian.
Prerequisites
- Unmanaged Debian server\n
Configuration
After the VPC network card has been added to the server in the customer center, it must be configured in the respective server. Make a note of the Mac address of the new VPC network card assigned by our system.
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 Debian 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.