Use this when a VM such as a firewall needs a dedicated physical NIC.
NIC Passthrough
NIC passthrough gives a VM a physical network card or port for line-rate, low-latency networking, typically for firewalls or NFV. It bypasses the virtual switch and limits migration; SR-IOV virtual functions are often a better compromise.
1. NIC passthrough gives native network performance.
2. VM loses vSwitch features (VLAN, firewall).
3. No live migration.
4. Prefer SR-IOV for sharing.
5. Check link in guest.
physical NIC → vfio → guest driver
Context & applicabilityCommon mistakes · platform/version boundaries
- Expecting live migration with SR-IOV VFs (not supported on most platforms).
- VF VLAN and MAC settings not set on the host, allowing spoofing.
- Firmware not supporting enough VFs.
Operational reference
Fast context before you go deeper.
ip link show enp65s0f0Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 SR-IOV checks Verify boundary
lspci -nn | grep -i ethernet
cat /sys/class/net/enp65s0f0/device/sriov_totalvfs
echo 8 > /sys/class/net/enp65s0f0/device/sriov_numvfs
ip link show enp65s0f0 # lists VFs and their MACs/VLANs
VFs bypass the host's virtual switch, so host firewall rules and some monitoring do not apply to that traffic.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Bypasses virtual switch and its features.
- Blocks migration.
- Consider SR-IOV instead.
lspci -nnk | grep -A3 Ethernet— NIC bound to vfioethtool -i <if>— guest driverip -s link— guest counters
ReferenceWhy it matters1 section · depth on demand
Options for fast VM networking
| Option | Live migration | Notes |
|---|---|---|
| Whole NIC passthrough | No | Full line rate, exclusive |
| SR-IOV virtual functions | Limited | Many VMs share one NIC with near-native speed |
| Paravirtual (virtio/VMXNET3) | Yes | Good enough for most workloads |
| DPDK / vhost-user | Yes (with care) | NFV and high packet rates |
SR-IOV: echo 8 > /sys/class/net/<if>/device/sriov_numvfs, then assign VFs to VMs.
ReferenceImportant terms & boundaries1 section · depth on demand
In depth
NIC passthrough gives a VM a physical NIC or port: near line-rate packet processing (firewalls, DPDK/NFV, packet capture) and hardware offloads. Costs: no live migration, no vSwitch features (VLAN policies, mirroring, firewall) and one port per VM.
SR-IOV is usually the better choice for many VMs on one NIC; full passthrough suits a dedicated firewall VM owning WAN ports. Remember to remove the port from host bonds/bridges before passing it through.
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in PCI & Device Passthrough → NIC Passthrough. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://docs.kernel.org/driver-api/vfio.html · confidence 94%