もぐてっく

人は1つ歳をとるたび、1ビットづつ大きくなれると信じてた。

/etc/interfacesでブリッジをセットアップする

起動時にlxc用のブリッジを作って物理NICにバインドします。
その際、ブリッジにIPアドレスを振らないとネットワーク経由のアクセスが不能になるので注意(よくやる)。


Ubuntuで使う場合は、/usr/sbin/brctlを/sbin/brctlに読み替えてください。

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo br0
iface lo inet loopback

iface br0 inet static
        pre-up /usr/sbin/brctl addbr br0
        pre-up /usr/sbin/brctl addif br0 eth0
        pre-up /sbin/ifconfig eth0 up
        address 192.168.11.153
        netmask 255.255.255.0
        network 192.168.11.0
        broadcast 192.168.11.255
        gateway 192.168.11.1