Difference between revisions of "CentOS 7.x lxc container networking"
From Notes_Wiki
m |
m |
||
Line 11: | Line 11: | ||
#:Note that if the network requires static IP addressing then appropriate guest network configuration must be done. | #:Note that if the network requires static IP addressing then appropriate guest network configuration must be done. | ||
==Update default lxc container bridge== | |||
To make a specific network-bridge default for all new containers edit '/etc/lxc/default.conf' and update value of 'lxc.network.link' in this file appropriately. | To make a specific network-bridge default for all new containers edit '/etc/lxc/default.conf' and update value of 'lxc.network.link' in this file appropriately. |
Revision as of 13:28, 24 May 2018
<yambe:breadcrumb>CentOS_7.x_lxc|CentOS 7.x lxc</yambe:breadcrumb>
CentOS 7.x lxc container networking
To configure lxc container networking, we can use software bridges on the host. For creating desired network using software bridges refer to CentOS 7.x Managing virtual networks using libvirt virsh command
Once network bridge is available to configure lxc container to use the desired bridge use following steps:
- Ensure that container is stopped
- Edit /var/lib/lxc/<container-name>/config file
- Update 'lxc.network.link' value to desired bridge name
- Start container and verify
- Note that if the network requires static IP addressing then appropriate guest network configuration must be done.
Update default lxc container bridge
To make a specific network-bridge default for all new containers edit '/etc/lxc/default.conf' and update value of 'lxc.network.link' in this file appropriately.