User Tools

Site Tools


docs:lxc

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision Both sides next revision
docs:lxc [2014-06-26 15:25]
matkor
docs:lxc [2014-07-02 10:56]
matkor [config for network]
Line 125: Line 125:
 ==== config for network ==== ==== config for network ====
  
-static networking, set ''​VSERVER=yes''​ and ''​VSERVER_ISOLATION_NET=yes''​ in guest ''/​etc/​sysconfig/​system''​ to disable all network configuration by guest.+static networking, set ''​VSERVER=yes''​ and ''​VSERVER_ISOLATION_NET=yes''​ in guest ''/​etc/​sysconfig/​system''​ to disable all network configuration by guest, set RC_PROMPT=no to avoid hanging startaup scripts, in general it's good idea to turn off there most of things
  
-  - uses ''​macvlan''​ +===== network using macvlan ​in bridge mode ===== 
-  - that interface is NOT visible on host  +  - traffic from host to guest (and vice-versa) is NOT passed. external trafic works 
-  - you can't filter ​it from host's firewall+  - guest interface is NOT visible on host  
 +  - you can't filter ​guest straffic  ​from host's firewall 
 +  - host can use seme default interface with and without guests running.
   - you HAVE to set mac. If not - on every container start you'll have different one (your router will not pass the traffic).   - you HAVE to set mac. If not - on every container start you'll have different one (your router will not pass the traffic).
   - iptables is initialized from lxc.hook.pre-mount hook (ran in the container'​s namespace and having macvlan interface visible)   - iptables is initialized from lxc.hook.pre-mount hook (ran in the container'​s namespace and having macvlan interface visible)
- 
  
 first boot with ''​hwaddr''​ line disabled, look what the random address was assigned, set it in config. first boot with ''​hwaddr''​ line disabled, look what the random address was assigned, set it in config.
Line 156: Line 157:
 </​file>​ </​file>​
  
 +
 +===== network using bridged veth interfaces ​ =====
  
 ==== full config ==== ==== full config ====
docs/lxc.txt · Last modified: 2016-08-21 00:36 by glen