Lxc setup: Difference between revisions

From Jan's Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
 
Line 6: Line 6:
  lxc.network.ipv4.gateway=172.16.0.1
  lxc.network.ipv4.gateway=172.16.0.1
  lxc.network.veth.pair=[name]
  lxc.network.veth.pair=[name]
Edit /etc/network/interfaces
iface eth0 inet static
        address 172.16.0.35
        netmask 255.255.255.0
        network 172.16.0.0
        broadcast 172.16.0.255
        gateway 172.16.0.1
iface eth0 inet6 static
        address 2001:6f8:1199:666::35
        netmask 64
        gateway fe80::1
Edit /etc/sysctl.conf
net.ipv6.conf.eth0.accept_ra = 0

Latest revision as of 13:55, 4 August 2014

lxc-create -n sixxs -t ubuntu -- --release trusty -b riechers

Edit /lxc/lib/[name]/config and add

lxc.network.ipv4=172.16.0.35/24
lxc.network.ipv4.gateway=172.16.0.1
lxc.network.veth.pair=[name]

Edit /etc/network/interfaces

iface eth0 inet static
       address 172.16.0.35
       netmask 255.255.255.0
       network 172.16.0.0
       broadcast 172.16.0.255
       gateway 172.16.0.1
iface eth0 inet6 static
       address 2001:6f8:1199:666::35
       netmask 64
       gateway fe80::1

Edit /etc/sysctl.conf

net.ipv6.conf.eth0.accept_ra = 0