OpenVZ with VEs in different subnet
The solution in the corresponding article of OpenVZs wiki recommends a rather tricky configuration with bridging the ethernet interface and using veth instead of vnet for the container. This is complicated and slow.
The main (hostnode) ip address for the server was 189.139.33.20/26. The additional ips were 189.139.35.37/25 and 189.139.35.38/25. Without finding an ethernet interface for the additional ips OpenVZ could only use these ips for containers with a bridge/veth or complicated iptables/NAT setup.
I tried to "ifconfig eth0:0 189.139.35.127/25 -arp"
with
using the containers subnet broadcast address for an ethernet subinterface.
This simple setup made the whole thing work with vnet immediately.
Later i discovered that a simple route to the subnet via the
ethernet interface is also completely sufficient:
"route add -net 189.139.35.0/25 dev eth0"