add gateway to a second eth port

vikozo

Renowned Member
May 4, 2014
781
30
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.
 

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!