I have 2 lxc containers on my server. On both stands a debian. For 2x their ip. One works fine, and on the second (I just created it) the network does not work. I had no experience with 2 containers, so I ask for help.
/ etc / network / interfaces
# Loopback device: auto lo iface lo inet loopback # device: eth0 #auto eth0 #iface eth0 inet static #address 213.239.197.111 #netmask 255.255.255.224 #gateway 213.239.197.97 # default route to access subnet #up route add -net 213.239.197.96 netmask 255.255.255.224 gw 213.239.197.97 eth0 auto br0 iface br0 inet static bridge_ports eth0 bridge_fd 0 address 213.239.197.111 broadcast 213.239.197.127 netmask 255.255.255.224 gateway 213.239.197.97 # Создаем bridge br1 auto br1 iface br1 inet static bridge_ports eth0 bridge_fd 0 address 78.47.26.77 broadcast 78.47.26.79 netmask 255.255.255.248 gateway 78.47.26.73 iface eth0 inet6 static address 2a01:4f8:130:622e::2 netmask 64 gateway fe80::1 Config first, with which everything is OK
lxc.network.type = veth lxc.network.flags = up lxc.network.name = eth1 lxc.network.link = br0 lxc.network.veth.pair = veth-01 lxc.network.ipv4 = 213.239.197.122/28 lxc.network.ipv4.gateway = 213.239.197.97 lxc.network.hwaddr = 00:50:56:00:9C:81 lxc.rootfs = /var/lib/lxc/only/rootfs # Common configuration lxc.include = /usr/share/lxc/config/debian.common.conf # Container specific configuration lxc.mount = /var/lib/lxc/only/fstab lxc.utsname = only lxc.arch = amd64 lxc.autodev = 1 lxc.kmsg = 0 Config second, with which problems
lxc.network.type = veth lxc.network.flags = up lxc.network.name = eth2 lxc.network.link = br1 lxc.network.veth.pair = veth-01 lxc.network.ipv4 = 78.47.26.77/28 lxc.network.ipv4.gateway = 78.47.26.73 lxc.network.hwaddr = 00:50:56:00:3A:65 lxc.rootfs = /var/lib/lxc/bolide/rootfs # Common configuration lxc.include = /usr/share/lxc/config/debian.common.conf # Container specific configuration lxc.mount = /var/lib/lxc/bolide/fstab lxc.utsname = bolide lxc.arch = amd64 lxc.autodev = 1 lxc.kmsg = 0