LXC: cannot reach network on one interface

andre78

Member
Aug 9, 2019
22
3
23
Hi,

I have set up a LXC / Container to use with Docker. As I am using VLANs in my network, I am using the following configuration:

1659118477062.png

Code:
$ ip route show
default via 192.168.60.1 dev eth1 onlink
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown
172.18.0.0/16 dev br-d0cb1f4371e6 proto kernel scope link src 172.18.0.1 linkdown
192.168.51.0/24 dev eth0 proto kernel scope link src 192.168.51.194
192.168.60.0/24 dev eth1 proto kernel scope link src 192.168.60.194

/etc/network/interfaces
Code:
auto lo
iface lo inet loopback

allow-hotplug eth0
auto eth0
iface eth0 inet static
        address 192.168.51.194/24

allow-hotplug eth1
auto eth1
iface eth1 inet static
        address 192.168.60.194/24
        gateway 192.168.60.1

But I cannot reach the network 192.168.51.0/24:
Code:
ping 192.168.11.185
PING 192.168.11.185 (192.168.11.185) 56(84) bytes of data.
^C
--- 192.168.11.185 ping statistics ---
24 packets transmitted, 0 received, 100% packet loss, time 23547ms

The pinged host can be reached from any other machine on that VLAN, so I am sure the problem lies within the LXC. I only get it working with either ne of the networks.

Also activating the correct gateway on both interfaces makes no difference

What am I missing? It's the first time I am configuring VLAN in a LXC instead of a VM.

Thank you!
andre
 
Last edited:

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!