Hello dear reader, you are on a page that i wrote for my own further usage and it's a self note for myself.
I encountered a network performance bottleneck on one of my homelab machines an old Macbook Pro 2019 where the connection was limited to 100Mbps. After investigation, I discovered the system was using a Fast Ethernet adapter instead of an available Gigabit Ethernet adapter. Here's how I upgraded the network speed from 100Mbps to 1Gbps.
First, I checked what network interfaces were available:
ip link show
cat /sys/class/net/*/speed 2>/dev/null | head -5
This revealed multiple USB Ethernet adapters with different capabilities. To identify the hardware properly:
lsusb | grep -i ether
ethtool enx00e04c36076b
The investigation showed two USB adapters:
- Realtek RTL8152 Fast Ethernet Adapter (100Mbps) - currently active
- ASIX AX88179 Gigabit Ethernet (1000Mbps) - available but unused
After connecting the cable to the gigabit adapter, I verified it was detected:
ip link set enx000000000272 up
ethtool enx000000000272 | grep -E 'Speed|Link detected'
The output confirmed 1000Mb/s speed and link detection. Now I needed to configure the system to use this adapter as the primary interface.
I checked the current netplan configuration and created a backup:
ls /etc/netplan/
cp /etc/netplan/50-cloud-init.yaml /etc/netplan/50-cloud-init.yaml.bak
Then I updated the netplan configuration to include both adapters with proper routing priorities:
cat > /etc/netplan/50-cloud-init.yaml << 'EOF'
network:
version: 2
ethernets:
enx00e04c36076b:
dhcp4: true
dhcp4-overrides:
route-metric: 200
enx000000000272:
dhcp4: true
dhcp4-overrides:
route-metric: 100
EOF
The key here is the route-metric values - lower numbers have higher priority. The gigabit adapter gets metric 100 (primary) while the fast ethernet gets metric 200 (backup).
Applied the configuration and verified the results:
netplan apply
sleep 10
ip addr show enx000000000272
ip route show
The routing table now showed the gigabit adapter as the default route with metric 100, while the 100Mbps adapter remained as backup with metric 200.
Final verification confirmed the upgrade was successful:
ethtool enx000000000272 | grep -E 'Speed|Duplex|Link detected'
ping -c 3 8.8.8.8
The results showed:
- Speed: 1000Mb/s
- Link detected: yes
- Network connectivity working properly
This solution provides several benefits:
- 10x network performance improvement (100Mbps → 1000Mbps)
- High availability (both adapters remain configured)
- Automatic failover to backup adapter if primary fails
- Configuration persists across reboots
If you need to troubleshoot similar issues, useful commands include:
# Map interfaces to USB devices
for i in /sys/class/net/enx*/device; do
echo "Interface: $(basename $(dirname $i))"
cat $i/uevent | grep -E 'PRODUCT|DRIVER'
echo
done
# Load specific drivers if needed
modprobe ax88179_178a
dmesg | tail -20 | grep -E 'enx|eth|usb'
To revert changes if needed:
cp /etc/netplan/50-cloud-init.yaml.bak /etc/netplan/50-cloud-init.yaml
netplan apply
0 yorum:
Yorum Gönder