Is it possible to set the metric on the ethernet bridges?

stevelup

New Member
Feb 20, 2023
2
0
1
Hi

I've got several containers that have two bridged ethernet adapters. One of them is 'unfiltered' internet access, the other is via a VPN.

The problem is that on all the containers, both ethernet interfaces have the same metric (1024) and are both set as the default gateway so traffic just randomly gets routed to the two interfaces.

I would prefer one to have a higher metric than the other (or indeed, for the other not to be a default gateway at all).

Is this achievable?

Thanks!
 
I've solved this, posting here in case anyone else needs this in the future, or in case I did something stupid but...

I added...

Code:
[DHCPv4]
RouteMetric = 100

... to /etc/systemd/network/eth0.network and then made that file non-overwritable using the .pve-ignore directive.
 

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!