<div dir="ltr">They are on different bridges. The config only has the additional nic, which should be eth1, and usually is.<div>The eth0 nic is defined in the default profile, which is referred to in the config.</div><div><br></div><div>I will test further, just to rule out confusion at my side. It is good to know that the order should be as in the config. Maybe it is related to applying the profile to the config.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-06-04 17:26 GMT+02:00 Serge Hallyn <span dir="ltr"><<a href="mailto:serge.hallyn@ubuntu.com" target="_blank">serge.hallyn@ubuntu.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">Quoting Janjaap Bos (<a href="mailto:janjaapbos@gmail.com">janjaapbos@gmail.com</a>):<br>
> When using multiple nics in the container, the order sometimes changes<br>
> after a restart.<br>
> So eth0 becomes eth1, vice versa.<br>
<br>
</span>That really shouldn't happen.  lxc adds the nics in a specific order<br>
(according to the config).  Are eth0 and eth1 on different bridges?<br>
Or perhaps I should ask - how do you determine that they've "switched<br>
order"?<br>
<div><div class="h5"><br>
> when using LXD, how is this order determined?<br>
> There is no entry for eth0 in the config, since that is a standard lxc<br>
> network device.<br>
> Only the additional network device is added in the container config:<br>
> e.g.<br>
><br>
> name: c1<br>
> profiles:<br>
> - default<br>
> config:<br>
>   raw.lxc: |<br>
>     lxc.mount.entry = /var/lib/lxd/lxc/c1/devices/net/tun dev/net/tun none<br>
> bind,create=file 0 0<br>
>     lxc.mount.entry = /var/lib/lxd/lxc/c1devices/kvm dev/kvm none<br>
> bind,create=file 0 0<br>
>     lxc.mount.entry = /var/lib/lxd/lxc/c1/devices/fuse dev/fuse none<br>
> bind,create=file 0 0<br>
>   volatile.baseImage:<br>
> a4066a730e6b3d8021dcc7d0c59f2c37624ffdb60d10f1e09c336e4e1631915c<br>
>   volatile.eth0.hwaddr: 00:16:3e:33:3c:c2<br>
>   volatile.br0.hwaddr: 00:16:3e:5b:4f:19<br>
> devices:<br>
>   br0:<br>
>     parent: br0<br>
>     type: nic<br>
> ephemeral: false<br>
><br>
><br>
> Both nics have a volatile entry (done by lxc or lxd ?)<br>
><br>
> Sometime after a restart the nics have switched order in the container.<br>
> This of course messes up the network config in the container.<br>
><br>
> How can I make the eth0 and eth1 order stick?<br>
><br>
> Thanks for your help!<br>
><br>
> -Janjaap<br>
<br>
</div></div>> _______________________________________________<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>
_______________________________________________<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></blockquote></div><br></div>