[SOLVED] Multiple gateways on same network

showiproute

Renowned Member
Mar 11, 2020
662
46
68
37
Austria
Hello everyone,

just a short question:
I have one network but two gateways - what would be the proper way to set that up at PVE host?
 
I have one network but two gateways - what would be the proper way to set that up at PVE host?

Have a Router outside of Proxmox with Multi-Gateway metrics or load balancing or whatsoever.

Or connect both networks to your proxmox host and have a Router CT/VM with Multiwan/LoadBalancing or Gateway rules.

For example, check how openWRT is handling that topic with mwan3 package: mwan3/OpenWRT
There are many other options as well to handle that topic.

I do not think your question is related to virtualization on Proxmox. Therefore, i guess it's advised to check for a Forum more related to the focus of routing.

TL;DR
Let a Router to route traffic between your different Gateways.
 
I had a router configuration with CARP but I removed it and my PVE VMs are able to deal with multiple gateways.
But on PVE itself I am unsure how to add multiple gateways.
 
So if your VM's are capable of multiple Gateways.

Code:
```
             +------------------+
             |      PVE         |
             +----+     +-----+ |
             |enp0+-----+vmbr0| |
             +----+     +-----+ |
             |                  |
+---+        +----+     +-----+ |
|GW1+--------+enp1+-----+vmbr2| |
+---+        +----+     +-----+ |
             |                  |
+---+        +----+     +-----+ |
|GW2+--------+enp2+-----+vmbr3| |
+---+        +----+     +-----+ |
             |                  |
             +------------------+
```

connect the gateways to your Proxmox host.

GW1->enp1->vmbr2
GW2->enp2->vmbr3

connect VM1 to vmbr2 & vmbr3
connect VM2 to vmbr2 & vmbr3

If not, please consider to draw your setup with https://asciiflow.com/
 
Last edited:
  • Like
Reactions: showiproute
My idea would be, connect both gateways to an openWRT LXC Client, use mwan3 package there, and use the openWRT virtual Router as a gateway for your VM's.

with mwan3, you could set which gateway to use when, etc...
your VM's would see only a single gateway and do not have to handle the multi-gateway stuff.