With the move to 10GbE networking between switches, configured in a star topology with a 10GbE switch in the center, it is desirable to use NIC bonding on the master's two 10GbE NICs. The method below uses systemd-networkd
Create a new file under /etc/systemd/network/bond.network
:
[Unit]
Description=Bond interface
[Match]
Name=eth4
Name=eth5
[Network]
Bond=bond0
Create a new file under /etc/systemd/network/bond0.netdev
:
[NetDev]
Name=bond0
Kind=bond
Create a new file under /etc/systemd/network/bond0.network
:
[Match]
Name=bond0
[Network]
DHCP=no
Address=192.168.1.1/24
DNS=192.168.1.1
Then restart systemd-networkd: systemctl restart systemd-networkd
Previous method
With the addition of 10Gb-E optical networking, the master is no longer configured to team nics.
Teamed NICs Setup on Debian
Here is the command history for setting up the teamed NICs:
sudo apt-get install ifenslave
ifconfig
at this point, you can reboot and set up the pair. Edit /etc/network/interfaces. Read iptables setup to understand the /etc/iptables-rules line:
# The loopback network interface
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet manual
bond-master bond0
auto eth1
iface eth1 inet manual
bond-master bond0
auto bond0
iface bond0 inet static
address 192.168.1.1
netmask 255.255.255.0
pre-up iptables-restore < /etc/iptables-rules
bond-mode balance-xor
bond-miimon 100
bond-slaves none
At this point, you reboot and check the setup:
cat /proc/net/bonding/bond0
cd /proc/net/bonding
# I used iperf to check the speed of the pair. You will probably have to do some googling to use it.
sudo apt-get install iperf
iperf -c 10.23.115.29 -i 2
# check the speed of the nics
sudo apt-get install ethtool
ethtool eth0 | grep -i spee