Permanent Static Route

Boss

New Member
Apr 22, 2024
24
0
1
Hi - a couple of questions about making a static route permanent, I have a couple of bridged interfaces vmbr0 (1G i/face) & vmbr1 (10G i/face) and are the same on each Proxmox server.
Currently vmbr0 is the default i/face for my clustered Proxmox Servers.
I have manually added a static route for vmbr1 ( ip route add 172.1.2.3 dev vmbr1) and ran a traceroute which shows that traffic for 172.1.2.3 now goes via vmbr1. I checked the other clustered proxmox servers and they also now use the new route. All good so far!
What do I need to add to the interfaces file to make this permanent?

I have also attached an iSCSI disk to the cluster ( 172.1.2.4 ) which currently defaults to the 1G i/face (vmbr0) - I presume that it I follow the same process to set a static route for the iSCSI device to use the vmbr1 i/face? I've been a bit hesitant to making any changes for this as all my VMs use the iSCSI disk.
Thanks
 
How is your network configured? Is that subnet configured on multiple NICs?

We usually recommend to use different IP subnets if you want so distribute traffic over different physical NICs/Bonds. Configuring routes for specific hosts/ranges over a different NIC can work, but can lead to issues in the future if one forgets about this special route for example.

Look into post-up & post-down commands in the network config to set up and tear down the route if the NIC comes up & down.
 
Thanks - will check out the docs. Unfortunately all servers/devices are on the same subnet which is why I can only assign the route to an individual address to make the most of the 10G i/face.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!