LXC container lost networking after few days

remark

Renowned Member
May 4, 2011
157
13
83
russia
Hello everybody!

I have a LXC container with Debian 11 running apache and WordPress.

It has only one network interface with static real ip address. No DHCP used, no ipv6. No WiFi, just cable network. No NetworkManager.

After 1-3 days WordPress website becomes unavailable.

Problem solved when I ping outside address from container console (ping 8.8.8.8 for example). At the beginning, ping pauses for a couple of seconds, and then performs successful pings, network start working and website becomes online.

I have /29 network from my provider and other hosts having ip addresses on same network (VMs, not containers) have no network issues.

There is no ip address doubling, I've checked it several times.


My /etc/network/interfaces is very simple, here is it:
Code:
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
        address xx.xx.xx.xx/29
        gateway xx.xx.xx.yy

I saw several similar topics on the forum, but did not see a clear solution to the problem.
What else I should check?

Thank you.