Proxmox 4, CentOS 7 LXC with IPs from multiple subnets

SPQRInc

Member
Jul 27, 2015
57
1
6
Hello,

If I add IP-addresses to my CentOS-7-LXC I can only do that if this IP is from the same subnet. If I'm using another subnet with another gateway the container is not pingable anymore - I have to remove the IP from the other subnet and reboot the container after that.

The interfaces-configuration of the host node is:

Code:
auto lo

iface lo inet loopback


auto vmbr0

iface vmbr0 inet static

    address 84.xxx.xxx.x4

    netmask 255.255.255.240

    gateway 84.xxx.xxx.x1

    bridge_ports eth0

    bridge_stp off

    bridge_fd 0

Any ideas?
 
Hello,

I got some more details:

The problem is not related to CentOS7 - it appears with Debian, too.

And: If I add an IP from subnet 1 with gateway 1 everything is fine. If I add the second IP from subnet 2 with gateway 2 the container can not handle incoming or outgoing connections.


Example:

84.xxx.xx1.x4 with gateway 84.xxx.xx1.x1 -> everything is fine

if I add

84.xxx.xx1.x6 with gateway 84.xxx.xx1.x1 -> everything is fine

if I add

84.xxx.xx2.x4 with gateway 84.xxx.xx2.x1 -> all IPs of the container are not responding to incoming PING. Outgoing PING does not work, too.
 

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!