Can't add a second network device

I tried copying the same network settings as the original device and renaming eth0 to eth1 but when I boot the container there is no second network.

Furthermore even when I comment out the first one, leaving only the second, with the only difference being that the name is eth1 rather than eth0 there is no ip assigned when booted up.

What is going on? It doesn’t seem to like changing the name from anything but eth0

Here are the config settings which work for eth0 but fail as soon as the setting is changed to eth1. = veth = lxcbr0 = up = eth0 = 00:16:3e:77:68:67

That has nothing to do with LXC. I suspect your eth0 device has an entry in /etc/network/interfaces whereas eth1 hasn’t so dhcp is not ran against eth1. You need to do so manually or put it in /etc/network/interfaces.
If you want multiple network devices simply do: = veth = lxcbr0 = up = eth0 = 00:16:3e:77:68:67 = veth = lxcbr0 = up = bla = 00:16:3e:77:68:68 = veth = lxcbr0 = up = blu = 00:16:3e:77:68:69

I have read in other answers about this /etc/network/interfaces file but it doesn’t exist on either host or container systems?

I am using archlinux on both.

EDIT: ok I didn’t need to mess with that file I just had to do as in your example which I copy and pasted. Looks ok now. Thanks ! :slight_smile:

That sort of depends on what the default configuration on arch is then.


or something. Depending on whether one uses netctl or systemd-networkd but the principle should be the same. :slight_smile:

Didn’t need it; see edit :slight_smile: