Proxmox w/ 2 NICs on the same network

Notice: Page may contain affiliate links for which we may earn a small commission through services like Amazon Affiliates or Skimlinks.

macrules34

Active Member
Mar 18, 2016
407
28
28
40
I am running Proxmox 6.1-7 and am running into an issue, I'm trying to assign two separate physical NIC interfaces on the same subnet (10.0.1.x). When I go to create the 2nd "Linux Bridge" using the same gateway as vmbr0 it gives me the error "Default gateway already exists on interface vmbr0". How do I make this work?
Screen Shot 2020-05-13 at 2.19.24 PM.png
 

PigLover

Moderator
Jan 26, 2011
3,184
1,545
113
Having two NICs on the same subnet is generally not a good idea with the Linux network stack (not counting LAG groups, where they are really behaving as one device).

Because the IP address really belongs to the host, not t the NIC, you can't reliably predict which NIC will be selected for outbound traffic. And because both will respond to ARP requests you also cannot reliably predict which will be used for inbound either. You have to manually set up routes to get it stable and even then it is not ideal.

Linux doesn't normally prevent you from doing this but in most cases its not a good idea. The Proxmox parameter validation is probably too strict (I hate when they prevent "legal" configs just because they determine them to be "bad"). But I also understand why they may not allow it.
 

vl1969

Active Member
Feb 5, 2014
634
76
28
You can only have one gateway on Proxmox host and it is usually attached to vmbr0
Since you are on the same network do not input gateway info in new vmbr.
Just add IP. It will use default gateway automatically. All interfaces will use default gateway setuped on the host by, well, default.
Infact it is rare to have multiple gateways on single Network.
 
  • Like
Reactions: Patrick

macrules34

Active Member
Mar 18, 2016
407
28
28
40
Okay, I do that but know when I go to configure the Ceph Cluster Network I get the following.
Screen Shot 2020-05-13 at 3.28.45 PM.png
Screen Shot 2020-05-13 at 3.31.40 PM.png
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
Looks like when I type 192.168.1.2/24 into the config window, the subnet mask gets removed. I'll try to manually add it through the command line.
 

macrules34

Active Member
Mar 18, 2016
407
28
28
40
So for anyone who has encountered this issue if you edit the /etc/network/interfaces.new and reboot it should comeback correctly.Screen Shot 2020-05-14 at 2.50.26 PM.png
 

oldpenguin

Member
Apr 27, 2023
30
10
8
EU
If your main NIC is 10.0.1.x and you wish to use a separate subnet for 2nd NIC (for Ceph or whatever other purposes), with let's say 192.168.1.x as IP address, why not offload that at layer 3 with the first IP device upwards your 2nd NIC connection (router, firewall, layer 3 switch, whatever you have). Normally I'd recommend planting that on a separate VLAN - but if there's no such support, you can easily add an IP alias of 192.168.1.1/24 on your router on the same interface as 10.0.1.1 and that should solve your problem.

Please keep in mind this is a workaround towards your requirement - while it's functional, it is far from a correct implementation but it may have some speed benefits depending on your network topology.
 
  • Like
Reactions: coolrunnings82