Network interface. Configure interface to use 10Gbps network card

After purchasing a server you can see the port's current status and change server's settings in the DCImanager.

Every dedicated server is usually connected by two network cards to different network switches. We recommend to use independent Link Aggregation Control Protocol (LACP) in order to get system's failover capability.

By default, installed OS is configured to use 1 Gbps interface. To use a 10 Gbps network card, you should configure 10 Gbps interface manually.

 

(!) Instructions below is for experienced users. Consult your system administrator if you have any difficulties.

This article covers network configuration for:

Ubuntu/Debian

CentOS

 

1. You'll need to check the interfaces with ethtool and modify network configuration file. You may use your favourite editor to do that. In this case we'll use a simple text editor called nano.

Make sure required tools are installed.

For Ubuntu/Debian:

apt-get install ethtool net-tools nano

For CentOS:

yum install ethtool net-tools nano

 

2. Check server's active interfaces by command:

ifconfig

(i) Interface will be eno1 for CentOS, eth0 for Debian.

Example output(UbuntuDebian):

root@10g:~# ifconfig
eth0      Link encap:Ethernet  HWaddr 0c:c4:7a:d9:db:fe
          inet addr:92.223.xxx.xxx  Bcast:92.223.xxx.255  Mask:255.255.255.0
          inet6 addr: fe80::ec4:7aff:fed9:dbfe/64 Scope:Link
          inet6 addr: 0a00:00c0:00::00/48 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:8955 errors:0 dropped:0 overruns:0 frame:0
          TX packets:51 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:540520 (540.5 KB)  TX bytes:7175 (7.1 KB)
          Memory:fb520000-fb53ffff

 

3. Check whether the current interface is 10Gbps.

ethtool eth0

Command output(Ubuntu/Debian):

Settings for eth0:
        Supported ports: [ TP ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Supported pause frame use: Symmetric
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Full
        Advertised pause frame use: Symmetric
        Advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: Twisted Pair
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        MDI-X: on (auto)
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

Supported link modes:1000baseT/Full means that interface is 1 Gbps.

 

4. So, if the active interface is not 10 Gbps, let's check all interfaces including inactive ones.

ifconfig -a

Example command output:

eth0      Link encap:Ethernet  HWaddr 0c:c4:7a:d9:db:fe
          inet addr:92.223.xxx.xxx  Bcast:92.223.xxx.255  Mask:255.255.255.0
          inet6 addr: fe80::ec4:7aff:fed9:dbfe/64 Scope:Link
          inet6 addr: 0a00:00c0:00::00/48 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:171247 errors:0 dropped:0 overruns:0 frame:0
          TX packets:627 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:10599299 (10.5 MB)  TX bytes:80024 (80.0 KB)
          Memory:fb520000-fb53ffff
eth1      Link encap:Ethernet  HWaddr 0c:c4:7a:d9:db:ff
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
          Memory:fb500000-fb51ffff
eth2      Link encap:Ethernet  HWaddr a0:36:9f:a9:ac:d8
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
eth3      Link encap:Ethernet  HWaddr a0:36:9f:a9:ac:da
          BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

 

5. Activate the remaining interfaces:

(i) Interface name will be eno1 for CentOS, eth0 for Debian.

ifconfig eth1 up
ifconfig eth2 up
ifconfig eth3 up

Check if interfaces are up by ifconfig command (you'll see active interfaces).

 

6. Find 10 Gb interface there:

ethtool eth1
ethtool eth2
ethtool eth3

Example output for eth2(Debian):

Settings for eth2:
        Supported ports: [ FIBRE ]
        Supported link modes:   10000baseT/Full
        Supported pause frame use: No
        Supports auto-negotiation: No
        Advertised link modes:  10000baseT/Full
        Advertised pause frame use: No
        Advertised auto-negotiation: No
        Speed: 10000Mb/s
        Duplex: Full
        Port: Direct Attach Copper
        PHYAD: 0
        Transceiver: external
        Auto-negotiation: off
        Supports Wake-on: d
        Wake-on: d
        Current message level: 0x00000007 (7)
                               drv probe link
        Link detected: yes

Make sure that "Link detected" is "yes" and "Speed" is "10000Mb/s" (10 Gbps).

 

7. For now we have to change active interface from 1 Gbps to 10 Gbps in the configuration file. Edit interfaces using nano:

Debian:

nano /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface

auto eth0

iface eth0 inet static
        address 92.223.xxx.xxx
        netmask 255.255.255.x
        network 92.223.xxx.x
        broadcast 92.223.xxx.255
        gateway 92.223.xxx.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8
        dns-search example.com

iface eth0 inet6 static
        address 0a00:00c0:00::00
        netmask 48
        gateway 0a00:00c0:00::1

We have to change eth0 to eth2 in all cases(note that lo doesn't require any changes):

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eth2

iface eth2 inet static
      address 92.223.xxx.xxx
        netmask 255.255.255.0
        network 92.223.xxx.x
        broadcast 92.223.xxx.255
        gateway 92.223.xxx.1
        # dns-* options are implemented by the resolvconf package, if installed
        dns-nameservers 8.8.8.8
        dns-search example.com

iface eth2 inet6 static
        address 0a00:00c0:00::00
        netmask 48
        gateway 0a00:00c0:00::1

CentOS: Move network settings to 10Gbps (ifcfg-ens2f0) config file and disable 1Gpbs (ifcfg-eno1) if you don't need it.

nano /etc/sysconfig/network-scripts/ifcfg-eno1
nano /etc/sysconfig/network-scripts/ifcfg-ens2f0

 

8. Save the configuration file(Ctrl+X) and reboot your server.

 

9. Check the server after rebooting:

ifconfig

 Command output:

eth2      Link encap:Ethernet  HWaddr a0:36:9f:a9:ac:d8
          inet addr:92.223.00.000  Bcast:92.223.00.255  Mask:255.255.255.0
          inet6 addr: fe80::a236:9fff:fea9:acd8/64 Scope:Link
          inet6 addr: 0a00:00c0:00::00/48 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:11682 errors:0 dropped:0 overruns:0 frame:0
          TX packets:81 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:705793 (705.7 KB)  TX bytes:11804 (11.8 KB)

 

(i) If you fail to connect it means that you done something wrong. Please use IPMI to recover your server or try to start from scratch: How to reinstall OS on Dedicated server via template

 

Was this article helpful?
Recently viewed articles