<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Wed, Dec 14, 2016 at 3:57 PM, mierdatutis mi <span dir="ltr"><<a href="mailto:mmm286@gmail.com" target="_blank">mmm286@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="auto"><p style="margin:0px 0px 0.8em;padding:0px;border:0px;font-size:15px;line-height:inherit;font-family:"helvetica neue",helvetica,arial,sans-serif;vertical-align:baseline;color:rgb(12,13,14);background-color:rgb(255,255,255)">I have a host ubuntu with dhcp and I would like to have a ubuntu guest container with ip fixed. I'm trying to set up the /etc/network/interface with these conf:</p></div></blockquote><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><p style="margin:0px 0px 0.8em;padding:0px;border:0px;font-size:15px;line-height:inherit;font-family:"helvetica neue",helvetica,arial,sans-serif;vertical-align:baseline;color:rgb(12,13,14);background-color:rgb(255,255,255)">Also, I've modified the config file of the ubuntu lxc:</p><pre style="margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;font-size:13px;line-height:inherit;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace;vertical-align:baseline;word-wrap:normal;background-color:rgb(240,240,240);max-height:300px;color:rgb(12,13,14)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:13px;line-height:inherit;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace;vertical-align:baseline;max-height:300px">lxc.network.link = lxcbr0
</code></pre></div></blockquote><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="auto"><pre style="margin-top:0px;margin-bottom:0.8em;padding:10px;border:0px;font-size:13px;line-height:inherit;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace;vertical-align:baseline;word-wrap:normal;background-color:rgb(240,240,240);max-height:300px;color:rgb(12,13,14)"><code style="margin:0px;padding:0px;border:0px;font-style:inherit;font-variant:inherit;font-weight:inherit;font-size:13px;line-height:inherit;font-family:consolas,menlo,monaco,"lucida console","liberation mono","dejavu sans mono","bitstream vera sans mono","courier new",monospace;vertical-align:baseline;max-height:300px">lxc.network.ipv4 = <a href="http://192.168.1.223/24" target="_blank">192.168.1.223/24</a>
lxc.network.ipv4.gateway = 192.168.1.1
</code></pre></div></blockquote><div><br></div><div>First thing first: you shoud either configure IP address in your container (e.g. /etc/network/interfaces), or in lxc config file. Not both.</div><div><br></div><div>Another thing, is <a href="http://192.168.1.0/24">192.168.1.0/24</a> the network of your lxc bridge (lxcbr0), or your LAN?</div><div><br></div><div>IIRC lxcbr0 defaults to 10.0.3.0 (at least in did the past). If you want to put the containers in the same network as your host, macvlan would be the easiest choice. But it comes with a catch: you container will not be able to communicate with your host by default, unless your host also use macvlan interface.</div><div> </div><div>-- </div><div>Fajar</div></div><br></div></div>