Hi. On a PVE4 upgrade we are having some issues to understand best setup for local traffic among containers.
Some containers only have "local network" IP/interfaces (10.0.0.XXX) while others have various public ones + a local. Host also has an interface with a local network IP.
Up till now traffic between container X and Y via local network IPs (10.0.0.XXX) worked fine but not now. I am uncertain this is something to do with our config on the containers or routers on the host.
Currently our containers definition for local network is of type 10.0.0.XXX/24 while perhaps it should be 10.0.0.XXX/32 so all traffic is routed via the gateway which I understand is the host interface.
Is that correct or am I missing any routes on the host so traffic from container20 (10.0.0.20) will reach directly container30(10.0.0.30)
My host local net interface definition is as follow:
Thanks.
Some containers only have "local network" IP/interfaces (10.0.0.XXX) while others have various public ones + a local. Host also has an interface with a local network IP.
Up till now traffic between container X and Y via local network IPs (10.0.0.XXX) worked fine but not now. I am uncertain this is something to do with our config on the containers or routers on the host.
Currently our containers definition for local network is of type 10.0.0.XXX/24 while perhaps it should be 10.0.0.XXX/32 so all traffic is routed via the gateway which I understand is the host interface.
Is that correct or am I missing any routes on the host so traffic from container20 (10.0.0.20) will reach directly container30(10.0.0.30)
My host local net interface definition is as follow:
auto vmbr10
iface vmbr10 inet static
address 10.0.0.1
netmask 255.255.255.0
broadcast 10.0.0.255
network 10.0.0.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
#post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr0/proxy_arp
post-up echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
iface vmbr10 inet static
address 10.0.0.1
netmask 255.255.255.0
broadcast 10.0.0.255
network 10.0.0.0
bridge_ports none
bridge_stp off
bridge_fd 0
post-up echo 1 > /proc/sys/net/ipv4/ip_forward
#post-up echo 1 > /proc/sys/net/ipv4/conf/vmbr0/proxy_arp
post-up echo 1 > /proc/sys/net/ipv4/conf/all/proxy_arp
post-up iptables -t nat -A POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
post-down iptables -t nat -D POSTROUTING -s '10.0.0.0/24' -o vmbr0 -j MASQUERADE
Thanks.