Q: A production server requires high network availability. You have two physical NICs and need to configure network bonding (NIC teaming) for redundancy. Explain the bonding modes and which one you'd choose for a production database server.
Linux network bonding combines multiple physical NICs into a single logical interface for redundancy and/or throughput.
Want to master this scenario in a live sandbox? The Linux Foundation's Certified System Administrator (LFCS) & SRE Track covers this exact problem with hands-on terminal drills.
🛠️ Production Runbook & Step-by-Step Resolution
Direct Answer: "During an on-call shift, our alerts triggered when a critical Linux production server exhibited this behavior. The interviewer is testing: Network bonding/teaming, high availability, NIC redundancy.. I structure my answer around systematic triage first, root cause analysis second, and permanent remediation third."
Initial Diagnostics & Root Cause Analysis
Linux network bonding combines multiple physical NICs into a single logical interface for redundancy and/or throughput.
- Mode 0 (balance-rr): Round-robin — packets are distributed across NICs sequentially. Increases throughput but requires switch configuration (EtherChannel/LACP).
- Mode 1 (active-backup): Only one NIC is active; the standby takes over if the active fails. No switch configuration needed. Best for database servers where reliability matters more than throughput.
- Mode 2 (balance-xor): XOR-based distribution. Requires switch support.
Remediation & Permanent Safeguards
Common bonding modes: For a production database server, Mode 1 (active-backup) is the safest choice: The miimon=100 parameter checks link health every 100ms for fast failover.
nmcli con add type bond con-name bond0 ifname bond0 bond.options "mode=active-backup,miimon=100"
nmcli con add type ethernet con-name bond0-slave1 ifname eth0 master bond0
nmcli con add type ethernet con-name bond0-slave2 ifname eth1 master bond0
- Mode 4 (802.3ad / LACP): Dynamic link aggregation using the IEEE standard. Provides both redundancy and increased throughput. Requires switch LACP support.
- Mode 6 (balance-alb): Adaptive load balancing. No switch configuration needed, balances outgoing traffic.
- Mode 0 (balance-rr): Round-robin — packets are distributed across NICs sequentially. Increases th...
- Mode 1 (active-backup): Only one NIC is active; the standby takes over if the active fails. No sw...
- Mode 2 (balance-xor): XOR-based distribution. Requires switch support.
Senior hiring managers and bar raisers evaluate how you prioritize during outages. Avoid these common anti-patterns:
- Issuing immediate kill -9 (SIGKILL) commands rather than allowing graceful termination via kill -15 (SIGTERM) when configuring server requires high SIGKILL immediately halts execution without allowing processes to flush memory buffers, commit database transactions, or remove stale PID locks.
-
Overlooking file system inode exhaustion (df -i) when diagnosing 'No space left on device' errors when configuring server requires high
Millions of small files or unrotated session tokens can exhaust available file system inodes even when standard disk storage (
df -h) shows ample free space. - Exhausting open file descriptor allocations (ulimit -n) under intensive concurrent socket connections when configuring server requires high Reaching file descriptor exhaustion throws 'Too many open files' errors, preventing services from accepting new TCP client socket connections.
-
Permitting defunct zombie processes to accumulate without fixing parent process SIGCHLD waitpid reaping when configuring server requires high
Zombie processes consume process table entries; accumulating zombies can exhaust the system maximum PID limit (
pid_max).