Linux technical support - support@alexlinux.com


LXC bridge example CentOS

cat /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
TYPE=Ethernet
BOOTPROTO=none
ONBOOT=yes
NM_CONTROLLED=no
BRIDGE=br0
cat /etc/sysconfig/network-scripts/ifcfg-br0
DEVICE=br0
TYPE=Bridge
IPADDR=10.66.1.27
NETMASK=255.255.255.0
GATEWAY=10.66.1.1
ONBOOT=yes
BOOTPROTO=none
NM_CONTROLLED=no
DELAY=0
cat /etc/sysconfig/lxc-net
USE_LXC_BRIDGE="false"
LXC_BRIDGE="lxcbr0"
LXC_ADDR="10.28.14.1"
LXC_NETMASK="255.255.255.0"
LXC_NETWORK="10.28.14.0/24"
LXC_DHCP_RANGE="10.28.14.2,10.28.14.254"
LXC_DHCP_MAX="253"
cat /var/lib/lxc/test/config
lxc.network.type = veth
lxc.network.flags = up
lxc.rootfs = /var/lib/lxc/test/rootfs
lxc.include = /usr/share/lxc/config/centos.common.conf
lxc.arch = x86_64
lxc.utsname = test.alex.loc
lxc.network.name = eth0
lxc.network.link = br0
lxc.network.veth.pair = veth-01
lxc.network.ipv4 = 10.66.1.61/24
lxc.network.ipv4.gateway = 10.66.1.1
lxc.network.hwaddr = 00:1E:2D:F7:E3:4E

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>