Files
loc_az_hci/infrastructure/proxmox/INTERFACE_DETECTION_UPDATE.md
defiQUG c39465c2bd
Some checks failed
Test / test (push) Has been cancelled
Initial commit: loc_az_hci (smom-dbis-138 excluded via .gitignore)
Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-08 09:04:46 -08:00

2.3 KiB

Interface Detection Update

Changes Made

Updated the network configuration scripts to better detect 1 Gbps Ethernet interfaces by:

  1. Speed Detection: Uses ethtool and /sys/class/net/*/speed to detect interface speeds
  2. 1 Gbps Priority: Automatically selects 1 Gbps interfaces when available
  3. Full Interface Listing: Shows all detected interfaces with their speeds
  4. Manual Override: Allows specifying exact interfaces via environment variables

Updated Scripts

  • network-config.sh - Enhanced interface detection with speed checking
  • validate-network-setup.sh - Shows all interfaces with speeds during validation
  • README.md - Updated documentation with override options

Usage

The script will automatically detect and prioritize 1 Gbps interfaces:

./network-config.sh

Manual Override for R630 (if needed)

If the script doesn't detect nic2 and nic3 correctly on R630, you can override:

# For R630, if 1 Gbps ports are nic2 and nic3
NIC1_OVERRIDE=nic2 NIC2_OVERRIDE=nic3 ./network-config.sh

Check All Interfaces First

Run validation to see all detected interfaces and their speeds:

./validate-network-setup.sh

This will show:

  • All physical interfaces
  • Speed of each interface
  • Which interfaces will be selected

Interface Detection Logic

  1. Detects all physical interfaces (excludes bridges, bonds, VLANs)
  2. Checks speed using ethtool (primary) or /sys/class/net/*/speed (fallback)
  3. Prioritizes 1 Gbps interfaces if detected
  4. Falls back to first two physical interfaces if no speeds detected
  5. Allows manual override via environment variables

Example Output

[INFO] Detected physical interfaces:
  nic0: 10000 Mbps
  nic1: 10000 Mbps
  nic2: 1000 Mbps ⭐ (1 Gbps port)
  nic3: 1000 Mbps ⭐ (1 Gbps port)
[INFO] Using 1 Gbps interfaces: nic2 (LAN) and nic3 (WAN)

For R630 (pve2)

Since R630 may have 1 Gbps ports on nic2 and nic3, the script should detect them automatically. If not, use:

NIC1_OVERRIDE=nic2 NIC2_OVERRIDE=nic3 ./deploy-network-config.sh

Verification

After detection, the script will show:

  • Which interfaces were selected
  • Their speeds
  • Full configuration preview

Review the dry-run output to confirm correct interfaces are selected before applying.