<div dir="ltr">Thanks for the help Stéphane and Serge. <div><br></div><div>I've set it up so that the host device is a bridge br0, I then assigned those IP addresses which were previously aliases on eth0 to the containers (configured with same gateway as the host) and connected them to the br0 bridge.</div>
<div><br></div><div>The network works fine internally, I can SSH into the host from the containers and vice versa.</div><div><br></div><div>However, I can't access from or to anything external, I think this is because the mac addresses of the containers are different than the mac address of the host and the gateway won't allow this. How can I make it so that it will use the hosts mac address with the outside world. </div>
<div><br></div><div> </div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, Jun 5, 2014 at 2:32 PM, Stéphane Graber <span dir="ltr"><<a href="mailto:stgraber@ubuntu.com" target="_blank">stgraber@ubuntu.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="">On Thu, Jun 05, 2014 at 05:35:10PM +0000, Serge Hallyn wrote:<br>
> Quoting Shidan (<a href="mailto:shidan@gmail.com">shidan@gmail.com</a>):<br>
> > Hello, on my host I have 4 VLAN interfaces on eth0<br>
> > (eth0:1, eth0:2, eth0:3, eth0:4) and each one has its own assigned public<br>
> > IP address.<br>
<br>
</div>Also note that eth0:1 isn't a vlan interface, it's simply an extra<br>
address added to eth0 with an alias value of "eth0:1". So even if we did<br>
have the phys or vlan interface types working with unprivileged<br>
containers, they still wouldn't work with interface aliases.<br>
<br>
In your case, I think you either want to put eth0 itself into a bridge<br>
accessible to your containers or maybe do something with the macvlan<br>
driver instead (though that latter won't work with unprivileged<br>
containers).<br>
<div class="HOEnZb"><div class="h5"><br>
> ><br>
> > I want to create 4 unprivileged containers and assign a unique VLAN<br>
> > interface to each, similar (I think) to a PHYS network type. How should I<br>
> > go about doing this?<br>
><br>
> Currently that's not possible, only veth is supported in unprivileged<br>
> containers. What you can do is bridge each link and connect the<br>
> unpriv container veths to those bridges<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>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Stéphane Graber<br>
Ubuntu developer<br>
<a href="http://www.ubuntu.com" target="_blank">http://www.ubuntu.com</a><br>
</font></span><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>