<div dir="ltr">Hi,<div><br></div><div>it depends on your template how address assigning is done (via DHCP, statically, not at all, ...) but normally in the standard case the containers get their IP addresses from the dnsmasq process that is running on the containers' host system.</div><div><br></div><div>You can either...</div><div>1) Assign IP addresses yourself via the containers' config files, e.g., /var/lib/lxc/$CONTAINER_NAME/config by using the option lxc.network.ipv4 - see "man lxc.container.conf, but you probably will have to set further parameters to make this fully work</div><div>2) or you enable "LXC_DHCP_CONFILE=/etc/lxc/dnsmasq.conf" in /etc/default/lxc-net and then assign IP addresses to hostnames statically in /etc/lxc/dnsmasq.conf</div><div>3) or you statically set the particular IP address in the containers rootfs - /etc/network/interfaces (at least for Debian/Ubuntu/...)</div><div><br></div><div>You probably should try the second option.</div><div><br></div><div>Kind regards,</div><div><br></div><div>BB</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Dec 27, 2014 at 8:16 PM, Thouraya TH <span dir="ltr"><<a href="mailto:thouraya87@gmail.com" target="_blank">thouraya87@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Hello,<br><br></div><div>Please, i have created these two containers:<br></div><div><br>NAME STATE IPV4 IPV6 AUTOSTART <br>---------------------------------------------<br>worker RUNNING <b>10.0.3.238</b> - NO <br>worker1 RUNNING <b>10.0.3.68</b> - NO <br>root@parapluie-8:~# brctl show<br>bridge name bridge id STP enabled interfaces<br><b>lxcbr0 8000.fe7cb6d68210 no veth4FEW6P<br> vethCCMR1U</b><br><br><br><br></div>How can i modify the two ip address (which are in the same bridge):<br></div>i have used inside the container: <br><pre><span style="font-family:arial,helvetica,sans-serif"><font> container1: ifconfig eth0 192.168.1.2 </font></span><br><span style="font-family:arial,helvetica,sans-serif"><font><span style="font-family:arial,helvetica,sans-serif"><font> container2: ifconfig eth0 192.168.1.3</font></span> </font></span></pre><div><br></div><div>this works but when i restart the containers, i can't find the new adresses !<br></div><div><pre>Have you an idea please ?<br></pre><pre>Thanks a lot.<br></pre><pre>Best Regards. <br></pre><br></div></div>
<br>_______________________________________________<br>
lxc-users mailing list<br>
<a href="mailto:lxc-users@lists.linuxcontainers.org">lxc-users@lists.linuxcontainers.org</a><br>
<a href="http://lists.linuxcontainers.org/listinfo/lxc-users" target="_blank">http://lists.linuxcontainers.org/listinfo/lxc-users</a><br></blockquote></div><br></div>