OK I found my problem was due this file:<div>/etc/udev/rules.d/70-persistent-net.rules</div><div><br></div><div>Once removed, everything was fine....dhcp is working by default on container start.</div><div><br></div><div>Martin<br>
<br><div class="gmail_quote">2011/12/22 Martin Konečný <span dir="ltr"><<a href="mailto:martin.konecny@sourcefabric.org">martin.konecny@sourcefabric.org</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi,<div><br></div><div>I've been looking into this for a few days without any success. When I create an LXC container using lxc-ubuntu shell script, then my containers can successfully obtain an IP address via DHCP.</div>

<div><br></div><div>However when I create a container using lxc-sshd, then I need to specify the IP address manually for it to acquire an IP. I think I know why this is happening (SSHD container has its own init script which probably forgoes all network service initialization). I'd really like my SSHD container to acquire an IP dynamically.</div>

<div><br></div><div>Things I've tried so far:</div><div><br></div><div>1) Running "dhclient"</div><div>2) Running ifup eth0</div><div><br></div><div>I'm running Ubuntu 11.10 operating system, and here is the contents of /etc/network/interfaces (container's point of view)</div>

<div><br></div><div><blockquote class="gmail_quote" style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

auto lo<br>iface lo inet loopback<br>auto eth0<br>iface eth0 inet dhcp</blockquote><div><br></div><div><div><br></div><div>What can I do to start the network initialization? I'm learning all I can about Linux network configuration right now, but a nudge in the right direction would be appreciated.</div>

<div><br></div><div>Martin</div><div><br></div><span style="border-collapse:collapse"><div><span style="border-collapse:collapse"><span style="border-collapse:separate"><div style="margin-top:0px;margin-bottom:0px"><div style="color:rgb(0,0,0);margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-color:transparent;font-family:'Times New Roman'">

<span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Martin Konecny</span><br><span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Software Developer, Sourcefabric</span><br>

<span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:martin.konecny@sourcefabric.org" target="_blank">martin.konecny@sourcefabric.org</a></span><br>

<span style="font-family:Verdana;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">720 Bathurst St. Suite 203</span><br>

<span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">M5S 2R4, Toronto, ON, Canada</span><span style="font-family:Verdana;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br>

<span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><a href="tel:%2B1%20%28416%29%20892-8420" value="+14168928420" target="_blank">+1 (416) 892-8420</a> (Cell)</span><br>
<span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Skype: martin.konecny15</span><br>
<span style="font-family:Arial;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br><a href="http://www.sourcefabric.org/" target="_blank"><span style="font-family:Verdana;color:rgb(0,0,153);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://www.sourcefabric.org</span></a><br>

<a href="http://www.twitter.com/Sourcefabric" target="_blank"><span style="font-family:Verdana;color:rgb(0,0,153);background-color:rgb(255,255,255);font-weight:normal;font-style:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://www.twitter.com/Sourcefabric</span></a></div>

</div></span></span></div></span><br>
</div></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><span style="border-collapse:collapse"><div><span style="border-collapse:collapse"><span style="border-collapse:separate"><div style="margin-top:0px;margin-bottom:0px">
<div style="margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-color:transparent;font-family:'Times New Roman'"><span>Open source radio in the cloud. Get yours now!</span><span> ---> </span><a href="http://airtime.pro/" target="_blank">http://airtime.pro</a></div>
<div style="color:rgb(0,0,0);margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-color:transparent;font-family:'Times New Roman'"><span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><br>
</span></div><div style="color:rgb(0,0,0);margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;background-color:transparent;font-family:'Times New Roman'"><span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Martin Konecny</span><br>
<span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Software Developer, Sourcefabric</span><br>
<span style="font-family:Verdana;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap"><a href="mailto:martin.konecny@sourcefabric.org" target="_blank">martin.konecny@sourcefabric.org</a></span><br>
<span style="font-family:Verdana;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">720 Bathurst St. Suite 203</span><br>
<span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">M5S 2R4, Toronto, ON, Canada</span><span style="font-family:Verdana;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br>
<span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">+1 (416) 892-8420 (Cell)</span><br><span style="font-family:Arial;color:rgb(0,0,0);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap">Skype: martin.konecny15</span><br>
<span style="font-family:Arial;color:rgb(0,0,0);font-weight:normal;font-style:normal;text-decoration:none;vertical-align:baseline;white-space:pre-wrap;background-color:transparent"></span><br><a href="http://www.sourcefabric.org/" target="_blank"><span style="font-family:Verdana;color:rgb(0,0,153);background-color:transparent;font-weight:normal;font-style:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://www.sourcefabric.org</span></a><br>
<a href="http://www.twitter.com/Sourcefabric" target="_blank"><span style="font-family:Verdana;color:rgb(0,0,153);background-color:rgb(255,255,255);font-weight:normal;font-style:normal;text-decoration:underline;vertical-align:baseline;white-space:pre-wrap">http://www.twitter.com/Sourcefabric</span></a></div>
</div></span></span></div></span><br>
</div>