[Vserver comparision] --- https://www.pld-linux.org/docs/lxc?rev=1384812634 +++ https://www.pld-linux.org/docs/lxc @@ -46,4 +46,33 @@ ^ Vserver ^ LXC ^ Notes ^ | vserver test enter | lxc-attach -n test -e | Use ''-e'' option with care, especially when restarting processess | | vserver test start | lxc-start -n test -d | | vserver test stop | lxc-stop -n test | + + ==== config for network ==== + + static networking, set ''VSERVER=yes'' in guest ''/etc/sysconfig/system'' to disable all network configuration by guest. + + - uses ''macvlan'' + - that interface is NOT visible on host + - you can't filter it from host's firewall + - you HAVE to set mac. If not - on every container start you'll have different one (your router will not pass the traffic). + + first boot with ''hwaddr'' line disabled, look what the random address was assigned, set it in config. + + also you may use some generation techniques like these (assuming the ip is ''192.168.2.160''): + + <code bash> + $ printf "02:00:%x:%x:%x:%x" 192 168 2 160 + 02:00:c0:a8:2:a0 + </code> + + <file bash> + lxc.network.type = macvlan + lxc.network.flags = up + #lxc.network.hwaddr = 00:16:c0:a8:3:34 + lxc.network.link = eth0 + lxc.network.macvlan.mode = bridge + lxc.network.name = eth0 + lxc.network.ipv4 = 192.168.2.160/23 + lxc.network.ipv4.gateway = 192.168.2.1 + </file>
Diff URL: https://www.pld-linux.org/docs/lxc?do=diff&r1=1384812634&r2=1384814716 -- This mail was generated by DokuWiki at https://www.pld-linux.org/ _______________________________________________ pld-cvs-commit mailing list [email protected] http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit
