You are not logged in.

#1 2016-03-17 19:17:17

dretech
Member
Registered: 2016-02-08
Posts: 7

How to config Netctl for wireless network with LXC

Hello,

I want to use my wireless adapter in a LXC container. For using my wired interface the arch wiki (https://wiki.archlinux.org/index.php/Linux_Containers) is excellent. Until now I was not able to configure my wireless network interface (wlan0) for using in a LXC container.

The contents of the netctl config file for my wlan0 interface is:

Description="LXC wireless bridge"
Interface=br1
Connection=bridge
#BindsToInterfaces=(wlan0)
IP=static
Address=('192.168.1.79/24')
#Gateway='192.168.2.1'
#DNS=('192.168.2.1','85.113.233.93' '85.113.233.94')
#SkipForwardingDelay=yes

The network config in my lxc container is:
# wired network
lxc.network.type = veth
lxc.network.link = br0
lxc.network.hwaddr = b8:ae:ed:86:f3:32
lxc.network.flags = up
lxc.network.ipv4 = 192.168.2.86/24
lxc.network.ipv4.gateway = 192.168.2.1
lxc.network.name = eth0

# wireless network
lxc.network.type = veth
lxc.network.link = br1
lxc.network.hwaddr = b8:ae:ed:00:f3:31
lxc.network.flags = up
lxc.network.ipv4 = 192.168.2.87/24
lxc.network.name = wlan0
lxc.network.ipv4.gateway = 192.168.2.86

With the configurations above my container does not start. The following error messages appear:
lxc-start: conf.c: instantiate_veth: 2796 failed to attach 'vethPLVV5H' to the bridge 'br1': Operation not permitted
lxc-start: conf.c: lxc_create_network: 3079 failed to create netdev
lxc-start: start.c: lxc_spawn: 935 failed to create the network
lxc-start: start.c: __lxc_start: 1192 failed to spawn 'wifiap'
lxc-start: lxc_start.c: main: 344 The container failed to start.

Can anyone tell me what is wrong in my config file(s)?

Thanks in advance,

Dretech

Offline

Board footer

Powered by FluxBB