Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands - CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround - CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check - NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere - MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates - LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference Co-authored-by: Cursor <cursoragent@cursor.com>
3.2 KiB
3.2 KiB
Add VLAN 11 Secondary IP - WSL2 Guide
Last Updated: 2026-01-15
Status: Active Documentation
System: WSL2 (Ubuntu 24.04)
Purpose: Configure machine to have both current IP and VLAN 11 IP
Current Configuration
- System: WSL2 (Ubuntu 24.04.3 LTS)
- Primary Interface: eth0
- Current IP: 192.168.0.4/24
- Target VLAN 11 IP: 192.168.11.23/24
- VLAN 11 Gateway: 192.168.11.1 (✅ Reachable)
Quick Setup (Immediate)
Run these commands:
# Add VLAN 11 IP address
sudo ip addr add 192.168.11.4/24 dev eth0
# Add route to VLAN 11 network
sudo ip route add 192.168.11.0/24 dev eth0 src 192.168.11.4
# Verify
ip addr show eth0 | grep "inet "
Expected Output:
inet 192.168.0.4/24 ... (current IP)
inet 192.168.11.23/24 ... (VLAN 11 IP)
Using Scripts
Option 1: Simple Script (Temporary)
sudo ./scripts/unifi/add-vlan11-secondary-ip-simple.sh
This adds the IP immediately but will be lost on reboot.
Option 2: Auto-Configuration on Login (WSL2 Recommended)
# Add to ~/.bashrc for auto-configuration
./scripts/unifi/add-vlan11-ip-to-bashrc.sh
This will automatically add the VLAN 11 IP every time you log in.
Or manually add to ~/.bashrc:
# Add this to the end of ~/.bashrc
if [ -n "$(ip link show eth0 2>/dev/null)" ] && ! ip addr show eth0 | grep -q "192.168.11.23"; then
sudo ip addr add 192.168.11.23/24 dev eth0 2>/dev/null || true
sudo ip route add 192.168.11.0/24 dev eth0 src 192.168.11.23 2>/dev/null || true
fi
Verification
After adding the IP:
# Check IP addresses
ip addr show eth0 | grep "inet "
# Should show both:
# inet 192.168.0.4/24 ... (current)
# inet 192.168.11.23/24 ... (VLAN 11)
# Test connectivity
ping -c 3 192.168.11.1 # VLAN 11 gateway
ping -c 3 192.168.11.10 # ml110
ping -c 3 192.168.11.11 # r630-01
ping -c 3 192.168.11.12 # r630-02
WSL2 Notes
Important for WSL2:
- No netplan: WSL2 doesn't use netplan by default
- No systemd: WSL2 may not have systemd running
- Best solution: Add to ~/.bashrc for auto-configuration on login
Persistence Options:
- ~/.bashrc (Recommended): Auto-configures on each login
- Manual: Run commands manually after each reboot
- Windows Task Scheduler: Can run a script on Windows startup
Troubleshooting
Issue: Cannot add IP address
Error: RTNETLINK answers: File exists
Solution: IP already exists, skip this step.
Issue: Route already exists
Error: RTNETLINK answers: File exists
Solution: Route already configured, skip this step.
Issue: IP lost after reboot
Solution: This is normal for WSL2. Use ~/.bashrc auto-configuration.
Summary
Quick Start:
# Add IP immediately
sudo ip addr add 192.168.11.23/24 dev eth0
sudo ip route add 192.168.11.0/24 dev eth0 src 192.168.11.23
# Make persistent (WSL2)
./scripts/unifi/add-vlan11-ip-to-bashrc.sh
Result:
- ✅ Keep current IP: 192.168.0.4
- ✅ Add VLAN 11 IP: 192.168.11.23
- ✅ Access both networks simultaneously
- ✅ Auto-configure on login (if bashrc script used)
Last Updated: 2026-01-15