Lacp¶
21 cards — 🟢 3 easy | 🟡 4 medium | 🔴 3 hard
🟢 Easy (3)¶
1. What is link aggregation and what two benefits does it provide?
Show answer
Link aggregation combines multiple physical links into one logical channel, providing bandwidth aggregation (N links = up to Nx bandwidth for concurrent flows) and redundancy (traffic shifts to surviving links if one fails).Remember: LACP bundles physical links. Benefits: more bandwidth + automatic failover.
2. What is the difference between LACP active and passive modes?
Show answer
Active mode sends LACP PDUs and actively initiates bond formation. Passive mode only responds to LACP PDUs from the partner. At least one side must be active; both sides passive means no bond forms.Remember: LACP = Link Aggregation Control Protocol (802.3ad). Bundles links for BW+redundancy.
Fun fact: LACP PDUs exchanged every 1s (fast) or 30s (slow) to detect failures.
3. What Linux bonding mode provides simple failover without requiring switch configuration?
Show answer
Mode 1 (active-backup). One interface is active, the rest are standby. If the active fails, a standby takes over. No special switch configuration is needed because only one link is active at a time.Remember: Active=initiates, Passive=responds. Both passive=nothing. "At least one Active."
Gotcha: Mismatched modes (static vs LACP) = no aggregation.
🟡 Medium (4)¶
1. Which Linux bonding modes require switch-side LAG configuration?
Show answer
Modes 0 (balance-rr), 2 (balance-xor), 3 (broadcast), and 4 (802.3ad/LACP) require the switch to be configured for link aggregation. Modes 1 (active-backup), 5 (balance-tlb), and 6 (balance-alb) do not.Remember: Active=initiates, Passive=responds. Both passive=nothing. "At least one Active."
Gotcha: Mismatched modes (static vs LACP) = no aggregation.
2. What does the xmit_hash_policy control and which is best for IP traffic?
Show answer
xmit_hash_policy determines how outbound traffic is distributed across bonded links. layer3+4 (hashes on source/destination IP and port) is best for IP traffic as it distributes individual TCP flows across links. A single flow still uses one link.Under the hood: LACP hashes (MAC/IP/port) to pick link per flow. Single flow = one link.
Gotcha: Single TCP connection stays on one link. Aggregate BW needs multiple flows.
3. How does link monitoring work in Linux bonding?
Show answer
miimon polls link status at a configurable interval (e.g., 100ms). If a link goes down, traffic shifts to remaining links. Alternative: ARP monitoring (arp_interval + arp_ip_target) verifies end-to-end reachability by sending ARP probes to a gateway.Remember: Linux bonding mode 4 = 802.3ad (LACP). Modes 0-6: rr,ab,xor,bcast,802.3ad,tlb,alb.
4. How do you check the status of a Linux bond and its member interfaces?
Show answer
Read /proc/net/bonding/bond0 for full details including LACP partner info, member interface status, and bond parameters. Quick check: ip link show bond0. Member interfaces show "master bond0" in their ip link output.Remember: Linux bonding mode 4 = 802.3ad (LACP). Modes 0-6: rr,ab,xor,bcast,802.3ad,tlb,alb.
🔴 Hard (3)¶
1. Why might a bonded link show asymmetric traffic distribution and how do you fix it?
Show answer
Hash-based distribution means a single TCP flow uses one link. With few concurrent flows, most traffic goes through one link. This is normal, not a fault. Fix by switching to layer3+4 hash policy for better distribution. True round-robin (mode 0) distributes evenly but can cause out-of-order packets.Remember: Linux bonding mode 4 = 802.3ad (LACP). Modes 0-6: rr,ab,xor,bcast,802.3ad,tlb,alb.
2. What happens when LACP PDU exchange fails and how quickly is a link removed?
Show answer
LACP partners exchange PDUs at fast (1s) or slow (30s) intervals. If 3 consecutive PDUs are missed, the link is removed from the aggregate. With fast rate, detection takes ~3 seconds. With slow rate, ~90 seconds. Both sides should use the same rate to avoid mismatches.Remember: LACP = Link Aggregation Control Protocol (802.3ad). Bundles links for BW+redundancy.
Fun fact: LACP PDUs exchanged every 1s (fast) or 30s (slow) to detect failures.
3. How do you create an 802.3ad LACP bond using nmcli with optimal settings?
Show answer
nmcli con add type bond con-name bond0 ifname bond0 bond.options "mode=802.3ad,lacp_rate=fast,xmit_hash_policy=layer3+4,miimon=100"; then add members: nmcli con add type ethernet con-name bond0-eth0 ifname eth0 master bond0. Fast LACP rate gives 3-second failover, layer3+4 hashing distributes IP flows.Remember: Linux bonding mode 4 = 802.3ad (LACP). Modes 0-6: rr,ab,xor,bcast,802.3ad,tlb,alb.