NIC Bonding Setup
Jun 10, 24Testing nic bonding in Arch Linux. I have a dual-port nic and I want to combine them. Mode 0 is round robin, and mode 1 is active-backup. First, create the connection:
nmcli connection add type bond ifname bond0 mode 0
This creates a connection called bond-bond0. It should be listed with this command:
nmcli device status
Next, create the slaves out of the nics, replacing eth4 and eth5 with the correct interfaces.
nmcli connection add type bond-slave ifname eth4 master bond0
nmcli connection add type bond-slave ifname eth5 master bond0
I set the bond connection to use dhcp like this:
sudo nmcli connection modify bond-bond0 ipv4.method auto
Then I can bring up the interface like this:
sudo nmcli connection up bond-bond0
If everything is working, you can get the status by doing this command:
cat /proc/net/bonding/bond0
If it worked all the adapters will be nested there as a primary and two slave interefaces.
Bonding Mode: load balancing (round-robin) MII Status: up MII Polling Interval (ms): 100 Up Delay (ms): 0 Down Delay (ms): 0 Peer Notification Delay (ms): 0
Slave Interface: enp1s0f0 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 4 Permanent HW addr: 00:15:17:0e:bc:f2 Slave queue ID: 0
Slave Interface: enp1s0f1 MII Status: up Speed: 1000 Mbps Duplex: full Link Failure Count: 4 Permanent HW addr: 00:15:17:0e:bc:f3 Slave queue ID: 0