Hello community
I have a cluster with 2 Proxmox nodes, which are hosting some VMs on their own. The two hosts are in the same network (172.21.251.0/24), and connect to the switch using LACP (802.3ad). The hosts also have a network bridge (vmbr0) connected to a private network (10.9.16.0/24). Both of the hosts have an IP address in the private network (10.9.16.1 and 10.9.16.101). The VMs can ping the two hosts (172.21.251.0/24) as well as the external network (e.g. 8.8.8.8).
What I want to achieve is to connect VMs in the two hosts to a private network 10.9.16.0/24, which is currently not possible.
Do you have any suggestions on how to do it? Thanks a lot!
I have a cluster with 2 Proxmox nodes, which are hosting some VMs on their own. The two hosts are in the same network (172.21.251.0/24), and connect to the switch using LACP (802.3ad). The hosts also have a network bridge (vmbr0) connected to a private network (10.9.16.0/24). Both of the hosts have an IP address in the private network (10.9.16.1 and 10.9.16.101). The VMs can ping the two hosts (172.21.251.0/24) as well as the external network (e.g. 8.8.8.8).
What I want to achieve is to connect VMs in the two hosts to a private network 10.9.16.0/24, which is currently not possible.
/etc/network/interfaces
of host1 (/etc/network/interfaces
of host2 is similar, just the IP addresses of bond0 and vmbr0 are different.)
Code:
auto lo
iface lo inet loopback
iface eno1 inet manual
iface eno2 inet manual
auto enp175s0f1
iface enp175s0f1 inet manual
auto enp175s0f0
iface enp175s0f0 inet manual
auto bond0
iface bond0 inet static
address 172.21.251.124/24
gateway 172.21.251.254
bond-slaves enp175s0f0 enp175s0f1
bond-miimon 100
bond-mode 802.3ad
bond-xmit-hash-policy layer2+3
auto vmbr0
iface vmbr0 inet static
address 10.9.16.1/24
bridge-ports none
bridge-stp off
bridge-fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
post-up iptables -t nat -A POSTROUTING -s '10.9.16.0/24' -o bond0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.9.16.0/24' -o bond0 -j MASQUERADE
Do you have any suggestions on how to do it? Thanks a lot!