Making a private subnet for Proxmox guests
I want a second private subnet just inside my Proxmox host, for the guests. Main immediate reason is I want to export an NFS filesystem with root access from proxmox to guests but I’m too lazy to set up Kerberos. I trust my LAN but not quite that much; I don’t want any dumb device in my house to be able to be root here. So I set up a second bridged subnet just for Proxmox guests.
By default Proxmox sets up a bridge vmbr0 connected to the LAN of the Proxmox server itself. Guest VMs can just use that interface (often named ens18 in the guest) like it was an ordinary ethernet, do DHCP to get an address, route packets to the Internet via it. it’s very convenient. Mine is configured on 192.168.0.0/24.
But it’s pretty easy to set up a second bridge. The manual is quite thorough but not quite a cookbook. I used the GUI to do it.
First, on the Proxmox server, I used the Network config to add a new bridge named vmbr1. (I set an advanced option that’s not visible, mtu 9000.)

Then, in the hardware definition of the VM, I added the bridge there.

Finally in the Ubuntu VM’s Netplan configuration, I set up a static config. vmbr1 seems to be called ens19 in the VM:
network:
version: 2
ethernets:
ens19:
addresses:
- 192.168.240.2/24
Proxmox will live reload the server config if you press the button. I forgot how to reconfigure netplan in Ubuntu so I just rebooted. And it all worked: now the two hosts can talk to each other on 192.168.240.0/24 addresses without involving the ethernet LAN at all. Now I can configure the NFS server and client to use those addresses instead and have some extra isolation.
I’m not certain what would happen if a malicious actor gained access to my physical ethernet and then started trying to talk to the supposedly private 192.168.240.0/24 subnet. I think they wouldn’t get very far, since none of my hosts have the bridge connected to the ethernet? But I haven’t tested it. I’m not worried about that aggressive of an attack, mostly just trying to prevent accidents.
As a bonus I configured the MTU on the bridge to be 9000. This is an often-recommended setting for NFS performance, I think because NFS itself will use up to 8KB data packets for things.
Update
This has been working well for me. I did some simple testing of performance in August 2024. First, the network interface itself:
- 0.15ms ping latency
- 50Gbits/s iperf3 throughput
So the virtual network is plenty fast. I don’t know how to test actual I/O throughput properly for an NFS server. I did a simple fio command an AI suggested and came up with a number of about 1.12GiBytes/s which is 10x faster than the spinning disk that’s being served. The NFS daemon on the server got to about 15% CPU while doing it.
My conclusion is “fast enough for anything I’ll do”. It’s more than double the speed of a good SSD plugged in locally, so I don’t think the networking inside Proxmox is a huge problem. At least for max throughput, not sure about lots of little file operations.
# fio --name=test_network_throughput --ioengine=libaio --rw=read --bs=64k --numjobs=1 --size=100m --runtime=60 --time_based --end_fsync=1 --direct=1 --filename=./testfile.fio
test_network_throughput: (g=0): rw=read, bs=(R) 64.0KiB-64.0KiB, (W) 64.0KiB-64.0KiB, (T) 64.0KiB-64.0KiB, ioengine=libaio, iodepth=1
fio-3.33
Starting 1 process
test_network_throughput: Laying out IO file (1 file / 100MiB)
Jobs: 1 (f=1): [R(1)][100.0%][r=1161MiB/s][r=18.6k IOPS][eta 00m:00s]
test_network_throughput: (groupid=0, jobs=1): err= 0: pid=975385: Fri Aug 9 16:37:31 2024
read: IOPS=18.4k, BW=1149MiB/s (1204MB/s)(67.3GiB/60001msec)
slat (usec): min=2, max=803, avg= 3.97, stdev= 1.38
clat (usec): min=16, max=4110, avg=50.14, stdev=13.62
lat (usec): min=35, max=4114, avg=54.12, stdev=13.82
clat percentiles (usec):
| 1.00th=[ 40], 5.00th=[ 43], 10.00th=[ 45], 20.00th=[ 46],
| 30.00th=[ 47], 40.00th=[ 48], 50.00th=[ 49], 60.00th=[ 51],
| 70.00th=[ 52], 80.00th=[ 53], 90.00th=[ 56], 95.00th=[ 61],
| 99.00th=[ 81], 99.50th=[ 92], 99.90th=[ 143], 99.95th=[ 165],
| 99.99th=[ 375]
bw ( MiB/s): min= 1016, max= 1373, per=100.00%, avg=1148.65, stdev=42.11, samples=119
iops : min=16266, max=21978, avg=18378.44, stdev=673.71, samples=119
lat (usec) : 20=0.01%, 50=56.83%, 100=42.80%, 250=0.35%, 500=0.01%
lat (usec) : 750=0.01%, 1000=0.01%
lat (msec) : 2=0.01%, 4=0.01%, 10=0.01%
cpu : usr=1.55%, sys=9.94%, ctx=1102796, majf=0, minf=27
IO depths : 1=100.0%, 2=0.0%, 4=0.0%, 8=0.0%, 16=0.0%, 32=0.0%, >=64=0.0%
submit : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
complete : 0=0.0%, 4=100.0%, 8=0.0%, 16=0.0%, 32=0.0%, 64=0.0%, >=64=0.0%
issued rwts: total=1102756,0,0,0 short=0,0,0,0 dropped=0,0,0,0
latency : target=0, window=0, percentile=100.00%, depth=1
Run status group 0 (all jobs):
READ: bw=1149MiB/s (1204MB/s), 1149MiB/s-1149MiB/s (1204MB/s-1204MB/s), io=67.3GiB (72.3GB), run=60001-60001msec