Interview Prep/Linux/Networking, SSH and remote access

You need a server to have two network interfaces bonded for redundancy. How do you configure it?

IntermediateScenarioNetworking, SSH and remote access
Answer

Situation read → Link bonding (active-backup unless the switch supports LACP).

What I'd do →

sudo nmcli con add type bond con-name bond0 ifname bond0 bond.options "mode=active-backup,miimon=100"
sudo nmcli con add type ethernet slave-type bond con-name bond0-p1 ifname eno1 master bond0
sudo nmcli con add type ethernet slave-type bond con-name bond0-p2 ifname eno2 master bond0
sudo nmcli con mod bond0 ipv4.method manual ipv4.addresses 10.0.1.30/24 ipv4.gateway 10.0.1.1
sudo nmcli con up bond0
cat /proc/net/bonding/bond0

Why → active-backup needs no switch config; mode=802.3ad (LACP) gives aggregate bandwidth but needs switch support.

Interview tip → Test failover by pulling one cable or ip link set eno1 down.

All Linux questions Roadmap: Linux

More on Networking, SSH and remote access