Facing issue while adding new interface to LXC


(Prajeesh Prakash) #1

I modify the config file of my lxc container to add new interface to the LXC container as shown below

Network configuration

lxc.net.0.type = veth
lxc.net.0.link = lxcbr0
lxc.net.0.flags = up
lxc.net.0.name = eth0
lxc.net.0.hwaddr = 00:16:3e:c8:9d:7a

lxc.net.0.type = veth
lxc.net.0.link = br5
lxc.net.0.flags = up
lxc.net.0.name = eth1
lxc.net.0.hwaddr = 00:16:3e:c8:9d:7d

But when i start the container it is attaching to br5 not to lxcbr0. And when i start the container it not showing the second interface eth1. Is there any wrong in the configuration file?

(Stéphane Graber) #2

Use lxc.net.1 for the second interface otherwise you’re just overriding the config entry you’ve already set.