Some checks failed
Test / test (push) Has been cancelled
Co-authored-by: Cursor <cursoragent@cursor.com>
2.3 KiB
2.3 KiB
Interface Detection Update
Changes Made
Updated the network configuration scripts to better detect 1 Gbps Ethernet interfaces by:
- Speed Detection: Uses
ethtooland/sys/class/net/*/speedto detect interface speeds - 1 Gbps Priority: Automatically selects 1 Gbps interfaces when available
- Full Interface Listing: Shows all detected interfaces with their speeds
- Manual Override: Allows specifying exact interfaces via environment variables
Updated Scripts
network-config.sh- Enhanced interface detection with speed checkingvalidate-network-setup.sh- Shows all interfaces with speeds during validationREADME.md- Updated documentation with override options
Usage
Automatic Detection (Recommended)
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
- Detects all physical interfaces (excludes bridges, bonds, VLANs)
- Checks speed using ethtool (primary) or /sys/class/net/*/speed (fallback)
- Prioritizes 1 Gbps interfaces if detected
- Falls back to first two physical interfaces if no speeds detected
- 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.