add gateway to a second eth port

vikozo

Renowned Member
May 4, 2014
783
31
93
suisse
www.wombat.ch
Hello

i have two Proxmox node. not Joined to a cluster now!
DMZ 10.147.42.x
LAN 10.18.14.x

on pve-04 i wish to define another Eth Port with OVS Bridge but there i can't define a Gateway IP
so VM with a IP on the new Port would not have a Gateway. do i something wrong? do i missunderstand something?

have a nice day
vinc


srv-03
iface lo inet loopback
iface eth0 inet manual
iface eth1 inet manual

auto bond0
iface bond0 inet manual
slaves eth0 eth1
bond_miimon 100
bond_mode balance-alb

auto vmbr0
iface vmbr0 inet static
address 10.147.42.60
netmask 255.255.255.0
gateway 10.147.42.1
bridge_ports bond0
bridge_stp off
bridge_fd 0



pve-04
auto lo
iface lo inet loopback
iface eno2 inet manual
iface eno1 inet manual
iface eno3 inet manual
iface eno4 inet manual

auto vmbr0
iface vmbr0 inet static
address 10.18.14.44
netmask 255.255.255.0
gateway 10.18.14.1
bridge-ports eno2
bridge-stp off
bridge-fd 0

auto vmbr1
iface vmbr1 inet static
address 10.147.42.44
netmask 24
bridge-ports eno1
bridge-stp off
bridge-fd 0
 
You can only have one default gateway per machine.
If only VMs should use the second interface, you don't even have to set an IP and netmask for Proxmox VE.

The rest of the config needs to happen inside the VM.