This is a proof of concept. There are still some security issues to iron out. My goal was to use SR-IOV between VMs instead of the usual software bridge. I have not run actual performance tests on throughput or CPU utilization. From what I've read, virtual (hardware) NICs will only work if the link is active. The 'virtual' bandwidth is also limited to the external link rate. That sounds decent for a 10Gb link. For 1Gb, probably better to use the software bridge between VMs.
My test box (Dell/VMware Edge 680) has 2 10Gb links. I don't have anything else that can use 10Gb, so I put a Mellanox ConnectX-3 Pro in my PC. This gives me fast local access to Proxmox and OpenWrt. Because Home Assistant (HAOS) is more of a black box, I decided to just bridge across the 1Gb switch port. I've configured Debian (Proxmox host) to offer DHCP on 3 'admin' ports. That way I can just plug in a computer without messing with settings. I don't get access to the rest of the network (including internet) until the OpenWrt VM is running. The admin ports are configured to automatically disable routes when the link is down. I've also added route metrics so that a 10Gb bridge gets used when available. Here's what it looks like:
For those unfamiliar with SR-IOV, think of each vertical path as an internal switch. Everything works the way I want except the route from PC2 to PC1. A Debian console can ping everything. PC1 can ping PC2. PC2 can ping 10.0.5.1, but not 10.0.5.4 or 10.0.5.9. If I start the OpenWrt VM and keep just the default routes in Debian, then it also works. However, I shouldn't need the alternate path through OpenWrt. I would prefer to solve this with 'ip route add x'. I'm not prepared to delve into nftables just yet. I think the routes are required either way. I left the purple switch in my diagram, but the same issue remains if PC1 is directly connected to GE5.
Here's the Debian network config:
and my current routes:
It's got to be something simple?
My test box (Dell/VMware Edge 680) has 2 10Gb links. I don't have anything else that can use 10Gb, so I put a Mellanox ConnectX-3 Pro in my PC. This gives me fast local access to Proxmox and OpenWrt. Because Home Assistant (HAOS) is more of a black box, I decided to just bridge across the 1Gb switch port. I've configured Debian (Proxmox host) to offer DHCP on 3 'admin' ports. That way I can just plug in a computer without messing with settings. I don't get access to the rest of the network (including internet) until the OpenWrt VM is running. The admin ports are configured to automatically disable routes when the link is down. I've also added route metrics so that a 10Gb bridge gets used when available. Here's what it looks like:
For those unfamiliar with SR-IOV, think of each vertical path as an internal switch. Everything works the way I want except the route from PC2 to PC1. A Debian console can ping everything. PC1 can ping PC2. PC2 can ping 10.0.5.1, but not 10.0.5.4 or 10.0.5.9. If I start the OpenWrt VM and keep just the default routes in Debian, then it also works. However, I shouldn't need the alternate path through OpenWrt. I would prefer to solve this with 'ip route add x'. I'm not prepared to delve into nftables just yet. I think the routes are required either way. I left the purple switch in my diagram, but the same issue remains if PC1 is directly connected to GE5.
Here's the Debian network config:
Code:
auto lo
iface lo inet loopback
auto eno7
iface eno7 inet static
address 10.0.1.1/24
gateway 10.0.1.2
up ip route replace dev eno8 metric 0 default via 10.0.1.2 # <- delete this line-- can't do striketrhough in code block
up echo 1 > /sys/devices/pci0000:00/0000:00:16.0/0000:05:00.1/sriov_numvfs
auto eno8
iface eno8 inet static
address 10.0.2.1/24
up ip route replace dev eno8 metric 1 default via 10.0.2.2
up echo 1 > /sys/devices/pci0000:00/0000:00:16.0/0000:05:00.0/sriov_numvfs
auto eno6
iface eno6 inet static
address 10.0.6.1/24
up ip route replace dev eno6 metric 2 default via 10.0.6.2
up echo 1 > /sys/devices/pci0000:00/0000:00:17.0/0000:07:00.0/sriov_numvfs
auto eno5
iface eno5 inet static
address 10.0.5.1/24
up ip route replace dev eno5 metric 3 default via 10.0.5.2
#up ip route del 10.0.5.0/24
up echo 2 > /sys/devices/pci0000:00/0000:00:17.0/0000:07:00.1/sriov_numvfs
Code:
default via 10.0.1.2 dev eno7 proto kernel onlink
default via 10.0.2.2 dev eno8 metric 1 dead linkdown
default via 10.0.6.2 dev eno6 metric 2 dead linkdown
default via 10.0.5.2 dev eno5 metric 3
10.0.1.0/24 dev eno7 proto kernel scope link src 10.0.1.1
10.0.2.0/24 dev eno8 proto kernel scope link src 10.0.2.1 dead linkdown
10.0.5.0/24 dev eno5 proto kernel scope link src 10.0.5.1
10.0.6.0/24 dev eno6 proto kernel scope link src 10.0.6.1 dead linkdown
Last edited: