github gitlab twitter mastodon linkedin instagram 500px email
LXD container with second network interface
Sep 20, 2018
One minute read

Adding secondary NIC to LXD container

Create container in stopped state:

lxc init images:alpine/edge server

Then add NIC:

lxc config device add server eth1 nic nictype=bridged parent=docker0

Start container and login inside:

lxc start server
lxc exec server sh

You will see that yo have now two network interfaces. Set an IP address to it:

ip link set eth1 up
ip addr add 172.17.0.200/24 broadcast 172.17.0.255 dev eth1



Back to posts