No Built-in Ethernet? No Problem! USB Ethernet on Proxmox Explained
Setting up Ethernet over USB on a Proxmox server is a common scenario, especially when your hardware lacks a built-in Ethernet port, or you need an additional network interface. Here’s a step-by-step guide on how to do it:
Important Considerations:
- Reliability: While possible, USB Ethernet adapters can sometimes be less reliable than integrated or PCIe Ethernet cards. For critical production environments, a PCIe card is generally recommended if available.
- Driver Support: Most modern USB Ethernet adapters use common chipsets (like Realtek) that are usually supported by the Linux kernel (which Proxmox is based on). However, if you have an obscure adapter, you might need to install additional drivers.
- Interface Naming: Linux (and thus Proxmox) uses consistent network interface naming (e.g.,
enxfollowed by part of the MAC address, orethX). Be aware that if you plug the USB adapter into a different USB port, its name might change, which can break your configuration. You can use persistent naming if this becomes an issue (see the Proxmox Network Configuration documentation forsystemd-networkdlinkfiles).
Steps to Configure Ethernet over USB in Proxmox:
We’ll primarily be working with the /etc/network/interfaces file, which is where Proxmox manages its network configuration.
1. Connect the USB Ethernet Adapter:
- Plug your USB Ethernet adapter into an available USB port on your Proxmox server.
- Connect an Ethernet cable from the adapter to your network.
2. Identify the USB Ethernet Interface:
- Access your Proxmox server’s shell (via SSH or direct console access).
- Run the following command to list all network interfaces:
1ip aor
1ifconfig -a- Look for a new interface that wasn’t there before. It will likely start with
enxfollowed by a long hexadecimal string (e.g.,enx0123456789ab) or potentiallyusb0if it’s a very simple adapter or a USB tethered device. Note down this interface name.
3. Edit the Network Configuration File:
- Open the
/etc/network/interfacesfile using a text editor likenano:
1nano /etc/network/interfaces4. Add a New Network Bridge for the USB Adapter:
Proxmox uses Linux bridges (vmbrX) to manage network interfaces and allow VMs/containers to access the physical network. You’ll create a new bridge and assign your USB Ethernet interface to it.
- Option A: DHCP Configuration (if your network has a DHCP server)
- Add the following lines to the end of the file, replacing
enx0123456789abwith the actual name of your USB Ethernet interface:
1auto vmbr1
2iface vmbr1 inet dhcp
3bridge-ports enx0123456789ab
4bridge-stp off
5bridge-fd 0- Option B: Static IP Configuration
Add the following lines, replacing enx0123456789ab with your USB Ethernet interface name, 192.168.1.10/24 with your desired IP address and subnet mask, and 192.168.1.1 with your gateway:
1 auto vmbr1
2 iface vmbr1 inet static
3 address 192.168.1.10/24
4 gateway 192.168.1.1
5 bridge-ports enx0123456789ab
6 bridge-stp off
7 bridge-fd 0-
Note: Only one bridge on your Proxmox host can have a
gatewaydefined. If you already have avmbr0with a gateway, do not add a gateway tovmbr1. Ifvmbr1is your only network connection or your primary one, then it should have the gateway. -
Explanation of the bridge parameters:
-
auto vmbr1: Tells Proxmox to bring up this bridge automatically on boot. -
iface vmbr1 inet dhcp(orinet static): Configures the bridge to get an IP address via DHCP or to use a static IP. -
bridge-ports enx0123456789ab: Specifies that the physical USB Ethernet interface will be a member of this bridge. -
bridge-stp off: Disables Spanning Tree Protocol on the bridge (generally recommended for simple home lab setups). -
bridge-fd 0: Sets the bridge forward delay to 0 seconds (reduces the time it takes for the bridge to start forwarding traffic).
5. Save and Apply Changes:
-
Save the
interfacesfile (Ctrl+O, then Enter, then Ctrl+X innano). -
Apply the network configuration changes.
-
Recommended (Proxmox VE 7.0+ with
ifupdown2):
systemctl restart networkingThen, you can verify the status:
systemctl status networkingAnd apply changes in the Proxmox GUI by clicking “Apply Configuration” in the Network section of your node.
- If
systemctl restart networkingdoesn’t work or you’re on an older Proxmox version, or for more critical changes (requires a brief network outage):
reboot6. Verify Network Connectivity:
- After applying changes or rebooting, check if your Proxmox host has network connectivity through the new USB Ethernet adapter.
ip aVerify that vmbr1 (or whatever bridge name you used) has an IP address.
ping google.comor ping an IP address on your local network.