Cluster Network Configuration

Mathias

New Member
Feb 4, 2016
1
0
1
45
Hi,

I am trying to set up a 2 host cluster with proxmox 4.1.
I have two physical hosts each with two network cards. One connected to the Internet, one joined together with a crossover cable. The idea is to have all internal traffic between the hosts over the crossover cable, and only the external traffic over the public interfaces.

On each host I have a lxc container. Each configured with two interfaces again to replicate the host setup.

For the "private" interface over the crossover cable I would like to configure a bridged network following the configurtion at https://pve.proxmox.com/wiki/Network_Model.
The problem is that each container can ping each host interface over the "private" interface (vmbr1), but not the container located on the other host.

/etc/network/interfaces of host #1:
Code:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   xxx.xxx.xxx.138
  netmask   255.255.255.192
  gateway   xxx.xxx.xxx.129
  # default route to access subnet
  up route add -net xxx.xxx.xxx.128 netmask 255.255.255.192 gw xxx.xxx.xxx.129 eth0

auto vmbr0
iface vmbr0 inet static
       address 192.168.0.1
       netmask 255.255.255.0
       bridge_ports none
       bridge_stp off
       bridge_fd 0
       post-up echo 1 > /proc/sys/net/ipv4/ip_forward

auto eth1
iface eth1 inet manual

auto vmbr1
iface vmbr1 inet static
        address 192.168.10.1
        netmask 255.255.255.0
        gateway 192.168.10.2
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

/etc/network/interfaces of host #2:
Code:
auto lo
iface lo inet loopback

# device: eth0
auto  eth0
iface eth0 inet static
  address   xxx.xxx.xxx.139
  netmask   255.255.255.192
  gateway   xxx.xxx.xxx.129
  # default route to access subnet
  up route add -net xxx.xxx.xxx.128 netmask 255.255.255.192 gw xxx.xxx.xxx.129 eth0

auto vmbr0
iface vmbr0 inet static
       address 192.168.0.1
       netmask 255.255.255.0
       bridge_ports none
       bridge_stp off
       bridge_fd 0
       post-up echo 1 > /proc/sys/net/ipv4/ip_forward

auto eth1
iface eth1 inet manual

auto vmbr1
iface vmbr1 inet static
        address 192.168.10.2
        netmask 255.255.255.0
        gateway 192.168.10.1
        bridge_ports eth1
        bridge_stp off
        bridge_fd 0

The containers have the following network configuration:
Container on host 1:
Code:
auto eth0
iface eth0 inet static
  address 192.168.0.201
  netmask 255.255.255.0
  gateway 192.168.0.1

auto eth1
iface eth1 inet static
  address 192.168.10.201
  netmask 255.255.255.0
  gateway 192.168.10.1

Container on host 2:
Code:
auto eth0
iface eth0 inet static
  address 192.168.0.202
  netmask 255.255.255.0
  gateway 192.168.0.1

auto eth1
iface eth1 inet static
  address 192.168.10.202
  netmask 255.255.255.0
  gateway 192.168.10.2

How do I have to configure the "private" network so that the containers can ping each other?

Thank you!