How to Configure the Network Card in a Bare Metal Server?

Learn how to configure your network card and how redundancy works.

NOTE: For this example, we use CentOS 7. The steps might be different for different Linux distributions.

First, navigate to:


For a single network card

If the dedicated server only has one network card, the network card configuration should be as follows:

Server terminal displaying the network card configuration.

This file can be opened using any text editor. In our case:

vi /etc/sysconfig/network-scripts/ifcfg-enp1s0f0

NOTE: If you decide to use the single network card method (not bond0), configure only NIC A, as NIC B will work only as bond0 redundancy.

Network redundancy

Some of our dedicated servers have network redundancy. For that, you need to configure the bond interface.

vi /etc/sysconfig/network-scripts/ifcfg-bond0
Server terminal showing the  configuration of the bond interface.

Once you create the Bond interface, both network interfaces should be as follows:

vi /etc/sysconfig/network-scripts/ifcfg-enp1s0f0 and vi /etc/sysconfig/network-scripts/ifcfg-enp1s0f1
Server terminal demonstrating two bond network interfaces.

Once both network cards are configured, you need to run this command:

modprobe --first-time bonding

Afterward, restart the network service:

systemct restart network.service

NOTE: BONDING_OPTS=”mode=4 miimon=100 lacp_rate=fast” is required for our system to work. Changing the mode from 4 to 3 might cause problems. For example, that might lead to packet loss. We recommend using the line as provided.

Additional information

In some of our locations, a dedicated server is given /29. In others, /30. Due to this, the mask of your server might be different. The prefix can be checked by running the command

ip a

and then checking the netmask (/29:, /30: or contacting our support.

NOTE: If your system is running the NetworkManager service, we recommend stopping it. You can do it using:

systemctl stop NetworkManager.service


systemctl disable NetworkManager.service

If you do not require network redundancy, you should only set up the first network card. If you set up the second network card, it will not work, as it only works on the bonded interface.

A glossary of network interface configuration files:

  • BOOTPROTO – dictates what protocol is used on boot-time
  • DEVICE – device name
  • DNS1 – primary DNS IP address
  • DNS2 – secondary DNS IP address
  • GATEWAY – gateway IP used by the network card
  • HWADDR – MAC address of network card
  • IPADDR – IP address used by the network card
  • MASTER – shows what device has master control
  • NETMASK – a netmask used by the network card
  • ONBOOT – dictates if the network card starts on boot
  • SLAVE – dictates if the device is stand-alone or if it runs as a slave device
  • TYPE – identifies the type of network interface device
  • USERCTL – identifies whether root or all system users can control the device

If you have any other questions, feel free to contact our Support at

Was this article helpful?

Need support?

If you need any further help, don't hesitate to send a support request to our support team.